[MIRROR] Fullscreen, status bar hiding, chat input following the theme [MDB IGNORE] (#14555)

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

* Initial commit

* input is colored according to the theme

* removed unused setting

* Fullscreen, status bar hiding, chat input following the theme

Co-authored-by: Andrew <mt.forspam@gmail.com>
This commit is contained in:
SkyratBot
2022-06-27 03:15:25 +02:00
committed by GitHub
parent 6aacbd4f44
commit 583a5e704a
7 changed files with 48 additions and 20 deletions

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"

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",
)

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

View File

@@ -964,12 +964,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)
@@ -1258,3 +1256,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")

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()

View File

@@ -232,14 +232,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
@@ -252,7 +251,7 @@ window "outputwindow"
elem "saybutton"
type = BUTTON
pos = 519,460
size = 40x19
size = 40x20
anchor1 = 100,100
anchor2 = -1,-1
background-color = none
@@ -265,7 +264,7 @@ window "outputwindow"
elem "mebutton"
type = BUTTON
pos = 559,460
size = 40x19
size = 40x20
anchor1 = 100,100
anchor2 = -1,-1
background-color = none
@@ -281,7 +280,6 @@ window "outputwindow"
size = 640x456
anchor1 = 0,0
anchor2 = 100,100
background-color = #ffffff
is-visible = false
is-disabled = true
saved-params = ""

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,
});
}
};