CMenuWidget: Add function getNextShortcut()/setNextShortcut()

for setting of direktkey in the plugin integration
This commit is contained in:
M. Liebmann
2014-10-16 05:13:07 +02:00
parent 8c42ad8dd5
commit 940a41aab2
3 changed files with 8 additions and 1 deletions

View File

@@ -973,8 +973,10 @@ void CPersonalizeGui::addPersonalizedItems()
allow_sep = true;
//generate shortcut for next item
if (add_shortcut)
if (add_shortcut) {
short_cut++;
v_item[i].widget->setNextShortcut(short_cut);
}
}
else if (p_mode == PERSONALIZE_MODE_NOTVISIBLE)
{

View File

@@ -494,6 +494,7 @@ CMenuWidget::CMenuWidget()
details_line = NULL;
info_box = NULL;
show_details_line = true;
nextShortcut = 1;
}
CMenuWidget::CMenuWidget(const neutrino_locale_t Name, const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index)
@@ -564,6 +565,7 @@ void CMenuWidget::Init(const std::string &Icon, const int mwidth, const mn_widge
fbutton_labels = NULL;
fbutton_width = 0;
fbutton_height = 0;
nextShortcut = 1;
}
void CMenuWidget::move(int xoff, int yoff)

View File

@@ -520,6 +520,7 @@ class CMenuWidget : public CMenuTarget
bool from_wizard;
bool fade;
bool washidden;
int nextShortcut;
void Init(const std::string & Icon, const int mwidth, const mn_widget_id_t &w_index);
virtual void paintItems();
@@ -577,6 +578,8 @@ class CMenuWidget : public CMenuTarget
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);
void suppressDetailsLine(bool suppress = true){show_details_line = suppress ? false : true;};
void setNextShortcut(int sc) { nextShortcut = sc; };
int getNextShortcut() { return nextShortcut; };
};
class CPINProtection