mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[PORT] [TGUI] Color picker (#2670)
## About The Pull Request Port of the color selection TGUI interface from BeeStation/Artea-Station. https://github.com/BeeStation/BeeStation-Hornet/pull/9417 https://github.com/Artea-Station/Artea-Station-Server/pull/525 This implementation includes a port and adaptation to React, as TG has discontinued the use of Inferno. If the Input: Enable TGUI parameter is disabled in the UI Tab, the old color selection mechanism will be used instead. The new interface supports copying the color value in the #343231 format and allows entering a 6-character hexadecimal color code. Additionally, a color palette for selection is available. ## Why It's Good For The Game The TGUI color picker is more adaptable and prettier. ## Proof Of Testing <details> <summary>Screenshots/Videos</summary>    </details> ## Changelog 🆑 itsmeow (original), RimiNosha, Phoenix404 (port) add: Added TGUI-based color palette and replaced all usages of BYOND color palettes with it (TGUI input preferences are still respected). /🆑
This commit is contained in:
@@ -172,7 +172,7 @@
|
||||
var/mob/user = usr
|
||||
var/new_color
|
||||
while(!new_color)
|
||||
new_color = input(user, "Choose a new color for [src]'s flashlight.", "Light Color",light_color) as color|null
|
||||
new_color = tgui_color_picker(user, "Choose a new color for [src]'s flashlight.", "Light Color",light_color) // BUBBERSTATION EDIT: TGUI COLOR PICKER
|
||||
if(!new_color)
|
||||
return
|
||||
if(is_color_dark(new_color, 50) ) //Colors too dark are rejected
|
||||
|
||||
Reference in New Issue
Block a user