Page 1 of 1

Bar colour

Posted: Mon Jun 13, 2016 9:53 am
by dragonlord3989
So I was wondering if it is possible to change the colour of my bar from this Image 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

Re: Bar colour

Posted: Mon Jun 13, 2016 5:33 pm
by octacon100
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.