ymaximum in bars

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
wildride
Newbie
Posts: 16
Joined: Wed Jan 04, 2017 8:25 am
Contact:

ymaximum in bars

#1 Post by wildride »

Im designing a character generator for my game and was wanting to incorporate bars into it.

However Im finding a couple of issues, one being the ymaximum setting appears to have no effect, nor does changing the left and right bars sizing on the actual image used. Im using the default code for style/options/gui.

Is there some setting I need to tweak there that Im missing? xmaximum is working as intended.

heres a snippet of the code being used:

Code: Select all

screen chargen:
    frame:
        xysize (1024,576)
        xalign 0.5
        yalign 0.5
        has vbox:
            xalign 0.5
            yalign 0.0
            text "{b}{u}D.N.A Sequencer{/u}{/b}"
    frame:
        xysize (1024,576)
        xalign 0.5
        yalign 0.5
        background
        has hbox:
            xalign 0.5
            yalign 0.1
            on "hide" action Hide("displayTextScreen")
            text "Strength: [S_Pts] "
            imagebutton:
                idle "/misc/minus.png" clicked Jump("substr") hovered Show("displayTextScreen", displayText = "Subtract Strength") unhovered Hide("displayTextScreen")
            text " "
            bar:
                range 10 value S_Pts xmaximum 350 ymaximum 15
            text " "
            imagebutton:
                idle "/misc/plus.png" clicked Jump("addstr") hovered Show("displayTextScreen", displayText = "Add Strength") unhovered Hide("displayTextScreen")
And an image of the screen. The bar is currently showing there at 35 pixels (full height of the image) however even if I resize the image to 10 pixels this does not alter the appearance in game:
Image

The alignment will be ok as the text "strength" etc Im converting to image allowing more control over spacing.

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: ymaximum in bars

#2 Post by Divona »

Code: Select all

            bar:
                range 10 value S_Pts xsize 350 ysize 15
References:
- xsize
- ysize
Completed:
Image

wildride
Newbie
Posts: 16
Joined: Wed Jan 04, 2017 8:25 am
Contact:

Re: ymaximum in bars

#3 Post by wildride »

Thankyou Divona, thats sorted it.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]