mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-29 02:21:44 +00:00
## About The Pull Request 1. Fix action buttons not getting their set tooltip style 2. Radials can now specify what tooltip theme to use on a per-slice basis 3. The "Info" button now has a tooltip showing you the info text <img width="370" height="496" alt="image" src="https://github.com/user-attachments/assets/caff9d97-4ccd-4611-9135-1f39b72f9237" /> ## Why It's Good For The Game 1. Wow this has been broken for some time 2. Allows for theming of radials according to context, like cult radials. Next step would be to allow changing the background but that's for later. 3. You don't need to click it -> look at chat -> look back at the radial, you can just hover over it. A lot more convenient ## Changelog 🆑 Melbert fix: Cult spell action buttons have their unique tooltip style again qol: Radial tooltips can now have unique styles qol: Radial "info" buttons now have tooltips with the info text, meaning you don't have to click on the button and read chat /🆑
31 lines
774 B
Plaintext
31 lines
774 B
Plaintext
/// An info button that, when clicked, puts some text in the user's chat
|
|
/obj/effect/abstract/info
|
|
name = "info"
|
|
icon = 'icons/effects/effects.dmi'
|
|
icon_state = "info"
|
|
|
|
/// What should the info button display when clicked?
|
|
var/info_text
|
|
|
|
/// What theme should the tooltip use?
|
|
var/tooltip_theme
|
|
|
|
/obj/effect/abstract/info/Initialize(mapload, info_text)
|
|
. = ..()
|
|
|
|
if (!isnull(info_text))
|
|
src.info_text = info_text
|
|
|
|
/obj/effect/abstract/info/Click()
|
|
. = ..()
|
|
to_chat(usr, info_text)
|
|
|
|
/obj/effect/abstract/info/MouseEntered(location, control, params)
|
|
. = ..()
|
|
icon_state = "info_hovered"
|
|
openToolTip(usr, src, params, title = name, content = info_text, theme = tooltip_theme)
|
|
|
|
/obj/effect/abstract/info/MouseExited()
|
|
. = ..()
|
|
icon_state = initial(icon_state)
|