Author Topic: Toggle/Button question  (Read 5852 times)

Deepestblue

  • Guest
Toggle/Button question
« on: November 11, 2013, 01:21:49 PM »
Hi Aren,

sorry to bother with a quick question: I am trying to have some kind of mix between a Toggle and a Button. So, I would like to have the functionality of a toggle, but still have the option to have a Hover. I understand that I could add UIButton to my Toggle to have a color-based hover, but I'd need to have an image. Do I need to make the background of the Toggle an UIImageButton or is there another proper way to do it? Thanks for you help!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Toggle/Button question
« Reply #1 on: November 11, 2013, 04:14:47 PM »
Are you talking about visual? Because a widget wizard-created toggle actually has both scripts attached, and the button script is what does highlighting.

Deepestblue

  • Guest
Re: Toggle/Button question
« Reply #2 on: November 11, 2013, 05:11:04 PM »
Yes, the visual. Please see attached pictures from the widget wizards.

The buttonimage gives me an option to choose the hover-image from the atlas and the toggle doesn't.

I'd like a functionality as toggle offers with the only difference that I'd need a hover-image to be able to be picked too so when I move the mouse over the toggle-switch, the hover-image is displayed instead of the the main image (background). UIButton which is on the toggle only offers me tinting.

Hope I expressed it better this time. :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Toggle/Button question
« Reply #3 on: November 12, 2013, 03:11:20 PM »
I think I'll flat out remove the widget wizard in the next update. It's not meant to be used to create your UI as many people seem to assume. It's only meant to create your initial component, which you will then copy/paste around your scene after setting it up how you want.

Deepestblue

  • Guest
Re: Toggle/Button question
« Reply #4 on: November 12, 2013, 04:04:35 PM »
I translate your unpolite answer to my original question simply as "No, it will not work by making the toggle-background an imagebutton, you will have to code something by yourself."
« Last Edit: November 12, 2013, 04:52:47 PM by Deepestblue »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Toggle/Button question
« Reply #5 on: November 13, 2013, 08:07:25 PM »
Sorry, I didn't mean to come off as rude. I was merely remarking that a lot of people seem to misunderstand the use I intended for that gadget, so I will replace it with something better.

dasoccerbomb

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Toggle/Button question
« Reply #6 on: February 19, 2014, 04:01:42 PM »
Deepestblue did you ever find a solution/workaround to have a UIToglle with ability to swap out a sprite when hovered?