Skip to content

Make title bar bigger in Enlarged UI mode #23590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 17, 2025

Conversation

Gymnasiast
Copy link
Member

@Gymnasiast Gymnasiast commented Jan 10, 2025

Due to our window system being old and clunky, this required quite a lot of refactoring, mostly to replace coordinates being calculated from the topleft of the window with calculating them from the top left of the window body instead. Also splits the title bar and window body height, as windows have no good way of determining their full height in advance - and frankly, how big or small the title bars are is more of a concern to the window manager than to the window itself anyway.

afbeelding

Screen.Recording.2025-03-01.at.15.39.11.mp4

@Gymnasiast Gymnasiast changed the title Feature/touch mode 2 Make title bar bigger in touch mode Jan 10, 2025
@Gymnasiast Gymnasiast force-pushed the feature/touch-mode-2 branch 2 times, most recently from 598b4d7 to c2aa949 Compare January 10, 2025 18:04
@Gymnasiast Gymnasiast changed the title Make title bar bigger in touch mode Make title bar bigger in Enlarged UI mode Jan 10, 2025
AaronVanGeffen

This comment was marked as outdated.

@deurklink

This comment was marked as outdated.

@Gymnasiast Gymnasiast marked this pull request as ready for review January 14, 2025 16:55
@AaronVanGeffen

This comment was marked as outdated.

@ZehMatt

This comment was marked as outdated.

@Gymnasiast

This comment was marked as outdated.

@AaronVanGeffen

This comment was marked as outdated.

@Gymnasiast Gymnasiast force-pushed the feature/touch-mode-2 branch 2 times, most recently from c563db9 to cb36e98 Compare January 25, 2025 14:37
@AaronVanGeffen AaronVanGeffen self-assigned this Jan 27, 2025
@AaronVanGeffen

This comment was marked as outdated.

@Gymnasiast

This comment was marked as outdated.

@AaronVanGeffen
Copy link
Member

AaronVanGeffen commented Mar 1, 2025

Refit the code to make more efficient use of the foundations laid by ResizeFrame and ResizeFrameWithPage. I've also made ResizeFrame assert in a few places to make its assumptions clear.

On a side note, I think we should just fold ResizeFrameWithPage into ResizeFrame as well. I had initially done as much, but decided against it for this PR.

Below is a screencast of what the PR looks like in its current state. There are a few minor glitches to work out (e.g. cluster button in scenery window, viewport invalidation) done, but it should be manageable from this point.

Screen.Recording.2025-03-01.at.15.39.11.mp4

@Gymnasiast

This comment was marked as resolved.

@AaronVanGeffen

This comment was marked as outdated.

@AaronVanGeffen AaronVanGeffen added the changelog This issue/PR deserves a changelog entry. label Mar 1, 2025
@AaronVanGeffen AaronVanGeffen added this to the v0.4.21 milestone Mar 1, 2025
@AaronVanGeffen

This comment was marked as resolved.

Comment on lines +987 to +998
// Not sure why plugin windows have to be treated differently,
// but they currently show a deviation if we don't.
if (w.classification == WindowClass::Custom)
{
w.min_height += w.getTitleBarDiffTarget();
w.max_height += w.getTitleBarDiffTarget();
}
else
{
w.min_height += w.getTitleBarDiffNormal();
w.max_height += w.getTitleBarDiffNormal();
}
Copy link
Member

@AaronVanGeffen AaronVanGeffen Apr 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This distinction has me stumped. If leave just the else block, however, plugin windows will look off. Conversely, if I leave just the other block, in-game windows like Park and NewRide will look slightly too short.

It works fine, this way, but yes, it has me stumped.

Copy link
Member Author

@Gymnasiast Gymnasiast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excessive padding (not present on develop):
afbeelding

afbeelding

@AaronVanGeffen AaronVanGeffen force-pushed the feature/touch-mode-2 branch 2 times, most recently from fa3f6b4 to 0509091 Compare April 17, 2025 19:35
Copy link
Member Author

@Gymnasiast Gymnasiast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@Gymnasiast Gymnasiast enabled auto-merge (squash) April 17, 2025 19:57
@Gymnasiast Gymnasiast disabled auto-merge April 17, 2025 19:58
@Gymnasiast Gymnasiast merged commit 9a86cf9 into OpenRCT2:develop Apr 17, 2025
20 of 21 checks passed
@Gymnasiast Gymnasiast deleted the feature/touch-mode-2 branch April 17, 2025 19:58
@AaronVanGeffen
Copy link
Member

The hydra has been vanquished! 🙌

AaronVanGeffen added a commit that referenced this pull request May 4, 2025
- Feature: [#24206] [Plugin] Add APIs for breaking down rides, reading the current breakdown, and for fixing broken down rides.
- Improved: [#20073] The OpenGL drawing engine now supports screen invalidation which avoids the redrawing of unchanged regions.
- Improved: [#21767] RCT Classic for macOS can now be used as the source game.
- Improved: [#23590] Title bars are now drawn bigger when “Enlarged UI” is enabled.
- Improved: [#23626] Add small, medium and large flat and sloped turns, S-bends and diagonal track to the Go-Karts.
- Improved: [#23982] The scenario objective window has been merged into the scenario options window.
- Improved: [#24233] RCT Classic+ from Apple Arcade can now be used as the source game, and is detected automatically.
- Improved: [#24260] Better performance on parks that have a lot of Guests and Entertainers.
- Improved: [#24319] RCT Classic installs via Steam are now detected automatically on Windows.
- Change: [#23803] Lightning strikes and thunder now happen at the same frequency independently of the game speed.
- Change: [#23857] Replace display options tab with custom sprites.
- Change: [#24069] [Plugin] Plugins are now available in the scenario editor and track designer.
- Change: [#24135] Compress Emscripten js/wasm files.
- Change: [#24194] The advanced options tab has been reworked to make it easier to find the RCT1 path setting.
- Change: [#24235] Small changes to RCT1 theme.
- Change: [#24236] Controls and Interface options now both have their own tabs in the Options window.
- Change: [#24308] “Software” and “Software (hardware display)” renderers have been merged into a single “Software” renderer.
- Change: [#24317] The scenery window now shows at least one row of scenery objects, even if there are multiple rows of tabs.
- Fix: [#18479] Tile elements ordered beneath water do not draw correctly.
- Fix: [#19782] Game stops counting inversions and golf holes after 31 (original bug).
- Fix: [#21207] Track List window gets positioned incorrectly.
- Fix: [#21919] Non-recolourable cars still show colour picker (original bug).
- Fix: [#22182] [Plugin] Crash when using map.getAllEntities("car").
- Fix: [#22634] Asset packs with sound effect overrides are not loaded correctly at startup.
- Fix: [#23108] Missing pieces on Hypercoaster and Hyper-Twister, even with the ‘all drawable track pieces’ cheat enabled.
- Fix: [#24013] Failure to load a scenario preview image (minimap) could lead to an uncaught exception error message.
- Fix: [#24045] [Plugin] Data storage is not cleared when converting save game to scenario.
- Fix: [#24121] Checkbox labels run beyond the edge of the window if they’re too long to fit.
- Fix: [#24142] [Plugin] Track origin is miscalculated on downward slopes.
- Fix: [#24220] Narrow station platforms have missing sides on certain rotations.
- Fix: [#24286] Steam installs of RCT1 and RCT2 are not autodetected on macOS.
- Fix: [#24310] [Plugin] Missing invalidation on various plugin api setters for entities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog This issue/PR deserves a changelog entry. testing required PR needs to be tested before it is merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants