Disable/Enable some Display menu items depending on Mode
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8161 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: b0b01f812ef6d9854966b2817a286a20addb4490 Former-commit-id: 19112d895c831c4a96412ba221305f5ff97c2ca8
This commit is contained in:
parent
53fe66859a
commit
0becbe2f54
1 changed files with 16 additions and 1 deletions
|
@ -221,9 +221,24 @@ void DisplayMenu::onCancel(void *pDisplayMenu)
|
|||
void DisplayMenu::updateControls()
|
||||
{
|
||||
char buf[32];
|
||||
int enable = GFUI_ENABLE;
|
||||
|
||||
int nControlId = getDynamicControlId("DisplayModeCombo");
|
||||
GfuiComboboxSetSelectedIndex(getMenuHandle(), nControlId, _eDisplayMode);
|
||||
|
||||
if(_eDisplayMode == eResizable)
|
||||
{
|
||||
enable = GFUI_DISABLE;
|
||||
}
|
||||
nControlId = getDynamicControlId("MonitorTypeCombo");
|
||||
GfuiEnable(getMenuHandle(),nControlId,enable);
|
||||
|
||||
nControlId = getDynamicControlId("StartupDisplayCombo");
|
||||
GfuiEnable(getMenuHandle(),nControlId,enable);
|
||||
|
||||
nControlId = getDynamicControlId("ScreenSizeCombo");
|
||||
GfuiEnable(getMenuHandle(),nControlId,enable);
|
||||
|
||||
|
||||
resetScreenSizes();
|
||||
|
||||
|
@ -433,7 +448,7 @@ void DisplayMenu::setDisplayMode(EDisplayMode eMode)
|
|||
{
|
||||
_eDisplayMode = eMode;
|
||||
|
||||
resetScreenSizes();
|
||||
updateControls();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue