diff --git a/code/__DEFINES/keybinding.dm b/code/__DEFINES/keybinding.dm index af4c560f92c1..66ae25bb029b 100644 --- a/code/__DEFINES/keybinding.dm +++ b/code/__DEFINES/keybinding.dm @@ -29,6 +29,7 @@ //Client #define COMSIG_KB_CLIENT_GETHELP_DOWN "keybinding_client_gethelp_down" #define COMSIG_KB_CLIENT_SCREENSHOT_DOWN "keybinding_client_screenshot_down" +#define COMSIG_KB_CLIENT_FULLSCREEN_DOWN "keybinding_client_fullscreen_down" #define COMSIG_KB_CLIENT_MINIMALHUD_DOWN "keybinding_client_minimalhud_down" //Communication diff --git a/code/datums/keybinding/client.dm b/code/datums/keybinding/client.dm index 81b9bb6c287a..f36645692c99 100644 --- a/code/datums/keybinding/client.dm +++ b/code/datums/keybinding/client.dm @@ -32,6 +32,20 @@ winset(user, null, "command=.auto") return TRUE +/datum/keybinding/client/toggle_fullscreen + hotkey_keys = list("F11") + name = "toggle_fullscreen" + full_name = "Toggle Fullscreen" + description = "Makes the game window fullscreen." + keybind_signal = COMSIG_KB_CLIENT_FULLSCREEN_DOWN + +/datum/keybinding/client/toggle_fullscreen/down(client/user) + . = ..() + if(.) + return + user.toggle_fullscreen() + return TRUE + /datum/keybinding/client/minimal_hud hotkey_keys = list("F12") name = "minimal_hud" diff --git a/interface/skin.dmf b/interface/skin.dmf index 58cf103fb029..9f3d8ccdb7a8 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -80,8 +80,8 @@ window "mainwindow" menu = "menu" elem "split" type = CHILD - pos = 3,0 - size = 634x440 + pos = 0,0 + size = 640x440 anchor1 = 0,0 anchor2 = 100,100 saved-params = "splitter" @@ -161,58 +161,67 @@ window "infowindow" is-vert = false elem "changelog" type = BUTTON - pos = 16,5 - size = 104x20 - anchor1 = 3,0 - anchor2 = 19,0 + pos = 5,5 + size = 90x20 + anchor1 = 1,0 + anchor2 = 15,0 saved-params = "is-checked" text = "Changelog" command = "changelog" elem "rules" type = BUTTON - pos = 120,5 - size = 100x20 - anchor1 = 19,0 - anchor2 = 34,0 + pos = 95,5 + size = 90x20 + anchor1 = 15,0 + anchor2 = 29,0 saved-params = "is-checked" text = "Rules" command = "rules" elem "wiki" type = BUTTON - pos = 220,5 - size = 100x20 - anchor1 = 34,0 - anchor2 = 50,0 + pos = 185,5 + size = 90x20 + anchor1 = 29,0 + anchor2 = 43,0 saved-params = "is-checked" text = "Wiki" command = "wiki" elem "forum" type = BUTTON - pos = 320,5 - size = 100x20 - anchor1 = 50,0 - anchor2 = 66,0 + pos = 275,5 + size = 90x20 + anchor1 = 43,0 + anchor2 = 57,0 saved-params = "is-checked" text = "Forum" command = "forum" elem "github" type = BUTTON - pos = 420,5 - size = 100x20 - anchor1 = 66,0 - anchor2 = 81,0 + pos = 365,5 + size = 90x20 + anchor1 = 57,0 + anchor2 = 71,0 saved-params = "is-checked" text = "Github" command = "github" elem "report-issue" type = BUTTON - pos = 520,5 - size = 100x20 - anchor1 = 81,0 - anchor2 = 97,0 + pos = 455,5 + size = 90x20 + anchor1 = 71,0 + anchor2 = 85,0 saved-params = "is-checked" text = "Report Issue" command = "report-issue" + elem "fullscreen-toggle" + type = BUTTON + pos = 545,5 + size = 90x20 + anchor1 = 85,0 + anchor2 = 99,0 + saved-params = "is-checked" + text = "Fullscreen" + command = "fullscreen" window "outputwindow" elem "outputwindow" diff --git a/tgui/packages/tgui-panel/themes.js b/tgui/packages/tgui-panel/themes.js index 63fb2774849f..5cd84af4cf2c 100644 --- a/tgui/packages/tgui-panel/themes.js +++ b/tgui/packages/tgui-panel/themes.js @@ -57,6 +57,8 @@ export const setClientTheme = (name) => { 'github.text-color': '#000000', 'report-issue.background-color': 'none', 'report-issue.text-color': '#000000', + 'fullscreen-toggle.background-color': 'none', + 'fullscreen-toggle.text-color': '#000000', // Status and verb tabs 'output.background-color': 'none', 'output.text-color': '#000000', @@ -109,6 +111,8 @@ export const setClientTheme = (name) => { 'github.text-color': COLOR_DARK_TEXT, 'report-issue.background-color': '#492020', 'report-issue.text-color': COLOR_DARK_TEXT, + 'fullscreen-toggle.background-color': '#494949', + 'fullscreen-toggle.text-color': COLOR_DARK_TEXT, // Status and verb tabs 'output.background-color': COLOR_DARK_BG_DARKER, 'output.text-color': COLOR_DARK_TEXT,