[Solved]How to custom bar ?

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.
Post Reply
Message
Author
Sidji972
Regular
Posts: 107
Joined: Tue Jan 21, 2014 8:50 pm
Location: Canada
Contact:

[Solved]How to custom bar ?

#1 Post 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
Last edited by Sidji972 on Tue Oct 13, 2015 3:42 pm, edited 1 time in total.

mjshi
Regular
Posts: 179
Joined: Wed Mar 13, 2013 9:55 pm
Completed: MazeSite01, Ponderings of Time
Contact:

Re: How to custom bar ?

#2 Post 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.

Sidji972
Regular
Posts: 107
Joined: Tue Jan 21, 2014 8:50 pm
Location: Canada
Contact:

Re: How to custom bar ?

#3 Post 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 

Post Reply

Who is online

Users browsing this forum: akakyouryuu, Bing [Bot], GetOutOfMyLab, Google [Bot]