Welcome,
Guest
. Please
login
or
register
.
April 27, 2026, 04:50:08 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UISlider and FGWidget set to enabled
« previous
next »
Print
Pages: [
1
]
Author
Topic: UISlider and FGWidget set to enabled (Read 5384 times)
zentuit
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 12
UISlider and FGWidget set to enabled
«
on:
July 03, 2012, 02:10:28 PM »
I'm having an issue with using UISliders as health bars. Each unit gets a UISlider attached when spawned. However if the spawn point is out of the visible camera, then the foreground widget pops up in the middle of the screen.
My code is an extension of
http://www.tasharen.com/?topic=creating-a-ui-sprite-on-the-fly
.
The cause is that the UISlider Start calls Set which in turn enables the FGWidget.
Anyone know how to hook in and reset the enabled flag after the UISlider Start call?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UISlider and FGWidget set to enabled
«
Reply #1 on:
July 03, 2012, 02:37:35 PM »
Just disable the UISlider script if it's off-screen.
Logged
zentuit
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 12
Re: UISlider and FGWidget set to enabled
«
Reply #2 on:
July 03, 2012, 02:57:08 PM »
Doh, UISlider isn't a UIWidget.
I'm fixed now, thanks.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UISlider and FGWidget set to enabled