ports tgui color input from bubbers (#16934)

* ports tgui color input from monkeystation

* .

* push that real quick

* .

* .

* cleanup

* fix for 516

* port bubbers pre set selection

* also this

* allow 20 saved states

* oups

* regex replace

* urg

* use the update by type

* .

* .

* highlight?

* larger?

* fix those

* keep anyone below 516 on old style
This commit is contained in:
Kashargul
2025-01-22 00:27:45 +01:00
committed by GitHub
parent 7266c4c5dc
commit c0e339b1ea
56 changed files with 1913 additions and 108 deletions
@@ -83,7 +83,7 @@
for(var/channel in 1 to ear_secondary_style.get_color_channel_count())
var/channel_name = GLOB.fancy_sprite_accessory_color_channel_names[channel]
var/default = LAZYACCESS(ear_secondary_colors, channel) || "#ffffff"
var/new_color = input(usr, "Pick [channel_name]", "Ear Color ([channel_name])", default) as color | null
var/new_color = tgui_color_picker(usr, "Pick [channel_name]", "Ear Color ([channel_name])", default)
new_colors += new_color || default
update_hair()
@@ -1274,7 +1274,7 @@
return
if(choice == "Color") //Easy way to set color so we don't bloat up the menu with even more buttons.
var/new_color = input(src, "Choose a color to set your appendage to!", "", appendage_color) as color|null
var/new_color = tgui_color_picker(src, "Choose a color to set your appendage to!", "", appendage_color)
if(new_color)
appendage_color = new_color
if(choice == "Functionality") //Easy way to set color so we don't bloat up the menu with even more buttons.
+1 -1
View File
@@ -607,7 +607,7 @@ var/list/ai_verbs_default = list(
switch(choice)
if("Color")
input = input("Choose a color:", "Hologram Color", holo_color) as color|null
input = tgui_color_picker("Choose a color:", "Hologram Color", holo_color)
if(input)
holo_color = input
@@ -236,7 +236,7 @@
else
to_chat(src, span_warning("Your selected chassis eye color can not be modified. The color you pick will only apply to supporting chassis and your card screen."))
var/new_eye_color = input(src, "Choose your character's eye color:", "Eye Color") as color|null
var/new_eye_color = tgui_color_picker(src, "Choose your character's eye color:", "Eye Color")
if(new_eye_color)
eye_color = new_eye_color
update_icon()
@@ -254,7 +254,7 @@
if(!choice)
return
if(choice == "Color")
var/new_color = input(usr, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) as color|null
var/new_color = tgui_color_picker(usr, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color)
if(new_color)
selected_color = new_color
to_chat(user, span_filter_notice("The light color has been changed."))
@@ -28,7 +28,7 @@
set category = "Abilities.Silicon"
set src in usr
var/new_pupil_color = input(usr, "Select a pupil colour.", "Pupil Colour Selection") as color|null
var/new_pupil_color = tgui_color_picker(usr, "Select a pupil colour.", "Pupil Colour Selection")
if(usr.incapacitated() || QDELETED(usr) || QDELETED(src) || loc != usr)
return
@@ -291,7 +291,7 @@
if(picked_color)
to_chat(src, span_notice("You have already picked a color! If you picked the wrong color, ask an admin to change your picked_color variable to 0."))
return
var/newcolor = input(usr, "Choose a color.", "", color) as color|null
var/newcolor = tgui_color_picker(usr, "Choose a color.", "", color)
if(newcolor)
color = newcolor
picked_color = TRUE
@@ -215,7 +215,7 @@
if(picked_color)
to_chat(src, span_notice("You have already picked a color! If you picked the wrong color, ask an admin to change your picked_color variable to 0."))
return
var/newcolor = input(usr, "Choose a color.", "", color) as color|null
var/newcolor = tgui_color_picker(usr, "Choose a color.", "", color)
if(newcolor)
color = newcolor
picked_color = TRUE
@@ -249,7 +249,7 @@
set name = "Pick Color"
set category = "Abilities.Settings"
set desc = "You can set your color!"
var/newcolor = input(usr, "Choose a color.", "", color) as color|null
var/newcolor = tgui_color_picker(usr, "Choose a color.", "", color)
if(newcolor)
color = newcolor
chosen_color = newcolor
@@ -95,7 +95,7 @@
set desc = "Customize your eyes and abdomen glow color."
set category = "Abilities.Sect Drone"
var/new_color = input(src, "Please select color.", "Glow Color", custom_eye_color) as color|null
var/new_color = tgui_color_picker(src, "Please select color.", "Glow Color", custom_eye_color)
if(new_color)
custom_eye_color = new_color
remove_eyes()
@@ -96,7 +96,7 @@
set desc = "Customize your eyes and abdomen glow color."
set category = "Abilities.Sect Queen"
var/new_color = input(src, "Please select color.", "Glow Color", custom_eye_color) as color|null
var/new_color = tgui_color_picker(src, "Please select color.", "Glow Color", custom_eye_color)
if(new_color)
custom_eye_color = new_color
remove_eyes()