mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +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:
@@ -137,7 +137,7 @@
|
||||
/mob/living/basic/guardian/proc/guardian_recolour()
|
||||
if (isnull(client))
|
||||
return
|
||||
var/chosen_guardian_colour = input(src, "What would you like your colour to be?", "Choose Your Colour", "#ffffff") as color|null
|
||||
var/chosen_guardian_colour = tgui_color_picker(src, "What would you like your colour to be?", "Choose Your Colour", COLOR_WHITE)
|
||||
if (isnull(chosen_guardian_colour)) //redo proc until we get a color
|
||||
to_chat(src, span_warning("Invalid colour, please try again."))
|
||||
return guardian_recolour()
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
/// Select scale colour with the colour picker
|
||||
/mob/living/basic/space_dragon/proc/select_colour()
|
||||
chosen_colour = input(src, "What colour would you like to be?" ,"Colour Selection", COLOR_WHITE) as color|null
|
||||
chosen_colour = tgui_color_picker(src, "What colour would you like to be?" ,"Colour Selection", COLOR_WHITE)
|
||||
if(!chosen_colour) // Redo proc until we get a color
|
||||
to_chat(src, span_warning("Not a valid colour, please try again."))
|
||||
select_colour()
|
||||
|
||||
Reference in New Issue
Block a user