TGUI Color Picker (#26326)

* Init

* Implements `tgui_input_color`

* Implements most color wheel conversions to TGUI

* Iteration two, went over titles and made sure most color inputs are functional.

* Implements preferences for large buttons, swapped buttons, and disabled TGUI

* Iteration three... the weird ones. (as null|color)

* Removes `as color|null` and `as null|color`

* Merge conflict resolution, again.

* Color input bundle and panel bundle

* CSLint being picky.

* Picky `while ()` instead of `while()`

* Apply suggestions from code review

Co-authored-by: Aylong <69762909+AyIong@users.noreply.github.com>
Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com>

* WIP

* de-bri'ish colour into color

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com>

* Aylong review applied.
- Removed an extra space in machine.dm
- UI_STATE

+ Runechat color now uses TGUI_INPUT_COLOR

* Apply suggestions from code review

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com>

* Removes an unintentional space to `paradise.scss`

* Update code/modules/tgui/tgui_input/color_input.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com>

* Adds "is_color" regex from TG

* Fixes a few conflicting files

* TGUI Merge conflict moment v3

* V4?

* V5....

* God please don't explode. Builds TGUI like the linter wants.

* Update code/modules/tgui/tgui_input/color_input.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com>

* Rebuilds TGUI, again <3

* Lint be damned

---------

Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com>
Co-authored-by: Aylong <69762909+AyIong@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Spaghetti-bit
2024-11-07 21:24:45 +00:00
committed by GitHub
co-authored by Contrabang Aylong Burzah
parent d0dc432024
commit afd52f006a
27 changed files with 1711 additions and 301 deletions
@@ -152,11 +152,11 @@
if(!head_organ)
return
if(!robohead.is_monitor) //If they've got a prosthetic head and it isn't a monitor, they've no screen to adjust. Instead, let them change the colour of their optics!
var/optic_colour = input(H, "Select optic colour", H.m_colours["head"]) as color|null
var/optic_colour = tgui_input_color(H, "Please select an optic color", "Select Optic Color", H.m_colours["head"])
if(H.incapacitated(TRUE, TRUE))
to_chat(H, "<span class='warning'>You were interrupted while changing the colour of your optics.</span>")
to_chat(H, "<span class='warning'>You were interrupted while changing the color of your optics.</span>")
return
if(optic_colour)
if(!isnull(optic_colour))
H.change_markings(optic_colour, "head")
else if(robohead.is_monitor) //Means that the character's head is a monitor (has a screen). Time to customize.
@@ -175,7 +175,7 @@
var/new_style = tgui_input_list(H, "Select a monitor display", "Monitor Display", hair)
if(!new_style)
return
var/new_color = input("Please select hair color.", "Monitor Color", head_organ.hair_colour) as null|color
var/new_color = tgui_input_color(H, "Please select hair color.", "Monitor Color", head_organ.hair_colour)
if(H.incapacitated(TRUE, TRUE))
to_chat(H, "<span class='warning'>You were interrupted while changing your monitor display.</span>")
@@ -183,7 +183,7 @@
if(new_style)
H.change_hair(new_style, 1) // The 1 is to enable custom sprites
if(new_color)
if(!isnull(new_color))
H.change_hair_color(new_color)
/datum/species/machine/spec_electrocute_act(mob/living/carbon/human/H, shock_damage, source, siemens_coeff, flags)