mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CMsgBox: add option for No Yes button arrangement
Useful if order of red and green buttons must be changed. Return values are untouched.
This commit is contained in:
@@ -179,6 +179,22 @@ void CMsgBox::initButtons()
|
|||||||
btn.btn_alias = mbBack;
|
btn.btn_alias = mbBack;
|
||||||
v_buttons.push_back(btn);
|
v_buttons.push_back(btn);
|
||||||
}
|
}
|
||||||
|
if (mb_show_button & mbNoYes){
|
||||||
|
btn.button = NEUTRINO_ICON_BUTTON_GREEN;
|
||||||
|
btn.text = BTN_TEXT(mbNo);
|
||||||
|
btn.directKey = CRCInput::RC_green;
|
||||||
|
btn.directKeyAlt = CRCInput::RC_home;
|
||||||
|
btn.btn_result = mbrNo;
|
||||||
|
btn.btn_alias = mbNo;
|
||||||
|
v_buttons.push_back(btn);
|
||||||
|
btn.button = NEUTRINO_ICON_BUTTON_RED;
|
||||||
|
btn.text = BTN_TEXT(mbYes);
|
||||||
|
btn.directKey = CRCInput::RC_red;
|
||||||
|
btn.directKeyAlt = CRCInput::RC_ok;
|
||||||
|
btn.btn_result = mbrYes;
|
||||||
|
btn.btn_alias = mbYes;
|
||||||
|
v_buttons.push_back(btn);
|
||||||
|
}
|
||||||
|
|
||||||
ccw_footer->setButtonLabels(v_buttons, 0, 125);
|
ccw_footer->setButtonLabels(v_buttons, 0, 125);
|
||||||
ccw_footer->getButtonChainObject()->setColorBody(col_body);
|
ccw_footer->getButtonChainObject()->setColorBody(col_body);
|
||||||
|
@@ -74,7 +74,8 @@ class CMsgBox : public CHintBox
|
|||||||
mbOKCancel = 0x20,
|
mbOKCancel = 0x20,
|
||||||
mbYesNoCancel = 0x40,
|
mbYesNoCancel = 0x40,
|
||||||
mbYesNo = 0x80,
|
mbYesNo = 0x80,
|
||||||
mbAll = 0x100,
|
mbNoYes = 0x100,
|
||||||
|
mbAll = 0x200,
|
||||||
//unused allign stuff, only for compatibility
|
//unused allign stuff, only for compatibility
|
||||||
mbBtnAlignCenter1 = 0x0400, /* centered, large distances */
|
mbBtnAlignCenter1 = 0x0400, /* centered, large distances */
|
||||||
mbBtnAlignCenter2 = 0x0800, /* centered, small distances */
|
mbBtnAlignCenter2 = 0x0800, /* centered, small distances */
|
||||||
@@ -267,7 +268,8 @@ class CMsgBox : public CHintBox
|
|||||||
* mbOKCancel = 0x20,
|
* mbOKCancel = 0x20,
|
||||||
* mbYesNoCancel = 0x40,
|
* mbYesNoCancel = 0x40,
|
||||||
* mbYesNo = 0x80,
|
* mbYesNo = 0x80,
|
||||||
* mbAll = 0x100,
|
* mbNoYes = 0x100,
|
||||||
|
* mbAll = 0x200,
|
||||||
* NOTE: allign parameters are currently not supported, these values are existing for compatibility only!
|
* NOTE: allign parameters are currently not supported, these values are existing for compatibility only!
|
||||||
*/
|
*/
|
||||||
void setShowedButtons(const int& ShowButtons){mb_show_button = ShowButtons; initButtons();}
|
void setShowedButtons(const int& ShowButtons){mb_show_button = ShowButtons; initButtons();}
|
||||||
|
Reference in New Issue
Block a user