New GUI scaling problems for check, radio, slider

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
User avatar
trooper6
Lemma-Class Veteran
Posts: 3401
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

New GUI scaling problems for check, radio, slider

#1 Post by trooper6 » Tue Jul 17, 2018 12:55 am

Hi All!

I'm in the process of converting my game in progress from the old 6x Renpy to the new 7x Renpy, including the new GUI. Which involves me needing to make new gui images for buttons and frame and all that because I no longer have access to the legacy files themselves.

So far everything is going well...except for one thing.

The check_foreground, radio_foreground, slider_thumb, and scrollbar_thumb aren't scaling and I so they end up super huge making the images not work. The raw pngs are both the same size, but it seems like only the background is effected by the Borders, so only it scales. So...what do I have to do scale and place those foregrounds and thumbs in the new gui?

I'm attaching a screen shot if you want to see how messed up it all is...
screenshot0001.png
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

philat
Eileen-Class Veteran
Posts: 1445
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: New GUI scaling problems for check, radio, slider

#2 Post by philat » Thu Jul 19, 2018 9:35 pm

Can you explain further? Did the old GUI force them to scale? What do you mean the raw pngs are "both" the same size?

User avatar
trooper6
Lemma-Class Veteran
Posts: 3401
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: New GUI scaling problems for check, radio, slider

#3 Post by trooper6 » Thu Jul 19, 2018 11:06 pm

So, take the radio/check button for example.
It is one button with a background and foreground. The background looks like the button with space on the left side, the foreground is the checked icon. But the images are both exactly the same size, and are made to fit well together. (I'll attach an image).
checkfull.png
So when the files are placed in the gui folder they do replace the original images. The background (the button image) scales to fit the screen (based probably on the Borders object line that is given to it in the gui.rpy file...because the Borders object seems to be what allows the button to scale. The foreground layer of the button...is clearly not similarly scaling. Because rather than being placed where it should be, it is a much larger size and is not in the right place.

In the old GUI was using the marker theme so I didn't need these files. I made them because I'm rebuilding the game using the new gui. In the Old GUI, if I remember correctly, I could just use styles to adjust the thumb or foreground directly. But I that does not seem to work in the new GUI. I'd like to know if there is anyone who has customized the new GUI (specifically the radio/check buttons, and the slider/scroll bar) who has been able to successfully adjust the foreground/thumb or maybe if they never had the scaling problem at all. This one thing is stumping me.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
trooper6
Lemma-Class Veteran
Posts: 3401
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: New GUI scaling problems for check, radio, slider

#4 Post by trooper6 » Sat Jul 21, 2018 5:54 am

I just spent a bunch of time messing with the image files by hand.
I got it to look good on the preferences screen (more or less).
If anyone else is running into this problem, this is how I did it:
The thumb and foreground were cropped, and then I had to make the thumb/foreground pngs 50% of the size I would want it to be, but the size of the canvas to be the full size I'd want it to be.

For example: If my bar is 100 pixels high and I want the thumb to be 100 pixels high, what I had to do was make the thumb image 50 pixels high and the canvas 100 pixels high. That got it to look the way I'd want it to.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: No registered users