- menu: add possibility to add a footer to the menus; fix alignment of menus

add footer-keys to testmenu

  (some of this code is based on code by martii; thx)
This commit is contained in:
svenhoefer
2014-04-11 00:26:52 +02:00
parent 9dc59ec556
commit 4fba818cc2
3 changed files with 78 additions and 13 deletions

View File

@@ -39,6 +39,7 @@
#include <driver/framebuffer.h>
#include <driver/rcinput.h>
#include <system/localize.h>
#include <gui/widget/buttons.h>
#include <gui/widget/icons.h>
#include <gui/color.h>
#include <gui/components/cc.h>
@@ -652,12 +653,17 @@ class CMenuWidget : public CMenuTarget
int selected;
int iconOffset;
int sb_width;
int sb_height;
fb_pixel_t *background;
int full_width, full_height;
bool savescreen;
bool has_hints; // is any items has hints
bool hint_painted; // is hint painted
int fbutton_height;
int fbutton_count;
const struct button_label *fbutton_labels;
unsigned int item_start_y;
unsigned int current_page;
unsigned int total_pages;
@@ -719,6 +725,7 @@ class CMenuWidget : public CMenuTarget
MENU_POS_BOTTOM_RIGHT
};
void addKey(neutrino_msg_t key, CMenuTarget *menue, const std::string &action);
void setFooter(const struct button_label *_fbutton_label, const int _fbutton_count, bool repaint = false);
};
class CPINProtection