XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 10th, 2025, 11:38 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Help with options button
PostPosted: September 11th, 2012, 11:20 am 
Offline
User avatar

Joined: August 18th, 2012, 4:08 pm
Posts: 101
Location: Oradea, Bihor, Romania
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;
  }
}

_________________
" Homosexuality exists in 450 species. Homophobia is found in only one. Which seems unnatural now?
Image


Top
 Profile  
 
PostPosted: September 11th, 2012, 6:27 pm 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
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;
  }
}


Top
 Profile  
 
PostPosted: September 12th, 2012, 1:41 am 
Offline
User avatar

Joined: August 18th, 2012, 4:08 pm
Posts: 101
Location: Oradea, Bihor, Romania
Loads of thanks! :D

_________________
" Homosexuality exists in 450 species. Homophobia is found in only one. Which seems unnatural now?
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group