mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
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:
@@ -251,8 +251,8 @@
|
||||
/obj/item/mod/module/flashlight/configure_edit(key, value)
|
||||
switch(key)
|
||||
if("light_color")
|
||||
value = input(usr, "Pick new light color", "Flashlight Color") as color|null
|
||||
if(!value)
|
||||
value = tgui_input_color(usr, "Pick new light color", "Flashlight Color", light_color)
|
||||
if(isnull(value))
|
||||
return
|
||||
if(is_color_dark(value, 50))
|
||||
to_chat(mod.wearer, ("<span class='warning'>That is too dark</span>"))
|
||||
|
||||
Reference in New Issue
Block a user