diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm index 19e8d760d7..b73a5fe290 100644 --- a/code/modules/client/client defines.dm +++ b/code/modules/client/client defines.dm @@ -81,10 +81,15 @@ // Runechat messages var/list/seen_messages + //Hide top bars + var/fullscreen = FALSE + //Hide status bar + var/show_status_bar = TRUE + /////////// // INPUT // /////////// - + /// Bitfield of modifier keys (Shift, Ctrl, Alt) held currently. var/mod_keys_held = 0 /// Bitfield of movement keys (WASD/Cursor Keys) held currently. @@ -108,4 +113,4 @@ /// Movement dir of the most recently pressed movement key. Used in cardinal-only movement mode. var/last_move_dir_pressed = NONE - #endif \ No newline at end of file + #endif diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 0a0b604b48..24df219632 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -575,3 +575,36 @@ set name = "TguiKeyUp" set hidden = TRUE return // stub + +/client/verb/toggle_fullscreen() + set name = "Toggle Fullscreen" + set category = "OOC" + + fullscreen = !fullscreen + + if (fullscreen) + winset(usr, "mainwindow", "on-size=") + winset(usr, "mainwindow", "titlebar=false") + winset(usr, "mainwindow", "can-resize=false") + winset(usr, "mainwindow", "menu=") + winset(usr, "mainwindow", "is-maximized=false") + winset(usr, "mainwindow", "is-maximized=true") + else + winset(usr, "mainwindow", "menu=menu") + winset(usr, "mainwindow", "titlebar=true") + winset(usr, "mainwindow", "can-resize=true") + winset(usr, "mainwindow", "is-maximized=false") + winset(usr, "mainwindow", "on-size=attempt_auto_fit_viewport") // The attempt_auto_fit_viewport() proc is not implemented yet + +/* +/client/verb/toggle_status_bar() + set name = "Toggle Status Bar" + set category = "OOC" + + show_status_bar = !show_status_bar + + if (show_status_bar) + winset(usr, "input", "is-visible=true") + else + winset(usr, "input", "is-visible=false") +*/ diff --git a/tgui/public/tgui.html b/tgui/public/tgui.html index 07d74341f7..b5fc63f0c8 100644 --- a/tgui/public/tgui.html +++ b/tgui/public/tgui.html @@ -301,6 +301,7 @@ if (type === 'js') { var node = document.createElement('script'); node.type = 'text/javascript'; + node.crossOrigin = 'anonymous'; // IE8: Prefer non-https protocols node.src = Byond.IS_LTE_IE9 ? url.replace('https://', 'http://')