Skip to content

Commit

Permalink
feat(status): adds comact status bar with theme support
Browse files Browse the repository at this point in the history
  • Loading branch information
intercepti0n authored Mar 18, 2024
1 parent 442607a commit 19de0f7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
6 changes: 2 additions & 4 deletions code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -519,12 +519,10 @@
if((new_value == GLOB.PREF_BASIC) || (new_value == GLOB.PREF_FULL))
winset(src, "mainwindow", "is-maximized=false;can-resize=false;titlebar=false")
if(new_value == GLOB.PREF_FULL)
winset(src, "mainwindow", "menu=null;statusbar=false")
winset(src, "mainwindow.mainvsplit", "pos=0x0")
winset(src, "mainwindow", "menu=null;")
else
winset(src, "mainwindow", "is-maximized=false;can-resize=true;titlebar=true")
winset(src, "mainwindow", "menu=menu;statusbar=true")
winset(src, "mainwindow.mainvsplit", "pos=3x0")
winset(src, "mainwindow", "menu=menu;")
winset(src, "mainwindow", "is-maximized=true")

/client/verb/fit_viewport()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/human_attackhand.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/mob/living/carbon/human/proc/get_unarmed_attack(mob/living/carbon/human/target, hit_zone)
if(istype(gloves, /obj/item/clothing/gloves/boxing))
var/obj/item/clothing/gloves/boxing/b_gloves = gloves
var/obj/item/clothing/gloves/boxing/b_gloves = gloves
if(istype(b_gloves))
return b_gloves.attack

for(var/datum/unarmed_attack/u_attack in species.unarmed_attacks)
Expand Down
14 changes: 12 additions & 2 deletions interface/skin.dmf
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@ window "mainwindow"
is-default = true
saved-params = "pos;size;is-minimized;is-maximized"
icon = 'icons\\onyxlogo132x32.png'
statusbar = false
macro = "macro"
menu = "menu"
elem "asset_cache_browser"
Expand All @@ -993,7 +994,7 @@ window "mainwindow"
saved-params = ""
elem "mainvsplit"
type = CHILD
pos = 3,0
pos = 0,0
size = 640x420
anchor1 = 0,0
anchor2 = 100,100
Expand Down Expand Up @@ -1043,11 +1044,11 @@ window "mapwindow"
anchor2 = -1,-1
saved-params = "pos;size;is-minimized;is-maximized"
titlebar = false
statusbar = false
can-close = false
can-minimize = false
can-resize = false
is-pane = true
on-status = ".winset \"statusbar.text=[[*]]\" "
elem "map"
type = MAP
pos = 0,0
Expand All @@ -1061,6 +1062,15 @@ window "mapwindow"
on-show = ".winset\"mainwindow.mainvsplit.left=mapwindow\""
on-hide = ".winset\"mainwindow.mainvsplit.left=\""
style=".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .maptext i {font-style: normal; font-size: 6px;} .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .clown { color: #FF69Bf;} .tajaran {color: #803B56;} .skrell {color: #00CED1;} .solcom {color: #22228B;} .com_srus {color: #7c4848;} .zombie {color: #ff0000;} .soghun {color: #228B22;} .vox {color: #AA00AA;} .diona {color: #804000; font-weight: bold;} .trinary {color: #727272;} .metroid {color: #0077AA;} .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; }"
elem "statusbar"
type = LABEL
pos = 0,464
size = 280x16
anchor1 = 0,100
is-visible = true
text = ""
align = left
border = line


window "outputwindow"
Expand Down
4 changes: 4 additions & 0 deletions tgui/packages/tgui-panel/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export const setClientTheme = (name) => {
"outputwindow.text-color": "#000000",
"mainwindow.background-color": "none",
"mainvsplit.background-color": "none",
"statusbar.background-color": "none",
"statusbar.text-color": "#000000",
// Buttons
"changelog.background-color": "none",
"changelog.text-color": "#000000",
Expand Down Expand Up @@ -102,6 +104,8 @@ export const setClientTheme = (name) => {
"outputwindow.text-color": COLOR_DARK_TEXT,
"mainwindow.background-color": COLOR_DARK_BG,
"mainvsplit.background-color": COLOR_DARK_BG,
"statusbar.background-color": COLOR_DARK_BG,
"statusbar.text-color": COLOR_DARK_TEXT,
// Buttons
"changelog.background-color": "#494949",
"changelog.text-color": COLOR_DARK_TEXT,
Expand Down
2 changes: 1 addition & 1 deletion tgui/public/tgui-panel.bundle.js

Large diffs are not rendered by default.

0 comments on commit 19de0f7

Please sign in to comment.