Uneven Text (and Particularly Menu Items) in Fullscreen

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
majike
Newbie
Posts: 21
Joined: Thu Feb 04, 2016 4:28 am
Contact:

Uneven Text (and Particularly Menu Items) in Fullscreen

#1 Post by majike » Mon Oct 15, 2018 8:21 pm

I seem to be running into a peculiar and frustrating problem when going fullscreen in my game.

As I'm developing it in a text-based style, so the menu choices are in a sequential text-based list, as coded here (and I believe shared by someone on this forum):
screen choice(items):

frame:
# pos (0.035, 0.654)
# xysize (0.95, 0.4)
background "Transparent.png"
pos (0.0412, 0.609)
xysize (0.90, 0.5)
xpadding 0
ypadding 0

vbox:
spacing 0

$ assignKey = 0

for i, (caption, action, chosen) in enumerate(items):
$ assignKey = (assignKey + 1)
if action:
if assignKey < 10:
key str(assignKey) action action
text caption style "menu_choice" xalign 0
else:
text caption style "menu_caption" xalign 0
Due to carefully layout and positioning of choices, say, and other vbox-based text (all using '0.412'-style positioning instructions and sizes), in regular windowed mode, the game looks pixel perfect; each piece of text is exactly 12 pixels from the borders, the menu text and the choices line up vertically... it all looks incredibly neat.

But when I press F to put the game into fullscreen, the spacing goes out of the window. Individual menu choices shift one pixel to the right from the rest of the choices; a vbox with the same co-ordinates as the first menu choice (which appears in exactly the right place in windowed mode) again appears a few pixels out; the neat spacing of text from the borders vary depending on the text, ranging from being 15 pixels to 18 pixels from the border.

I feel like it would be a bad move for me to just disable the option to go fullscreen (the window itself is 1024x768 by default, so it is pretty large), so I want to see if this problem could be solved instead; unfortunately, I have no clue for where to begin.

Is there a solution? Or should I just disable fullscreen?

Post Reply

Who is online

Users browsing this forum: martingerdes