mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Adds tgui color picker (#94313)
## About The Pull Request Ports https://github.com/Monkestation/Monkestation2.0/pull/1231 which is a port of https://github.com/BeeStation/BeeStation-Hornet/pull/9417 which is a port of https://github.com/omgovich/react-colorful/ Also a port of https://github.com/effigy-se/effigy/blob/main/tgui/packages/tgui/interfaces/effigy/ColorPickerModal.tsx for hex color presets Admin stuff got excluded (pref-like picker, filterrific, get-variables) https://github.com/user-attachments/assets/7069bef9-81cd-4636-bf68-cbad227ef09e ## Why It's Good For The Game It's one of the only input areas that still doesn't use TGUI, leaving darkmode players flashbanged every single time a color selection UI is opened. This is also just visually great and I think a big upgrade from byond's. ## Changelog 🆑 omgovich, itsmeow, Absolucy, JohnFulpWillard, jlsnow301, TealSeer, lessthnthree add: Color selection panels now use TGUI (If you have TGUI enabled in settings). /🆑
This commit is contained in:
@@ -166,12 +166,12 @@
|
||||
|
||||
if("pick_color")
|
||||
var/group = params["color_index"]
|
||||
var/new_color = input(
|
||||
var/new_color = tgui_color_picker(
|
||||
usr,
|
||||
"Choose color for greyscale color group [group]:",
|
||||
"Greyscale Modification Menu",
|
||||
split_colors[group]
|
||||
) as color|null
|
||||
)
|
||||
if(new_color)
|
||||
split_colors[group] = new_color
|
||||
queue_refresh()
|
||||
|
||||
@@ -256,7 +256,7 @@ GLOBAL_LIST_EMPTY(light_debugged_atoms)
|
||||
if("set_on")
|
||||
parent.set_light(l_on = params["value"])
|
||||
if("change_color")
|
||||
var/chosen_color = input(ui.user, "Pick new color", "[parent]", parent.light_color) as color|null
|
||||
var/chosen_color = tgui_color_picker(ui.user, "Pick new color", "[parent]", parent.light_color)
|
||||
if(chosen_color)
|
||||
parent.set_light(l_color = chosen_color)
|
||||
if("set_power")
|
||||
|
||||
Reference in New Issue
Block a user