XWidgetSoft Forum https://bbs.xwidget.com/ |
|
Help with options button https://bbs.xwidget.com/viewtopic.php?f=7&t=2115 |
Page 1 of 1 |
Author: | Nutu [ September 11th, 2012, 11:20 am ] |
Post subject: | Help with options button |
So, I have this script to show/hide some elements but it won't run. In the debug window it won't show any errors. Any idea what it might be? Code: function options_panicOnClick(Sender)
{ if(emergency_shutdown.Visible == true) { options_panic.Text = "Panic Button - OFF"; options_panic.Background.SolidColor.Color = rgba(194,44,44,170); emergency_background.Visible = false; emergency_shutdown.Visible = false; } else { options_panic.Text = "Panic Button - ON"; options_panic.Background.SolidColor.Color = rgba(43,188,61,170); emergency_background.Visible = true; emergency_shutdown.Visible = true; } } |
Author: | qiancang [ September 11th, 2012, 6:27 pm ] |
Post subject: | Re: Help with options button |
if(emergency_shutdown.Visible==true) would not run, if(emergency_shutdown.Visible) or if(emergency_shutdown.Visible==-1) is ok . Code: function options_panicOnClick(Sender)
{ if(emergency_shutdown.Visible) { options_panic.Text = "Panic Button - OFF"; options_panic.Background.SolidColor.Color = rgba(194,44,44,170); emergency_background.Visible = false; emergency_shutdown.Visible = false; } else { options_panic.Text = "Panic Button - ON"; options_panic.Background.SolidColor.Color = rgba(43,188,61,170); emergency_background.Visible = true; emergency_shutdown.Visible = true; } } |
Author: | Nutu [ September 12th, 2012, 1:41 am ] |
Post subject: | Re: Help with options button |
Loads of thanks! ![]() |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |