mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
finished graphics menu (for now)
This commit is contained in:
parent
37c970bc49
commit
9a1f8899b7
|
@ -1402,8 +1402,10 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
||||||
// display mode list
|
// display mode list
|
||||||
{
|
{
|
||||||
// custom list header
|
// custom list header
|
||||||
CUIRect Header, Left, Right;
|
NumOptions = 2;
|
||||||
MainView.HSplitTop(ButtonHeight*2.0f+Spaceing*2.0f, &Header, 0);
|
|
||||||
|
CUIRect Header, Button;
|
||||||
|
MainView.HSplitTop(ButtonHeight*(float)(NumOptions+1)+Spaceing*(float)(NumOptions+1), &Header, 0);
|
||||||
RenderTools()->DrawUIRect(&Header, vec4(0.0f, 0.0f, 0.0f, 0.25f), CUI::CORNER_T, 5.0f);
|
RenderTools()->DrawUIRect(&Header, vec4(0.0f, 0.0f, 0.0f, 0.25f), CUI::CORNER_T, 5.0f);
|
||||||
|
|
||||||
// draw header
|
// draw header
|
||||||
|
@ -1412,12 +1414,9 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
||||||
|
|
||||||
// supported modes button
|
// supported modes button
|
||||||
MainView.HSplitTop(Spaceing, 0, &MainView);
|
MainView.HSplitTop(Spaceing, 0, &MainView);
|
||||||
MainView.HSplitTop(ButtonHeight, &Left, &MainView);
|
MainView.HSplitTop(ButtonHeight, &Button, &MainView);
|
||||||
Left.VSplitMid(&Left, &Right);
|
|
||||||
Left.VSplitRight(1.5f, &Left, 0);
|
|
||||||
Right.VSplitLeft(1.5f, 0, &Right);
|
|
||||||
static int s_GfxDisplayAllModes = 0;
|
static int s_GfxDisplayAllModes = 0;
|
||||||
if(DoButton_CheckBox(&s_GfxDisplayAllModes, Localize("Show only supported"), g_Config.m_GfxDisplayAllModes^1, &Left))
|
if(DoButton_CheckBox(&s_GfxDisplayAllModes, Localize("Show only supported"), g_Config.m_GfxDisplayAllModes^1, &Button))
|
||||||
{
|
{
|
||||||
g_Config.m_GfxDisplayAllModes ^= 1;
|
g_Config.m_GfxDisplayAllModes ^= 1;
|
||||||
m_NumModes = Graphics()->GetVideoModes(m_aModes, MAX_RESOLUTIONS);
|
m_NumModes = Graphics()->GetVideoModes(m_aModes, MAX_RESOLUTIONS);
|
||||||
|
@ -1444,10 +1443,12 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
||||||
|
|
||||||
// format changer
|
// format changer
|
||||||
{
|
{
|
||||||
RenderTools()->DrawUIRect(&Right, vec4(0.0f, 0.0f, 0.0f, 0.25f), CUI::CORNER_ALL, 5.0f);
|
MainView.HSplitTop(Spaceing, 0, &MainView);
|
||||||
|
MainView.HSplitTop(ButtonHeight, &Button, &MainView);
|
||||||
|
RenderTools()->DrawUIRect(&Button, vec4(0.0f, 0.0f, 0.0f, 0.25f), CUI::CORNER_ALL, 5.0f);
|
||||||
CUIRect Text, Value, Unit;
|
CUIRect Text, Value, Unit;
|
||||||
Right.VSplitLeft(Right.w/3.0f, &Text, &Right);
|
Button.VSplitLeft(Button.w/3.0f, &Text, &Button);
|
||||||
Right.VSplitMid(&Value, &Unit);
|
Button.VSplitMid(&Value, &Unit);
|
||||||
|
|
||||||
char aBuf[32];
|
char aBuf[32];
|
||||||
str_format(aBuf, sizeof(aBuf), "%s:", Localize("Format"));
|
str_format(aBuf, sizeof(aBuf), "%s:", Localize("Format"));
|
||||||
|
|
Loading…
Reference in a new issue