mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Kitchen UI Update (#9567)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f9843e1ddf
commit
08156ced8c
28
code/game/objects/effects/info.dm
Normal file
28
code/game/objects/effects/info.dm
Normal file
@@ -0,0 +1,28 @@
|
||||
/// 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"
|
||||
|
||||
mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
|
||||
/// What should the info button display when clicked?
|
||||
var/info_text
|
||||
|
||||
/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"
|
||||
|
||||
/obj/effect/abstract/info/MouseExited()
|
||||
. = ..()
|
||||
icon_state = initial(icon_state)
|
||||
Reference in New Issue
Block a user