mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +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:
@@ -226,7 +226,7 @@
|
||||
if("select_lipstick_color")
|
||||
var/list/their_loadout = manager.preferences.read_preference(/datum/preference/loadout)
|
||||
var/old_color = their_loadout?[item_path]?[INFO_GREYSCALE] || /obj/item/lipstick::lipstick_color
|
||||
var/chosen = input(user, "Pick a lipstick color.", "Pick a color", old_color) as color|null
|
||||
var/chosen = tgui_color_picker(user, "Pick a lipstick color.", "Pick a color", old_color)
|
||||
their_loadout = manager.preferences.read_preference(/datum/preference/loadout) // after sleep: sanity check
|
||||
if(their_loadout?[item_path]) // Validate they still have it equipped
|
||||
their_loadout[item_path][INFO_GREYSCALE] = chosen
|
||||
|
||||
Reference in New Issue
Block a user