Upload files
This commit is contained in:
@@ -53,6 +53,22 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
var/list/hand_slots // /atom/movable/screen/inventory/hand objects, assoc list of "[held_index]" = object
|
||||
var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
|
||||
|
||||
|
||||
///UI for screentips that appear when you mouse over things
|
||||
var/atom/movable/screen/screentip/screentip_text
|
||||
|
||||
/// Whether or not screentips are enabled.
|
||||
/// This is updated by the preference for cheaper reads than would be
|
||||
/// had with a proc call, especially on one of the hottest procs in the
|
||||
/// game (MouseEntered).
|
||||
var/screentips_enabled = TRUE
|
||||
|
||||
/// The color to use for the screentips.
|
||||
/// This is updated by the preference for cheaper reads than would be
|
||||
/// had with a proc call, especially on one of the hottest procs in the
|
||||
/// game (MouseEntered).
|
||||
var/screentip_color
|
||||
|
||||
var/atom/movable/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = FALSE
|
||||
|
||||
@@ -83,6 +99,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
plane_masters["[instance.plane]"] = instance
|
||||
instance.backdrop(mymob)
|
||||
|
||||
screentip_text = new(null, src)
|
||||
static_inventory += screentip_text
|
||||
|
||||
/datum/hud/Destroy()
|
||||
if(mymob.hud_used == src)
|
||||
@@ -117,6 +135,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
|
||||
QDEL_LIST(screenoverlays)
|
||||
mymob = null
|
||||
|
||||
QDEL_NULL(screentip_text)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/atom/movable/screen/screentip
|
||||
icon = null
|
||||
icon_state = null
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
screen_loc = "TOP,LEFT"
|
||||
maptext_height = 480
|
||||
maptext_width = 480
|
||||
maptext = ""
|
||||
|
||||
/atom/movable/screen/screentip/Initialize(mapload, _hud)
|
||||
. = ..()
|
||||
hud = _hud
|
||||
update_view()
|
||||
|
||||
/atom/movable/screen/screentip/proc/update_view(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
if(!hud || !hud.mymob.client.view_size) //Might not have been initialized by now
|
||||
return
|
||||
maptext_width = getviewsize(hud.mymob.client.view_size.getView())[1] * world.icon_size
|
||||
Reference in New Issue
Block a user