Page 1 of 1

New GUI scaling problems for check, radio, slider

Posted: Tue Jul 17, 2018 12:55 am
by trooper6
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

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

Posted: Thu Jul 19, 2018 9:35 pm
by philat
Can you explain further? Did the old GUI force them to scale? What do you mean the raw pngs are "both" the same size?

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

Posted: Thu Jul 19, 2018 11:06 pm
by trooper6
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.

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

Posted: Sat Jul 21, 2018 5:54 am
by trooper6
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.