Fullscreen, status bar hiding, chat input following the theme (#67987)

* Initial commit

* input is colored according to the theme

* removed unused setting
This commit is contained in:
Andrew
2022-06-26 20:15:21 -04:00
committed by GitHub
parent 2002cb801a
commit e792e7f631
7 changed files with 48 additions and 20 deletions
-3
View File
@@ -12,9 +12,6 @@
///how many colour priority levels there are.
#define COLOUR_PRIORITY_AMOUNT 4
#define COLOR_INPUT_DISABLED "#F0F0F0"
#define COLOR_INPUT_ENABLED "#D3B5B5"
#define COLOR_DARKMODE_BACKGROUND "#202020"
#define COLOR_DARKMODE_DARKBACKGROUND "#171717"
#define COLOR_DARKMODE_TEXT "#a4bad6"
+1 -1
View File
@@ -24,7 +24,7 @@ SUBSYSTEM_DEF(input)
"Any" = "\"KeyDown \[\[*\]\]\"",
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
"Tab" = "\".winset \\\"input.focus=true?map.focus=true input.background-color=[COLOR_INPUT_DISABLED]:input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"",
"Tab" = "\".winset \\\"input.focus=true?map.focus=true:input.focus=true\\\"\"",
"Escape" = "Reset-Held-Keys",
)
+5
View File
@@ -175,6 +175,11 @@
/// Messages currently seen by this client
var/list/seen_messages
//Hide top bars
var/fullscreen = FALSE
//Hide status bar (bottom left)
var/show_status_bar = TRUE
/// datum wrapper for client view
var/datum/view_data/view_size
+34 -5
View File
@@ -932,12 +932,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if (hotkeys)
// If hotkey mode is enabled, then clicking the map will automatically
// unfocus the text bar. This removes the red color from the text bar
// so that the visual focus indicator matches reality.
winset(src, null, "input.background-color=[COLOR_INPUT_DISABLED]")
// unfocus the text bar.
winset(src, null, "input.focus=false")
else
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_ENABLED]")
winset(src, null, "input.focus=true")
SEND_SIGNAL(src, COMSIG_CLIENT_CLICK, object, location, control, params, usr)
@@ -1220,3 +1218,34 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
SEND_SOUND(usr, sound(null))
tgui_panel?.stop_music()
SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Stop Self Sounds"))
/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")
/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, "mapwindow.status_bar", "is-visible=true")
else
winset(usr, "mapwindow.status_bar", "is-visible=false")
-5
View File
@@ -38,9 +38,4 @@
window.mouse_event_macro_set = FALSE
window.set_mouse_macro()
if(hotkeys)
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_ENABLED]")
else
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_DISABLED]")
update_special_keybinds()
+4 -6
View File
@@ -221,14 +221,13 @@ window "outputwindow"
size = 517x20
anchor1 = 0,100
anchor2 = 100,100
background-color = #d3b5b5
is-default = true
border = sunken
border = line
saved-params = "command"
elem "oocbutton"
type = BUTTON
pos = 599,460
size = 40x19
size = 40x20
anchor1 = 100,100
anchor2 = -1,-1
background-color = none
@@ -241,7 +240,7 @@ window "outputwindow"
elem "saybutton"
type = BUTTON
pos = 519,460
size = 40x19
size = 40x20
anchor1 = 100,100
anchor2 = -1,-1
background-color = none
@@ -254,7 +253,7 @@ window "outputwindow"
elem "mebutton"
type = BUTTON
pos = 559,460
size = 40x19
size = 40x20
anchor1 = 100,100
anchor2 = -1,-1
background-color = none
@@ -270,7 +269,6 @@ window "outputwindow"
size = 640x456
anchor1 = 0,0
anchor2 = 100,100
background-color = #ffffff
is-visible = false
is-disabled = true
saved-params = ""
+4
View File
@@ -79,6 +79,8 @@ export const setClientTheme = (name) => {
'asset_cache_browser.text-color': '#000000',
'tooltip.background-color': 'none',
'tooltip.text-color': '#000000',
'input.background-color': '#FFFFFF',
'input.text-color': '#000000',
});
}
if (name === 'dark') {
@@ -129,6 +131,8 @@ export const setClientTheme = (name) => {
'asset_cache_browser.text-color': COLOR_DARK_TEXT,
'tooltip.background-color': COLOR_DARK_BG,
'tooltip.text-color': COLOR_DARK_TEXT,
'input.background-color': COLOR_DARK_BG_DARKER,
'input.text-color': COLOR_DARK_TEXT,
});
}
};