mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 11:12:14 +00:00
[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:
@@ -12,9 +12,6 @@
|
|||||||
///how many colour priority levels there are.
|
///how many colour priority levels there are.
|
||||||
#define COLOUR_PRIORITY_AMOUNT 4
|
#define COLOUR_PRIORITY_AMOUNT 4
|
||||||
|
|
||||||
#define COLOR_INPUT_DISABLED "#F0F0F0"
|
|
||||||
#define COLOR_INPUT_ENABLED "#D3B5B5"
|
|
||||||
|
|
||||||
#define COLOR_DARKMODE_BACKGROUND "#202020"
|
#define COLOR_DARKMODE_BACKGROUND "#202020"
|
||||||
#define COLOR_DARKMODE_DARKBACKGROUND "#171717"
|
#define COLOR_DARKMODE_DARKBACKGROUND "#171717"
|
||||||
#define COLOR_DARKMODE_TEXT "#a4bad6"
|
#define COLOR_DARKMODE_TEXT "#a4bad6"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ SUBSYSTEM_DEF(input)
|
|||||||
"Any" = "\"KeyDown \[\[*\]\]\"",
|
"Any" = "\"KeyDown \[\[*\]\]\"",
|
||||||
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
|
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
|
||||||
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
|
"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",
|
"Escape" = "Reset-Held-Keys",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -175,6 +175,11 @@
|
|||||||
/// Messages currently seen by this client
|
/// Messages currently seen by this client
|
||||||
var/list/seen_messages
|
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
|
/// datum wrapper for client view
|
||||||
var/datum/view_data/view_size
|
var/datum/view_data/view_size
|
||||||
|
|
||||||
|
|||||||
@@ -964,12 +964,10 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
|||||||
|
|
||||||
if (hotkeys)
|
if (hotkeys)
|
||||||
// If hotkey mode is enabled, then clicking the map will automatically
|
// If hotkey mode is enabled, then clicking the map will automatically
|
||||||
// unfocus the text bar. This removes the red color from the text bar
|
// unfocus the text bar.
|
||||||
// so that the visual focus indicator matches reality.
|
winset(src, null, "input.focus=false")
|
||||||
winset(src, null, "input.background-color=[COLOR_INPUT_DISABLED]")
|
|
||||||
|
|
||||||
else
|
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)
|
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))
|
SEND_SOUND(usr, sound(null))
|
||||||
tgui_panel?.stop_music()
|
tgui_panel?.stop_music()
|
||||||
SSblackbox.record_feedback("nested tally", "preferences_verb", 1, list("Stop Self Sounds"))
|
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")
|
||||||
|
|||||||
@@ -38,9 +38,4 @@
|
|||||||
window.mouse_event_macro_set = FALSE
|
window.mouse_event_macro_set = FALSE
|
||||||
window.set_mouse_macro()
|
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()
|
update_special_keybinds()
|
||||||
|
|||||||
@@ -232,14 +232,13 @@ window "outputwindow"
|
|||||||
size = 517x20
|
size = 517x20
|
||||||
anchor1 = 0,100
|
anchor1 = 0,100
|
||||||
anchor2 = 100,100
|
anchor2 = 100,100
|
||||||
background-color = #d3b5b5
|
|
||||||
is-default = true
|
is-default = true
|
||||||
border = sunken
|
border = line
|
||||||
saved-params = "command"
|
saved-params = "command"
|
||||||
elem "oocbutton"
|
elem "oocbutton"
|
||||||
type = BUTTON
|
type = BUTTON
|
||||||
pos = 599,460
|
pos = 599,460
|
||||||
size = 40x19
|
size = 40x20
|
||||||
anchor1 = 100,100
|
anchor1 = 100,100
|
||||||
anchor2 = -1,-1
|
anchor2 = -1,-1
|
||||||
background-color = none
|
background-color = none
|
||||||
@@ -252,7 +251,7 @@ window "outputwindow"
|
|||||||
elem "saybutton"
|
elem "saybutton"
|
||||||
type = BUTTON
|
type = BUTTON
|
||||||
pos = 519,460
|
pos = 519,460
|
||||||
size = 40x19
|
size = 40x20
|
||||||
anchor1 = 100,100
|
anchor1 = 100,100
|
||||||
anchor2 = -1,-1
|
anchor2 = -1,-1
|
||||||
background-color = none
|
background-color = none
|
||||||
@@ -265,7 +264,7 @@ window "outputwindow"
|
|||||||
elem "mebutton"
|
elem "mebutton"
|
||||||
type = BUTTON
|
type = BUTTON
|
||||||
pos = 559,460
|
pos = 559,460
|
||||||
size = 40x19
|
size = 40x20
|
||||||
anchor1 = 100,100
|
anchor1 = 100,100
|
||||||
anchor2 = -1,-1
|
anchor2 = -1,-1
|
||||||
background-color = none
|
background-color = none
|
||||||
@@ -281,7 +280,6 @@ window "outputwindow"
|
|||||||
size = 640x456
|
size = 640x456
|
||||||
anchor1 = 0,0
|
anchor1 = 0,0
|
||||||
anchor2 = 100,100
|
anchor2 = 100,100
|
||||||
background-color = #ffffff
|
|
||||||
is-visible = false
|
is-visible = false
|
||||||
is-disabled = true
|
is-disabled = true
|
||||||
saved-params = ""
|
saved-params = ""
|
||||||
|
|||||||
@@ -79,6 +79,8 @@ export const setClientTheme = (name) => {
|
|||||||
'asset_cache_browser.text-color': '#000000',
|
'asset_cache_browser.text-color': '#000000',
|
||||||
'tooltip.background-color': 'none',
|
'tooltip.background-color': 'none',
|
||||||
'tooltip.text-color': '#000000',
|
'tooltip.text-color': '#000000',
|
||||||
|
'input.background-color': '#FFFFFF',
|
||||||
|
'input.text-color': '#000000',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (name === 'dark') {
|
if (name === 'dark') {
|
||||||
@@ -129,6 +131,8 @@ export const setClientTheme = (name) => {
|
|||||||
'asset_cache_browser.text-color': COLOR_DARK_TEXT,
|
'asset_cache_browser.text-color': COLOR_DARK_TEXT,
|
||||||
'tooltip.background-color': COLOR_DARK_BG,
|
'tooltip.background-color': COLOR_DARK_BG,
|
||||||
'tooltip.text-color': COLOR_DARK_TEXT,
|
'tooltip.text-color': COLOR_DARK_TEXT,
|
||||||
|
'input.background-color': COLOR_DARK_BG_DARKER,
|
||||||
|
'input.text-color': COLOR_DARK_TEXT,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user