Skip to content

Zoom the battlefield and scale the interface - #176

Open
equalchance wants to merge 14 commits into
OpenTS-Developers:mainfrom
equalchance:battlefield-zoom
Open

equalchance wants to merge 14 commits into
OpenTS-Developers:mainfrom
equalchance:battlefield-zoom

Conversation

@equalchance

Copy link
Copy Markdown

The mouse wheel over the battlefield zooms it in whole steps from 1x to 4x, as far as the game resolution allows. The point under the pointer stays in place, and the sidebar, tab strip and messages keep their size. Over the sidebar and the tab strip the wheel still scrolls the sidebar.

At high resolutions the sidebar, tab strip, messages and in-game dialogs are drawn larger. [Video] UIScale sets the size, and Options > Display has it as a slider limited to what the selected resolution fits. The automatic size is 3x from 2160 rows and 1x below, so 1080p and 1440p look as before. A mission or a loaded game starts zoomed to the interface size.

  • Zoom is local view state. It is not saved or sent over the network, and no simulation code reads it.
  • TacticalRect is the smaller rendered view; the new BattlefieldRect is its area on screen, which the sidebar, radar button, tab timer, tooltips and messages are laid out from. At 1x the two are the same.
  • The magnified view is a whole-number pixel copy: under 1 ms at 1080p, a few ms at 4K.
  • The wheel does not zoom while input is locked or a trigger zoom is running, and a ZoomIn trigger action returns to 1x first.
  • The radar no longer draws a white frame around the whole map image, which looked like a second view box.

Intentionally changed: the wheel over the battlefield used to scroll the sidebar.

This branch has not been deployed

No deployments
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