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:
beaglejoe 2022-05-14 12:03:16 +00:00
parent 53fe66859a
commit 0becbe2f54

View file

@ -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();
}
}