|
Post by Exilereven on Dec 27, 2020 0:01:53 GMT
I'm hoping someone knows a little more than I do cause I can't quit seem to figure out how to get this string back to s natural hex number that is accepted by setHighlightStyle()
here is my code:
local _design = { { id = "00" }, { id = "01"}, { id = "02" }, { id = "03" }, { id = "04" }, { id = "05" }, { id = "06" }, { id = "07" }, { id = "08" }, { id = "09" }, }
left = Region(0,0, 400, 640) -- ====== for i,img in ipairs(_design) do print(img.id) local _new = ("0x" ..img.id.. "FF00FF") -- which should make it a string "0x00FF00FF" which setHighlightStyle wilk not accept -- now, if i put in each full argb color manually it works perfect, how can i make the string -- turn back into a natural hex number? print(_new) --print out the hex number perfectly but does not work with setHighlightStyle setHighlightStyle(_new,true) left:highlight() left:highlightOff() end
why won't it accept the string number but will accept the exact same number if I out it in manually as a natural hex written number. what am I doing wrong here? please and thanks for any advice.
|
|
|
Post by AnkuLua on Dec 27, 2020 14:46:40 GMT
setHighlightStyle(0 + _new,true)
|
|
|
Post by Exilereven on Dec 27, 2020 19:39:49 GMT
setHighlightStyle(0 + _new,true) got it, thank you.
|
|