fix SeparatorLine

Origin commit data
------------------
Commit: 74d05eb940
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2022-09-14 (Wed, 14 Sep 2022)
This commit is contained in:
BPanther
2022-09-14 20:47:52 +02:00
committed by vanhofen
parent f45689406b
commit 97c37ad7ad
3 changed files with 13 additions and 11 deletions

View File

@@ -1578,7 +1578,7 @@ void CMenuWidget::paintItems()
}
/*adds the typical menu intro with optional subhead, separator, back or cancel button and separatorline to menu*/
void CMenuWidget::addIntroItems(const std::string& s_subhead_text, neutrino_locale_t section_text, int buttontype, bool brief_hint)
void CMenuWidget::addIntroItems(const std::string &s_subhead_text, neutrino_locale_t section_text, int buttontype, bool brief_hint, bool SeparatorLine)
{
brief_hints = brief_hint;
@@ -1598,17 +1598,19 @@ void CMenuWidget::addIntroItems(const std::string& s_subhead_text, neutrino_loca
addItem(GenericMenuNext);
break;
}
if (section_text != NONEXISTANT_LOCALE)
addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, section_text));
else if (buttontype != BTN_TYPE_NO)
addItem(GenericMenuSeparatorLine);
if (SeparatorLine) {
if (section_text != NONEXISTANT_LOCALE)
addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, section_text));
else if (buttontype != BTN_TYPE_NO)
addItem(GenericMenuSeparatorLine);
}
}
void CMenuWidget::addIntroItems(neutrino_locale_t l_subhead_text, neutrino_locale_t section_text, int buttontype, bool brief_hint)
void CMenuWidget::addIntroItems(neutrino_locale_t l_subhead_text, neutrino_locale_t section_text, int buttontype, bool brief_hint, bool SeparatorLine)
{
std::string str = l_subhead_text == NONEXISTANT_LOCALE ? "" : g_Locale->getText(l_subhead_text);
addIntroItems(str, section_text, buttontype, brief_hint);
addIntroItems(str, section_text, buttontype, brief_hint, SeparatorLine);
}
void CMenuWidget::saveScreen()