ref: fe0bbbb01093d273f0967fda01bdcbb954b139c9
parent: fcc629e8552a63e623bb6c43c48dc379fa7490bb
author: Simon Howard <fraggle@soulsphere.org>
date: Sun Jun 5 07:21:47 EDT 2016
setup: Hide window sizes when fullscreen=true. When the game is configured to run in full screen mode it is misleading to keep showing the window size selectors as this can give the impression that a fullscreen video mode is being selected. Instead, hide the window sizes so that they only appear when running in windowed mode. This fixes #717.
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -183,10 +183,12 @@
}
// Build the table
-
+
TXT_ClearTable(modes_table);
TXT_SetColumnWidths(modes_table, 14, 14, 14, 14, 14);
+ TXT_AddWidget(modes_table, TXT_NewSeparator("Window size"));
+
for (i=0; modes[i].w != 0; ++i)
{
M_snprintf(buf, sizeof(buf), "%ix%i", modes[i].w, modes[i].h);
@@ -218,7 +220,7 @@
TXT_SetWindowHelpURL(window, WINDOW_HELP_URL);
- TXT_SetColumnWidths(window, 35);
+ TXT_SetColumnWidths(window, 40);
TXT_AddWidgets(window,
ar_checkbox = TXT_NewCheckBox("Fix aspect ratio",
@@ -231,7 +233,8 @@
TXT_NewCheckBox("Show ENDOOM screen on exit",
&show_endoom)),
TXT_NewCheckBox("Save screenshots in PNG format",
- &png_screenshots));
+ &png_screenshots),
+ NULL);
TXT_SignalConnect(ar_checkbox, "changed", GenerateModesTable, modes_table);
}
@@ -265,16 +268,14 @@
// columns. In extreme cases, the window is moved up slightly.
num_columns = 3;
- modes_table = TXT_NewTable(num_columns);
// Build window:
TXT_AddWidgets(window,
- TXT_NewSeparator("Window size"),
- modes_table,
- TXT_NewSeparator("Options"),
- fs_checkbox = TXT_NewCheckBox("Full screen", &fullscreen),
- NULL);
+ fs_checkbox = TXT_NewCheckBox("Full screen", &fullscreen),
+ TXT_NewConditional(&fullscreen, 0,
+ modes_table = TXT_NewTable(num_columns)),
+ NULL);
TXT_SignalConnect(fs_checkbox, "changed",
GenerateModesTable, modes_table);
@@ -306,7 +307,7 @@
// fullscreen and windowed mode (which causes the window's
// height to change).
- TXT_SetWindowPosition(window, TXT_HORIZ_CENTER, TXT_VERT_TOP,
+ TXT_SetWindowPosition(window, TXT_HORIZ_CENTER, TXT_VERT_TOP,
TXT_SCREEN_W / 2, window_y);
GenerateModesTable(NULL, modes_table);