Perfectionist's hell
burner1024 opened this issue · comments
Bug description
Misaligned buttons in main menu.
Steps to reproduce
- Start BG2.
- Click on Quit/Options. Watch the button borders.
Expected behavior
Aligned! Buttons! Aligned!
Screenshots
Open the attached files in full screen mode, and flip between them fast.
menu.zip
GemRB version (check as many as you know apply)
- master as of this issue
- 0.9.2
- 0.9.1
- 0.9.0
Video Driver (check as many as you know apply)
- SDL1.2
- SDL2 built with
USE_OPENGL_BACKEND
- SDL2 without
USE_OPENGL_BACKEND
I looked in GUIscripts, but didn't find any coordinates.
we have some functions to do this sort of alignment in the CharGen. You can do something similar here.
gemrb/gemrb/GUIScripts/bg2/CharGenCommon.py
Lines 33 to 38 in 672e831
That seems to be for the position of the window itself, not buttons within the window?
The problem is that the window is not aligned with the one below it. Buttons are almost always baked into the CHU background.
I think something else is going on here.
Here's comparison of the main screen, original and GemRB. Different screenshot resolution, but same game resolution, fullscreen view should align them perfectly.
As far as I understand, there are no overlaid windows here, just the one main window.
3 buttons are off.
right, the problem I thought you were describing we fixed in #433 using the technique I described.
But you can see for yourself in NI that the "buttons" are baked into the CHU background. The background is GUIVERB.MOS
As far as I understand, there are no overlaid windows here, just the one main window.
No, that is not correct. You can see for yourself in NI or look in the Start2.py script.
Yes, I saw the CHUs and #433, and Start2.py.
GUIVERB.MOS
is the 2-button overlay:
It gets loaded in Exit procedure ("Are you sure you want to exit?"):
gemrb/gemrb/GUIScripts/bg2/Start2.py
Lines 182 to 184 in 90eff5f
The screenshots I shared in the previous message are the main 6-button screen, START.MOS
:
gemrb/gemrb/GUIScripts/bg2/Start2.py
Lines 23 to 24 in 90eff5f
If it were positioning, the issues would've been present on the whole top, side, bottom like here.
But in this case the misalignment is present in diagonally opposite buttons:
I don't see how this can be happening due to bad window positioning with these MOS files in any combination. Unless I grossly misunderstand how it all works.
Do I understand correctly that there should be like a 1px gap? We don't modify the MOS, so the only way that could happen is with something being overlaid on top.
And that something can clearly be the buttons themselves, without an extra window, since they have their own background.
The 3 affected buttons should be 1-2px to the left.
If you open these in fullscreen and flip between them, you can easily see the buttons shifting.
Sure, but that doesn't change my point, it's the buttons (as in CHU elements) that are mispositioned. Since the GUI was hardcoded in the original, there may have been some manual moving done, but like Brad pointed out, we can as easily move the buttons ourselves.
There's nothing in the CHU that would provide any extra positional offsets.
Buttons are most definitely not windows.
I don't know how intellisense does its completion, so can't comment on that.