Page 1 of 1

[Solved]How to custom bar ?

Posted: Tue Oct 13, 2015 8:36 am
by Sidji972
Hello,

I would like to add some styles to my 'love bar' however for the moment i have still Renpy's defaut bar.

Here's the code of my bar :

Code: Select all

bar range max_points value x_love xmaximum 150 xpos 400 ypos 520

Code: Select all

init -2 python: 
    style.love_bar = Style(style.default)
    style.love_bar_frame.background = None
    style.love_bar_slider.left_bar = "gui/config_bar_full.png"
    style.love_bar_slider.right_bar = "gui/config_bar_empty.png"
    style.love_bar_slider.thumb = None
    style.love_bar_slider.xmaximum = 131
    style.love_bar_slider.ymaximum = 32
Can someone explain me how to apply my style ? Or if i miss something ? Thanks you ! :D

Re: How to custom bar ?

Posted: Tue Oct 13, 2015 9:07 am
by mjshi
Check out the tutorial in my signature.
You don't need to use style.love_bar, all the styles applied are in the bar itself.

Re: How to custom bar ?

Posted: Tue Oct 13, 2015 3:41 pm
by Sidji972
Ah thanks, i didn't know about this news screen language :)

Here's my working code:

Code: Select all

bar value StaticValue(character_love, 100):
        xpos x ypos y
        xmaximum 175 
        ymaximum 30
        left_bar Frame("gui/bar_empty.png", 10, 10) 
        right_bar Frame("gui/bar_full.png", 10, 10)
        thumb None