mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 18:22:14 +00:00
Status Bar: Reloaded: Revengeance - Back to Perfection (#57531)
This commit is contained in:
@@ -1925,7 +1925,10 @@
|
|||||||
//Update the screentip to reflect what we're hoverin over
|
//Update the screentip to reflect what we're hoverin over
|
||||||
/atom/MouseEntered(location, control, params)
|
/atom/MouseEntered(location, control, params)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(flags_1 & NO_SCREENTIPS_1 || !usr?.client?.prefs.screentip_pref)
|
// Statusbar
|
||||||
|
status_bar_set_text(usr, name)
|
||||||
|
// Screentips
|
||||||
|
if(!usr?.client?.prefs.screentip_pref || (flags_1 & NO_SCREENTIPS_1))
|
||||||
usr.hud_used.screentip_text.maptext = ""
|
usr.hud_used.screentip_text.maptext = ""
|
||||||
return
|
else
|
||||||
usr.hud_used.screentip_text.maptext = MAPTEXT("<span style='text-align: center'><span style='font-size: 32px'><span style='color:[usr.client.prefs.screentip_color]: 32px'>[name]</span>")
|
usr.hud_used.screentip_text.maptext = MAPTEXT("<span style='text-align: center'><span style='font-size: 32px'><span style='color:[usr.client.prefs.screentip_color]: 32px'>[name]</span>")
|
||||||
|
|||||||
20
code/modules/status_bar/status_bar.dm
Normal file
20
code/modules/status_bar/status_bar.dm
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/*!
|
||||||
|
* Copyright (c) 2021 Aleksej Komarov
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/client/var/status_bar_prev_text = ""
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set status bar text for the provided `target`.
|
||||||
|
*
|
||||||
|
* Target can be either of `/client` or `/mob`.
|
||||||
|
*/
|
||||||
|
/proc/status_bar_set_text(target, text)
|
||||||
|
var/client/client = CLIENT_FROM_VAR(target)
|
||||||
|
// Stop a winset call if text didn't change.
|
||||||
|
if(!client || client.status_bar_prev_text == text)
|
||||||
|
return
|
||||||
|
client.status_bar_prev_text = text
|
||||||
|
winset(client, "mapwindow.status_bar",
|
||||||
|
"text=[url_encode(text)]&is-visible=[!!text]")
|
||||||
@@ -116,6 +116,17 @@ window "mapwindow"
|
|||||||
right-click = true
|
right-click = true
|
||||||
saved-params = "zoom;letterbox;zoom-mode"
|
saved-params = "zoom;letterbox;zoom-mode"
|
||||||
style = ".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .command_headset { font-weight: bold;\tfont-size: 8px; } .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .greentext { color: #00FF00; font-size: 7px; } .redtext { color: #FF0000; font-size: 7px; } .clown { color: #FF69Bf; font-size: 7px; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-size: 6px; }"
|
style = ".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .command_headset { font-weight: bold;\tfont-size: 8px; } .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .greentext { color: #00FF00; font-size: 7px; } .redtext { color: #FF0000; font-size: 7px; } .clown { color: #FF69Bf; font-size: 7px; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-size: 6px; }"
|
||||||
|
elem "status_bar"
|
||||||
|
type = LABEL
|
||||||
|
pos = 0,464
|
||||||
|
size = 280x16
|
||||||
|
anchor1 = 0,100
|
||||||
|
is-visible = false
|
||||||
|
text = ""
|
||||||
|
align = left
|
||||||
|
background-color = #222222
|
||||||
|
text-color = #ffffff
|
||||||
|
border = line
|
||||||
|
|
||||||
window "infowindow"
|
window "infowindow"
|
||||||
elem "infowindow"
|
elem "infowindow"
|
||||||
|
|||||||
@@ -3252,6 +3252,7 @@
|
|||||||
#include "code\modules\station_goals\dna_vault.dm"
|
#include "code\modules\station_goals\dna_vault.dm"
|
||||||
#include "code\modules\station_goals\shield.dm"
|
#include "code\modules\station_goals\shield.dm"
|
||||||
#include "code\modules\station_goals\station_goal.dm"
|
#include "code\modules\station_goals\station_goal.dm"
|
||||||
|
#include "code\modules\status_bar\status_bar.dm"
|
||||||
#include "code\modules\surgery\amputation.dm"
|
#include "code\modules\surgery\amputation.dm"
|
||||||
#include "code\modules\surgery\blood_filter.dm"
|
#include "code\modules\surgery\blood_filter.dm"
|
||||||
#include "code\modules\surgery\bone_mending.dm"
|
#include "code\modules\surgery\bone_mending.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user