forked from shiptest-ss13/Shiptest
-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #351 from Yata9arasu/fullscreen
Fullscreen added
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#define COMSIG_KB_CLIENT_FULLSCREEN_DOWN "keybinding_client_fullscreen_down" | ||
|
||
/client | ||
var/fullscreen = FALSE | ||
|
||
/datum/keybinding/client/t_fullscreen | ||
hotkey_keys = list("F11") | ||
name = "change_fullscreen" | ||
keybind_signal = COMSIG_KB_CLIENT_FULLSCREEN_DOWN | ||
|
||
/datum/keybinding/client/t_fullscreen/down(client/C) | ||
. = ..() | ||
C.toggle_fullscreen() | ||
|
||
/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", "titlebar=true") | ||
winset(usr, "mainwindow", "can-resize=true") | ||
winset(usr, "mainwindow", "menu=menu") | ||
winset(usr, "mainwindow", "is-maximized=false") | ||
winset(usr, "mainwindow", "on-size=fitviewport") | ||
|
||
fit_viewport() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "__tweaks/fullscreen.dm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters