Making the default button stand out
This commit is contained in:
parent
8ccaaca579
commit
d375f9ca7d
2 changed files with 126 additions and 119 deletions
|
@ -93,7 +93,13 @@ class SafeClosePopup final : public GuiMovableWindow
|
|||
anchor03 = { m_WndRect.x + 168, m_WndRect.y + 88 };
|
||||
|
||||
m_WindowOpen = !GuiWindowBox(m_WndRect, "#191# Are you sure you want to close this program?");
|
||||
int border_color = GuiGetStyle(DEFAULT, BORDER_COLOR_NORMAL);
|
||||
int base_color = GuiGetStyle(DEFAULT, BASE_COLOR_NORMAL);
|
||||
GuiSetStyle(DEFAULT, BORDER_COLOR_NORMAL, 0x7192C2FF);
|
||||
GuiSetStyle(DEFAULT, BASE_COLOR_NORMAL, 0xBBCDD3FF);
|
||||
m_CQB_YesButton = GuiButton({ anchor03.x + -152, anchor03.y + 32, 120, 24 }, "#112#Yes");
|
||||
GuiSetStyle(DEFAULT, BORDER_COLOR_NORMAL, border_color);
|
||||
GuiSetStyle(DEFAULT, BASE_COLOR_NORMAL, base_color);
|
||||
m_CQB_NoButton = GuiButton({ anchor03.x + 24, anchor03.y + 32, 120, 24 }, "#113#No");
|
||||
GuiLabel({ anchor03.x + -104, anchor03.y + -40, 208, 24 }, "Are you sure you want to close this?");
|
||||
GuiLabel({ anchor03.x + -56, anchor03.y + -8, 120, 24 }, "Press \"Yes\" to close");
|
||||
|
|
|
@ -76,7 +76,6 @@ int main(int argc, char** argv)
|
|||
|
||||
ComponentStack::push<SettingsComponent>();
|
||||
|
||||
|
||||
// always on top...
|
||||
SafeClosePopup safe_close_popup;
|
||||
safe_close_popup.attach(&is_running);
|
||||
|
@ -114,6 +113,8 @@ int main(int argc, char** argv)
|
|||
|
||||
switch (run_result)
|
||||
{
|
||||
case 1:
|
||||
return 0;
|
||||
case 2:
|
||||
spdlog::warn("Program exiting abnormally.");
|
||||
break;
|
||||
|
@ -121,5 +122,5 @@ int main(int argc, char** argv)
|
|||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return run_result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue