Radials, Tooltips, RCD and Borg Selection (#8710)

This commit is contained in:
Matt Atlas
2020-04-24 17:00:30 +02:00
committed by GitHub
parent 278bd03455
commit 15bcc0f6d5
23 changed files with 923 additions and 63 deletions
@@ -30,7 +30,8 @@
"html_UI_style",
"skin_theme",
"ooccolor",
"clientfps"
"clientfps",
"tooltip_style"
),
"args" = list("ckey")
)
@@ -49,6 +50,7 @@
"skin_theme",
"ooccolor",
"clientfps",
"tooltip_style",
"ckey" = 1
)
)
@@ -62,7 +64,8 @@
"html_UI_style" = pref.html_UI_style,
"skin_theme" = pref.skin_theme,
"ooccolor" = pref.ooccolor,
"clientfps" = pref.clientfps
"clientfps" = pref.clientfps,
"tooltip_style" = pref.tooltip_style
)
/datum/category_item/player_setup_item/player_global/ui/sanitize_preferences()
@@ -81,6 +84,7 @@
dat += "<b>Custom UI</b> (recommended for White UI):<br>"
dat += "-Color: <a href='?src=\ref[src];select_color=1'><b>[pref.UI_style_color]</b></a> [HTML_RECT(pref.UI_style_color)] - <a href='?src=\ref[src];reset=ui'>reset</a><br>"
dat += "-Alpha(transparency): <a href='?src=\ref[src];select_alpha=1'><b>[pref.UI_style_alpha]</b></a> - <a href='?src=\ref[src];reset=alpha'>reset</a><br>"
dat += "<b>Tooltip Style:</b> <a href='?src=\ref[src];select_tooltip_style=1'><b>[pref.tooltip_style]</b></a><br>"
dat += "<b>HTML UI Style:</b> <a href='?src=\ref[src];select_html=1'><b>[pref.html_UI_style]</b></a><br>"
dat += "<b>Main UI Style:</b> <a href='?src=\ref[src];select_skin_theme=1'><b>[pref.skin_theme]</b></a><br>"
dat += "-FPS: <a href='?src=\ref[src];select_fps=1'><b>[pref.clientfps]</b></a> - <a href='?src=\ref[src];reset=fps'>reset</a><br>"
@@ -132,16 +136,27 @@
pref.ooccolor = new_ooccolor
return TOPIC_REFRESH
else if ("select_fps")
#if DM_VERSION >= 511
var/desiredfps = input(user, "Choose your desired fps.\n(0 = synced with server tick rate (currently:[world.fps]))", "Character Preference") as null|num
pref.clientfps = sanitize_integer(desiredfps, 0, 1000, initial(pref.clientfps))
user.client.fps = pref.clientfps
#else
to_user_chat("\nThis server does not currently support client side fps. You can set now for when it does.")
#endif // DM_VERSION >= 511
else if(href_list["select_fps"])
var/version_message
if (user.client && user.client.byond_version < 511)
version_message = "\nYou need to be using byond version 511 or later to take advantage of this feature, your version of [user.client.byond_version] is too low"
if (world.byond_version < 511)
version_message += "\nThis server does not currently support client side fps. You can set now for when it does."
var/new_fps = input(user, "Choose your desired fps.[version_message]\n(0 = synced with server tick rate (currently:[world.fps]))", "Global Preference") as num|null
if (isnum(new_fps) && CanUseTopic(user))
pref.clientfps = Clamp(new_fps, 0, 1000)
var/mob/target_mob = preference_mob()
if(target_mob && target_mob.client)
target_mob.client.apply_fps(pref.clientfps)
return TOPIC_REFRESH
else if(href_list["select_tooltip_style"])
var/tooltip_style_new = input(user, "Choose a new tooltip style.", "Global Preference", pref.tooltip_style) as null|anything in all_tooltip_styles
if(!tooltip_style_new || !CanUseTopic(user))
return TOPIC_NOACTION
pref.tooltip_style = tooltip_style_new
return TOPIC_REFRESH
else if(href_list["reset"])
switch(href_list["reset"])