mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
menue: allow brief hints in all introItems
Origin commit data
------------------
Branch: ni/coolstream
Commit: 524563f448
Author: vanhofen <vanhofen@gmx.de>
Date: 2015-05-19 (Tue, 19 May 2015)
Origin message was:
------------------
- menue: allow brief hints in all introItems
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -567,6 +567,7 @@ void CMenuWidget::Init(const std::string &Icon, const int mwidth, const mn_widge
|
|||||||
savescreen = false;
|
savescreen = false;
|
||||||
background = NULL;
|
background = NULL;
|
||||||
has_hints = false;
|
has_hints = false;
|
||||||
|
brief_hints = BRIEF_HINT_NO;
|
||||||
hint_painted = false;
|
hint_painted = false;
|
||||||
hint_height = 0;
|
hint_height = 0;
|
||||||
fbutton_count = 0;
|
fbutton_count = 0;
|
||||||
@@ -1010,6 +1011,8 @@ void CMenuWidget::hide()
|
|||||||
|
|
||||||
void CMenuWidget::checkHints()
|
void CMenuWidget::checkHints()
|
||||||
{
|
{
|
||||||
|
brief_hints = (brief_hints || (from_wizard == SNeutrinoSettings::WIZARD_START));
|
||||||
|
|
||||||
GenericMenuBack->setHint("", NONEXISTANT_LOCALE);
|
GenericMenuBack->setHint("", NONEXISTANT_LOCALE);
|
||||||
GenericMenuNext->setHint("", NONEXISTANT_LOCALE);
|
GenericMenuNext->setHint("", NONEXISTANT_LOCALE);
|
||||||
for (unsigned int i= 0; i< items.size(); i++) {
|
for (unsigned int i= 0; i< items.size(); i++) {
|
||||||
@@ -1019,9 +1022,8 @@ void CMenuWidget::checkHints()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (has_hints) {
|
if (has_hints) {
|
||||||
GenericMenuBack->setHint(NEUTRINO_ICON_HINT_BACK, LOCALE_MENU_HINT_BACK);
|
GenericMenuBack->setHint(NEUTRINO_ICON_HINT_BACK, brief_hints ? LOCALE_MENU_HINT_BACK_BRIEF : LOCALE_MENU_HINT_BACK);
|
||||||
bool brief = (from_wizard == SNeutrinoSettings::WIZARD_START);
|
GenericMenuNext->setHint(NEUTRINO_ICON_HINT_NEXT, brief_hints ? LOCALE_MENU_HINT_NEXT_BRIEF : LOCALE_MENU_HINT_NEXT);
|
||||||
GenericMenuNext->setHint(NEUTRINO_ICON_HINT_NEXT, brief ? LOCALE_MENU_HINT_NEXT_BRIEF : LOCALE_MENU_HINT_NEXT);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1244,8 +1246,10 @@ void CMenuWidget::paintItems()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*adds the typical menu intro with optional subhead, separator, back or cancel button and separatorline to menu*/
|
/*adds the typical menu intro with optional subhead, separator, back or cancel button and separatorline to menu*/
|
||||||
void CMenuWidget::addIntroItems(neutrino_locale_t subhead_text, neutrino_locale_t section_text, int buttontype)
|
void CMenuWidget::addIntroItems(neutrino_locale_t subhead_text, neutrino_locale_t section_text, int buttontype, bool brief_hint)
|
||||||
{
|
{
|
||||||
|
brief_hints = brief_hint;
|
||||||
|
|
||||||
if (subhead_text != NONEXISTANT_LOCALE)
|
if (subhead_text != NONEXISTANT_LOCALE)
|
||||||
addItem(new CMenuSeparator(CMenuSeparator::ALIGN_LEFT | CMenuSeparator::SUB_HEAD | CMenuSeparator::STRING, subhead_text));
|
addItem(new CMenuSeparator(CMenuSeparator::ALIGN_LEFT | CMenuSeparator::SUB_HEAD | CMenuSeparator::STRING, subhead_text));
|
||||||
|
|
||||||
|
@@ -517,6 +517,7 @@ class CMenuWidget : public CMenuTarget
|
|||||||
int full_width, full_height;
|
int full_width, full_height;
|
||||||
bool savescreen;
|
bool savescreen;
|
||||||
bool has_hints; // is any items has hints
|
bool has_hints; // is any items has hints
|
||||||
|
bool brief_hints;
|
||||||
bool hint_painted; // is hint painted
|
bool hint_painted; // is hint painted
|
||||||
|
|
||||||
int fbutton_width;
|
int fbutton_width;
|
||||||
@@ -557,7 +558,12 @@ class CMenuWidget : public CMenuTarget
|
|||||||
BTN_TYPE_NEXT = 3,
|
BTN_TYPE_NEXT = 3,
|
||||||
BTN_TYPE_NO = -1
|
BTN_TYPE_NO = -1
|
||||||
};
|
};
|
||||||
virtual void addIntroItems(neutrino_locale_t subhead_text = NONEXISTANT_LOCALE, neutrino_locale_t section_text = NONEXISTANT_LOCALE, int buttontype = BTN_TYPE_BACK );
|
enum
|
||||||
|
{
|
||||||
|
BRIEF_HINT_NO = 0,
|
||||||
|
BRIEF_HINT_YES = 1
|
||||||
|
};
|
||||||
|
virtual void addIntroItems(neutrino_locale_t subhead_text = NONEXISTANT_LOCALE, neutrino_locale_t section_text = NONEXISTANT_LOCALE, int buttontype = BTN_TYPE_BACK, bool brief_hint = BRIEF_HINT_NO);
|
||||||
bool hasItem();
|
bool hasItem();
|
||||||
void resetWidget(bool delete_items = false);
|
void resetWidget(bool delete_items = false);
|
||||||
void insertItem(const uint& item_id, CMenuItem* menuItem);
|
void insertItem(const uint& item_id, CMenuItem* menuItem);
|
||||||
|
Reference in New Issue
Block a user