mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-22 08:01:06 +00:00
Radial Menu Harddels (partial?) resolution (#17096)
* sdfsdv * forgot the * for args in dmdoc
This commit is contained in:
@@ -280,14 +280,32 @@ var/global/list/radial_menus = list()
|
||||
/datum/radial_menu/Destroy()
|
||||
Reset()
|
||||
hide()
|
||||
close_button.parent = null
|
||||
menu_holder.vis_contents = null
|
||||
elements -= src
|
||||
|
||||
for(var/obj/screen/radial/slice/possibly_our_child in elements)
|
||||
if(possibly_our_child.parent == src)
|
||||
possibly_our_child.parent = null
|
||||
|
||||
QDEL_NULL(menu_holder)
|
||||
QDEL_NULL(close_button)
|
||||
QDEL_NULL(custom_check_callback)
|
||||
return ..()
|
||||
|
||||
/*
|
||||
Presents radial menu to user anchored to anchor (or user if the anchor is currently in users screen)
|
||||
Choices should be a list where list keys are movables or text used for element names and return value
|
||||
and list values are movables/icons/images used for element icons
|
||||
*/
|
||||
/**
|
||||
* Presents a radial menu to an user, over an anchor point
|
||||
*
|
||||
* * user - A `/mob` whose user to show the radial menu to
|
||||
* * anchor - An `/atom` to where to overlay the radial menu to
|
||||
* * choices - A list of choices, where the list keys are movables or text used for element names and return value, and values are movables/icons/images used for element icons
|
||||
* * uniqueid - An unique ID to identify the radial menu with
|
||||
* * radius - A radius, aka how big the radial menu is
|
||||
* * custom_check - A `/datum/callback` to invoke, to validate that the menu should still be waited on
|
||||
* * require_near - Boolean, if the menu should disappear when the user is not in range anymore
|
||||
* * tooltips - Boolean, if to show tooltips to the user
|
||||
* * no_repeat_close - Boolean, if an unique ID is used and this is set, close the menu instead of repeating the displaying of it
|
||||
*/
|
||||
/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE, no_repeat_close = FALSE)
|
||||
if(!user || !anchor || !length(choices))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user