mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-20 07:02:05 +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
|
||||
|
||||
42
html/changelogs/fluffyghost-radialharddel.yml
Normal file
42
html/changelogs/fluffyghost-radialharddel.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: FluffyGhost
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "Resolved (some?) harddels with the radial menu."
|
||||
- backend: "DMDoc'd the show_radial_menu proc."
|
||||
Reference in New Issue
Block a user