1. #1

    Code to change KG panel coloring "onclick"

    Hey all,

    Was curious if anyone knew a command to change the coloring of a KG Panel with the onclick command.

    For example, I use this button to show/hide my map.

    local m1 = Minimap 
    if pressed then 
      if m1:IsShown() then
    I'd like to potentially change the color to, say, grey if hidden, orange if shown. Is it possible via a command, or would it be easier just to have two overlapping panels which alternately show/hide when the map is shown/hidden with the appropriate color?

    Thanks for any help!!

  2. #2
    m1:SetVertexColor(r, b, g, a)
    values range between 0 and 1 (you can use decimals). 0 being black and 1 being white

    r = red. b = blue. g = green. a = alpha

    hope it helps!

  3. #3
    Ty much for the advice. I'll find the correct colors as they're set in the Lua and add that. Much appreciated!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts