Author Topic: Fading Whole Panels  (Read 6067 times)

Teonnyn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Fading Whole Panels
« on: November 07, 2012, 03:33:18 AM »
I know this question has been asked before but I'm utterly stumped. I have two panels I'd like to fade in and out and switch, but I can't figure out how to do multiple types of widgets, custom or not. For example, one panel is a story panel. UISprite and UILabel. The other panel has several UISprites, UILabels, and a Progress Bar as well as a custom widget for inventory.

I don't want to do a hard snap because that never looks all that good when you're dealing with story elements. The goal is to fade in AND out using alpha.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Fading Whole Panels
« Reply #1 on: November 07, 2012, 04:33:25 AM »

Teonnyn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Fading Whole Panels
« Reply #2 on: November 07, 2012, 09:21:23 AM »
How do you use UIPanelAlpha?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Fading Whole Panels
« Reply #3 on: November 07, 2012, 12:07:57 PM »
Attach it to your panel, change the alpha value.

Teonnyn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Fading Whole Panels
« Reply #4 on: November 07, 2012, 12:41:46 PM »
I've been trying that but not entirely sure what to use to change it within code. I did attempt an animation using the UI animation editor, but it only faded part in before stopping at a ghostly transparent stage.
« Last Edit: November 07, 2012, 12:43:45 PM by Teonnyn »

Teonnyn

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Fading Whole Panels
« Reply #5 on: November 07, 2012, 01:56:30 PM »
I don't believe it. The simplest method worked. After trying the tween included with NGUI, then iTween and a few other things.. I did a "*.alpha += 0.01;". It ran perfectly.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Fading Whole Panels
« Reply #6 on: November 07, 2012, 02:34:25 PM »
Occam's Razor. :P