mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
## About The Pull Request This is my second contribution to the move towards removing the stat panel (first one being https://github.com/tgstation/tgstation/pull/90572 ) This moves the info buttons at the top right of the game's screen (Changelog, Rules, Wiki, etc) to the Escape menu, except for Fullscreen which is now a pref instead. This means you can set Fullscreen to be on permanently and every launch will automatically fullscreen you (the viewport will be a little off because it only fixes it once initialization is complete). This follows through rounds and auto updates if you set your game to fullscreen with the OOC button or F11, so players will learn about the pref after playing a round with fullscreen enabled. What the game now looks like ##### Alt ideas for sprites: Changelog can be a newspaper and Forums can be a newscaster https://github.com/user-attachments/assets/7871a226-1e0b-410d-a690-88f3616bebb0 This is something I wanted to do since the Esc menu was added but just never got around to it, but here it is. ## Why It's Good For The Game These buttons don't warrant being in the player's face 24/7 and since we've want to remove the stat panel and this has to be somewhere, I thought it would be a better fit in the Escape menu. It helps make the Esc menu the tool players use to access their OOC tools and overall I think improves the appearance of the game's screen to something more like an actual game would look like, especially when our comparison is SS14. ## Changelog 🆑 qol: Info buttons previously at the top right of your screen (Changelog, wiki, forums) is now in the Escape menu. qol: Fullscreen is now a preferences and will follow you through rounds. /🆑
63 lines
1.8 KiB
Plaintext
63 lines
1.8 KiB
Plaintext
/// A helper instance that will handle adding objects from the client's screen
|
|
/// to easily remove from later.
|
|
/datum/screen_object_holder
|
|
VAR_PRIVATE
|
|
client/client
|
|
list/screen_objects = list()
|
|
list/protected_screen_objects = list()
|
|
|
|
/datum/screen_object_holder/New(client/client)
|
|
ASSERT(istype(client))
|
|
|
|
src.client = client
|
|
|
|
RegisterSignal(client, COMSIG_QDELETING, PROC_REF(on_parent_qdel))
|
|
|
|
/datum/screen_object_holder/Destroy()
|
|
clear()
|
|
client = null
|
|
|
|
return ..()
|
|
|
|
/// Gives the screen object to the client, qdel'ing it when it's cleared
|
|
/datum/screen_object_holder/proc/give_screen_object(atom/screen_object)
|
|
ASSERT(istype(screen_object))
|
|
|
|
screen_objects += screen_object
|
|
client?.screen += screen_object
|
|
return screen_object
|
|
|
|
/// Gives the screen object to the client, but does not qdel it when it's cleared
|
|
/datum/screen_object_holder/proc/give_protected_screen_object(atom/screen_object)
|
|
ASSERT(istype(screen_object))
|
|
|
|
protected_screen_objects += screen_object
|
|
client?.screen += screen_object
|
|
return screen_object
|
|
|
|
/datum/screen_object_holder/proc/remove_screen_object(atom/screen_object)
|
|
ASSERT(istype(screen_object))
|
|
ASSERT((screen_object in screen_objects) || (screen_object in protected_screen_objects))
|
|
|
|
screen_objects -= screen_object
|
|
protected_screen_objects -= screen_object
|
|
client?.screen -= screen_object
|
|
qdel(screen_object)
|
|
|
|
/datum/screen_object_holder/proc/clear()
|
|
client?.screen -= screen_objects
|
|
client?.screen -= protected_screen_objects
|
|
|
|
QDEL_LIST(screen_objects)
|
|
protected_screen_objects.Cut()
|
|
|
|
// We don't qdel here, as clients leaving should not be a concern for consumers
|
|
// Consumers ought to be qdel'ing this on their own Destroy, but we shouldn't
|
|
// hard del because they aren't watching for the client, that's our job.
|
|
/datum/screen_object_holder/proc/on_parent_qdel()
|
|
PRIVATE_PROC(TRUE)
|
|
SIGNAL_HANDLER
|
|
|
|
clear()
|
|
client = null
|