Page MenuHomeWildfire Games

Better ultrawidescreen support in game
AbandonedPublic

Authored by OptimusShepard on Jan 24 2018, 8:00 PM.

Details

Reviewers
vladislavbelov
Summary

On a ultrawidescreen its inconvenient to have the resources in the corner. If the screen is wider than a 16:9 monitor, this patch moves the resources and buttons of the top panel more to the middle like a 16:9 screen.

Test Plan

If you have a ultrawidescreen look if the the top panel items move more to the middle. If you don't have an ultrawide you can use the window mode and "create" your own ultrawide panel.

Another possibility is to change "g_TopPanelLike" in session.js to e.g. 4/3. Than the top panel will move to the middle like a 4/3 monitor.

If you have a 16:9 monitor or smaller it shouldn't change anything if you play fullscreen.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 4740
Build 8215: Vulcan BuildJenkins

Event Timeline

OptimusShepard created this revision.Jan 24 2018, 8:00 PM
elexis added a subscriber: elexis.Jan 24 2018, 8:03 PM

Not too nice to hardcode so many numbers, ideally we have one GUI theme that fits all. Got screens?

source/gui/scripting/JSInterface_GUIManager.cpp
38

Only one getter returning a Vector2D

In D1253#50836, @elexis wrote:

Not too nice to hardcode so many numbers, ideally we have one GUI theme that fits all. Got screens?

How ca I upload some screenshot?

See that upload file button in the comment field? Also you can add things like width=800

I only let the menu on his position. What do you think about it? Or maybe I can only move the left side?

nice focus
interesting

add vector, changed code for position

What do you think about the two following design? Whitch of those three design you prefer? Or do we need some complete other gui?

In D1253#50840, @elexis wrote:

See that upload file button in the comment field? Also you can add things like width=800

thx

add helperfunction

OptimusShepard marked an inline comment as done.Jan 29 2018, 8:01 PM
Vulcan added a subscriber: Vulcan.Jan 29 2018, 9:22 PM

Successful build - Chance fights ever on the side of the prudent.

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
vladislavbelov requested changes to this revision.Feb 21 2018, 5:57 PM
vladislavbelov added a subscriber: vladislavbelov.

We need to discuss about a GUI logic and how it looks like. Because currently it looks weird, because:

  1. it's floating somewhere over bar without visual barriers.
  2. Left and right padding aren't equal.

I can only suggest to align resources to the civicon in the screen center. But we need to see all possible solutions.

Also, what should we do for monitors with different radius (yep, curve monitors)?

source/gui/scripting/JSInterface_GUIManager.cpp
32

We need to avoid C-style casts, we prefer static_cast or special helpers.

This revision now requires changes to proceed.Feb 21 2018, 5:57 PM
OptimusShepard abandoned this revision.Feb 19 2020, 10:07 PM

The ultra widescreen support should be taken into account in a future revision of the gui.