Post Reply

[Q] Colouring a progress bar (many conditions)

27th January 2014, 02:26 AM   |  #1  
teteu86's Avatar
OP Senior Member
Thanks Meter: 15
 
157 posts
Join Date:Joined: Sep 2012
More
Hi. I have the following working code to colour a progress bar:
Code:
[cf]$#BLEVN#<20?ffec1818$$#BLEVN#>=20 && #BLEVN#<50?ffdfec1c$$#BLEVN#>=50?ff36e057$[/cf]
And I am trying to add another condition (priority):

Code:
#BSTATN#=2:ff50e4ff
But I can't put an if inside of another, I've tried many ways (apparently all wrong).

Would you give me a hand?

The objective is: colour if charging. if not charging, colour according to the bat level.
The Following User Says Thank You to teteu86 For This Useful Post: [ View ]
27th January 2014, 08:46 AM   |  #2  
kwerdenker's Avatar
Recognized Themer
Flag Probably the Zooper Forums
Thanks Meter: 2,254
 
1,393 posts
Join Date:Joined: Apr 2010
Donate to Me
More
Quote:
Originally Posted by teteu86

Hi. I have the following working code to colour a progress bar:

Code:
[cf]$#BLEVN#<20?ffec1818$$#BLEVN#>=20 && #BLEVN#<50?ffdfec1c$$#BLEVN#>=50?ff36e057$[/cf]
And I am trying to add another condition (priority):

Code:
#BSTATN#=2:ff50e4ff
But I can't put an if inside of another, I've tried many ways (apparently all wrong).

Would you give me a hand?

The objective is: colour if charging. if not charging, colour according to the bat level.

I did something similar for another user here. That was about text display but the general idea on how to combine two different conditions is the same. You should be able to adapt the code posted in the linked post to your situation without much of a problem
The Following User Says Thank You to kwerdenker For This Useful Post: [ View ]
27th January 2014, 11:26 AM   |  #3  
teteu86's Avatar
OP Senior Member
Thanks Meter: 15
 
157 posts
Join Date:Joined: Sep 2012
More
Thumbs up
Quote:
Originally Posted by kwerdenker

I did something similar for another user here. That was about text display but the general idea on how to combine two different conditions is the same. You should be able to adapt the code posted in the linked post to your situation without much of a problem

Thank you. I leave the code in the case someone searches for it.

Code:
[cf]$#BSTATN#=2?ff50e4ff$$#BLEVN#<20 && #BSTATN#!=2?ffec1818$$#BLEVN#>=20 && #BLEVN#<50 && #BSTATN#!=2?ffdfec1c$$#BLEVN#>=50 && #BSTATN#!=2?ff36e057$[/cf]
The Following 2 Users Say Thank You to teteu86 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes