How do I Change color of progressbar

Get help using Construct 2

Post » Sat Jun 06, 2015 10:10 am

Hello,
I try to manage with progressbar, but something isn't clear in my mind... How to change the color or the look of the progressbar ? Mine is grey and it's uggly ! :shock:
Regards,
B
7
S
1
Posts: 13
Reputation: 460

Post » Sat Jun 06, 2015 10:17 am

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jun 06, 2015 11:21 am

Hello LittleStain,
In fact, I was talking about ProgressBar for "life" or something. You loose a point of life, the progressbar decrease. I just want to change the look (color).
Regards,
B
7
S
1
Posts: 13
Reputation: 460

Post » Sat Jun 06, 2015 11:37 am

Are you using a sprite or a tiledbackground?

If so, opening it in the image editor and drawing/filling it with another color would do the trick..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jun 06, 2015 12:19 pm

I am using the form control "progressbar"...may be I am wrong !
But I don't know how tho use a sprite or tiledbackground as a progressbar...
B
7
S
1
Posts: 13
Reputation: 460

Post » Sat Jun 06, 2015 12:29 pm

Not sure if its possible to change color of the form control progress bar, maybe with CSS. But its just a guess.

You can turn a sprite into a progress bar like this:

Sprite width = 500 (Just the original width of you sprite)
Max_health_Player = 100
Current_health_Player = 20

Set Sprite.width = (500 / Max_health_Player) * Current_health_Player

In this case the Sprite width would be 100 px

If Current_health_Player is 50 the width would be 250 px
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Sat Jun 06, 2015 2:21 pm

pcleader44 you can do it like this

system on start of layout =ProgressBar Set css Style "background", "anycolour" say Rred, blue, green whatever you like
B
250
S
39
G
15
Posts: 1,953
Reputation: 40,623


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests