Skip to content

bugfix(gui): Fix combo box clicks, checkbox art, text centring, scroll drag, screen edges - #671

Open
tintinhamans wants to merge 6 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/fix/gui-fixes
Open

tintinhamans wants to merge 6 commits into
GeneralsOnlineDevelopmentTeam:mainfrom
tintinhamans:arctic/go/fix/gui-fixes

Conversation

@tintinhamans

Copy link
Copy Markdown

Includes #651, closed as folded into this PR.

A click on the part of an open combo box list that lies outside the rects of its parents never reached the list. GameWindow::winPointInChild now tests the open list first (GameWindowManager::winGetLoneWindow() is new). Text in text entries and combo boxes is now centred vertically in the field.

Shell checkboxes drew about 1 source pixel up and left of their row, and filled slider blocks had a 2x2 transparent notch. ZZ_GeneralsOnline_CheckboxSliderArt.INI redefines the affected images with a fixed 16x16 GeneralsOnline_CheckboxSliderArt.tga. Data only, shipped in GeneralsOnline_Core.big.

The right mouse scroll drag was measured in screen pixels, so the same drag scrolled faster at higher resolutions. The drag is now scaled by 800 / width and 600 / height, which measures it at 800x600.

Full screen windows that end at 799 or 599 in the 800x600 layouts now reach the screen edge when scaled, and so does the control bar background, so screens such as the options screen and the area under the control bar no longer leave 3 to 5 unfilled pixel rows at 2560x1440. At 800x600 those edges are 800 instead of 799. Fills skip their 1 pixel inset when the border is invisible at resolutions other than 800x600. Stretched images now sample half a texel inside their rect, so the main menu frame no longer picks up its transparent neighbours in the shared texture at 2560x1440. An image drawn at its own size is unchanged.

Tested: z_generals builds, the Generals copies are not compiled. Through the UI rig: the screen edges before and after at 800x600, 1280x720 and 2560x1440. At 2560x1440 the checkbox offset went from -2.5 px to 0.0 and notched slider blocks from 91 of 91 to 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant