Hello Guest

Author Topic: Button toggle  (Read 3607 times)

k3ch0ng

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Button toggle
« on: November 27, 2012, 02:52:28 pm »
Is there like an easy way to do this ? Just want to make the button look like its been pressed.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Button toggle
« Reply #1 on: November 27, 2012, 06:20:45 pm »
It doesn't support it out of the box, but you can change it quite easily if you'd like to.

Make a copy of the tk2dbuton script, and were the ButtonPressedEvent() is called...
swap buttonUpSpriteId & buttonDownSpriteId, also flip an internal toggled state.
That is more or less it.