mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 23:17:28 +01:00
ports tgui color input from bubbers (#16934)
* ports tgui color input from monkeystation * . * push that real quick * . * . * cleanup * fix for 516 * port bubbers pre set selection * also this * allow 20 saved states * oups * regex replace * urg * use the update by type * . * . * highlight? * larger? * fix those * keep anyone below 516 on old style
This commit is contained in:
@@ -34,6 +34,6 @@
|
||||
|
||||
/obj/item/grenade/smokebomb/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/multitool))
|
||||
var/new_smoke_color = input(user, "Choose a color for the smoke:", "Smoke Color", smoke_color) as color|null
|
||||
var/new_smoke_color = tgui_color_picker(user, "Choose a color for the smoke:", "Smoke Color", smoke_color)
|
||||
if(new_smoke_color)
|
||||
smoke_color = new_smoke_color
|
||||
|
||||
@@ -188,10 +188,12 @@
|
||||
return
|
||||
|
||||
if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes")
|
||||
var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null
|
||||
var/energy_color_input = tgui_color_picker(user,"","Choose Energy Color",lcolor)
|
||||
if(energy_color_input)
|
||||
lcolor = sanitize_hexcolor(energy_color_input)
|
||||
update_icon()
|
||||
if(active)
|
||||
set_light(lrange, lpower, lcolor)
|
||||
|
||||
/obj/item/melee/energy/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
to_chat(user, span_warning("You can't do that right now!"))
|
||||
return
|
||||
if(tgui_alert(user, "Are you sure you want to recolor your shield?", "Confirm Recolor", list("Yes", "No")) == "Yes")
|
||||
var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null
|
||||
var/energy_color_input = tgui_color_picker(user,"","Choose Energy Color",lcolor)
|
||||
if(energy_color_input)
|
||||
lcolor = sanitize_hexcolor(energy_color_input)
|
||||
update_icon()
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
if(usr.stat || usr.restrained() || usr.incapacitated())
|
||||
return
|
||||
|
||||
var/new_color = input(usr, "Pick a new color", "Wallet Color", color) as color|null
|
||||
var/new_color = tgui_color_picker(usr, "Pick a new color", "Wallet Color", color)
|
||||
|
||||
if(new_color && (new_color != color))
|
||||
color = new_color
|
||||
|
||||
Reference in New Issue
Block a user