mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Disable resolution list box when popup is open
So hotkeys are not used by the list box before popup menus.
This commit is contained in:
parent
2359e38913
commit
351dc88b21
|
@ -1565,6 +1565,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
||||||
static const float sc_RowHeightResList = 22.0f;
|
static const float sc_RowHeightResList = 22.0f;
|
||||||
static const float sc_FontSizeResListHeader = 12.0f;
|
static const float sc_FontSizeResListHeader = 12.0f;
|
||||||
static const float sc_FontSizeResList = 10.0f;
|
static const float sc_FontSizeResList = 10.0f;
|
||||||
|
bool ListBoxUsed = !UI()->IsPopupOpen();
|
||||||
int OldSelected = -1;
|
int OldSelected = -1;
|
||||||
{
|
{
|
||||||
int G = std::gcd(g_Config.m_GfxScreenWidth, g_Config.m_GfxScreenHeight);
|
int G = std::gcd(g_Config.m_GfxScreenWidth, g_Config.m_GfxScreenHeight);
|
||||||
|
@ -1572,7 +1573,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
||||||
}
|
}
|
||||||
|
|
||||||
UI()->DoLabel(&ModeLabel, aBuf, sc_FontSizeResListHeader, TEXTALIGN_MC);
|
UI()->DoLabel(&ModeLabel, aBuf, sc_FontSizeResListHeader, TEXTALIGN_MC);
|
||||||
s_ListBox.DoStart(sc_RowHeightResList, s_NumNodes, 1, 3, OldSelected, &ModeList);
|
s_ListBox.DoStart(sc_RowHeightResList, s_NumNodes, 1, 3, OldSelected, &ModeList, true, &ListBoxUsed);
|
||||||
|
|
||||||
for(int i = 0; i < s_NumNodes; ++i)
|
for(int i = 0; i < s_NumNodes; ++i)
|
||||||
{
|
{
|
||||||
|
@ -1585,7 +1586,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
||||||
OldSelected = i;
|
OldSelected = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CListboxItem Item = s_ListBox.DoNextItem(&s_aModes[i], OldSelected == i);
|
const CListboxItem Item = s_ListBox.DoNextItem(&s_aModes[i], OldSelected == i, &ListBoxUsed);
|
||||||
if(!Item.m_Visible)
|
if(!Item.m_Visible)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue