Skip to content

Commit

Permalink
show current resolution in graphics settings
Browse files Browse the repository at this point in the history
oy committed Nov 20, 2018
1 parent 7b51a1f commit a99addc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/game/client/components/menus_settings.cpp
Original file line number Diff line number Diff line change
@@ -1504,7 +1504,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
RenderTools()->DrawUIRect(&HeaderLeft, vec4(0.30f, 0.4f, 1.0f, 0.5f), CUI::CORNER_T, 5.0f);
RenderTools()->DrawUIRect(&HeaderRight, vec4(0.0f, 0.0f, 0.0f, 0.5f), CUI::CORNER_T, 5.0f);

char aBuf[32];
char aBuf[64];
str_format(aBuf, sizeof(aBuf), "%s", Localize("Recommended"));
HeaderLeft.y += 2;
UI()->DoLabel(&HeaderLeft, aBuf, HeaderLeft.h*ms_FontmodHeight*0.8f, CUI::ALIGN_CENTER);
@@ -1517,6 +1517,15 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
MainView.HSplitTop(Spacing, 0, &MainView);
CUIRect ListRec, ListOth;
MainView.VSplitMid(&ListRec, &ListOth);

ListRec.HSplitBottom(ButtonHeight, &ListRec, &Button);
ListRec.HSplitBottom(Spacing, &ListRec, 0);
RenderTools()->DrawUIRect(&Button, vec4(0.0f, 0.0f, 0.0f, 0.5f), CUI::CORNER_B, 5.0f);
int g = gcd(s_GfxScreenWidth, s_GfxScreenHeight);
str_format(aBuf, sizeof(aBuf), Localize("Current: %dx%d (%d:%d)"), s_GfxScreenWidth, s_GfxScreenHeight, s_GfxScreenWidth/g, s_GfxScreenHeight/g);
Button.y += 2;
UI()->DoLabel(&Button, aBuf, Button.h*ms_FontmodHeight*0.8f, CUI::ALIGN_CENTER);

ListRec.VSplitRight(1.5f, &ListRec, 0);
ListOth.VSplitLeft(1.5f, 0, &ListOth);

0 comments on commit a99addc

Please sign in to comment.