Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
dragonlord3989
- Regular
- Posts: 30
- Joined: Tue Nov 17, 2015 1:34 pm
-
Contact:
#1
Post
by dragonlord3989 » Mon Jun 13, 2016 9:53 am
So I was wondering if it is possible to change the colour of my bar from this

to a red colour this is my code so far any help would be great
Code: Select all
screen Steve_Health:
frame:
ypos 670
xpos 690
has vbox
hbox:
label "Steve Health:" xminimum 100
bar range Stevehpmax value Stevehp xmaximum 400
-
octacon100
- Regular
- Posts: 163
- Joined: Thu Sep 12, 2013 11:23 pm
- Projects: Regeria Hope
- Organization: Golden Game Barn
- IRC Nick: Octacon100
- Location: Boston, MA
-
Contact:
#2
Post
by octacon100 » Mon Jun 13, 2016 5:33 pm
Here's some example bar code:
Code: Select all
bar:
value AnimatedValue(confidence, range=confidenceMax)
xmaximum 166
ymaximum 31
left_bar Frame("GUI/fullMoraleMeter.png", 50, 0)
right_bar Frame("GUI/emptyMoraleMeter.png", 50, 0)
thumb None
If you want to change the way a bar looks, you can do a few things:
1. Change the style that the bar uses. Check out
https://www.renpy.org/doc/html/style_pr ... properties for more info.
2. Create an image that looks the way you want it to, and set those images to be your left_bar and right_bar (for horizontal bars) or top_bar and bottom_bar (for vertical bars)
3. (Not too sure about this one) Use the "color" style setting: color "#fff" should make the bar white, I think.
Hope that helps.
Users browsing this forum: zyric