GUI: add toggle full-screen keybind

This commit is contained in:
tildearrow 2022-04-17 01:57:50 -05:00
parent 0952d1b2f9
commit 4f59eb2602
5 changed files with 9 additions and 3 deletions

View file

@ -2476,9 +2476,8 @@ bool FurnaceGUI::loop() {
ImGui::EndMenu();
}
if (ImGui::BeginMenu("settings")) {
if (ImGui::MenuItem("full screen",NULL,fullScreen)) {
fullScreen=!fullScreen;
SDL_SetWindowFullscreen(sdlWin,fullScreen?(SDL_WINDOW_FULLSCREEN|SDL_WINDOW_FULLSCREEN_DESKTOP):0);
if (ImGui::MenuItem("full screen",BIND_FOR(GUI_ACTION_FULLSCREEN),fullScreen)) {
doAction(GUI_ACTION_FULLSCREEN);
}
if (ImGui::MenuItem("lock layout",NULL,lockLayout)) {
lockLayout=!lockLayout;