Page MenuHomeWildfire Games

Resize session windows
ClosedPublic

Authored by temple on Sep 21 2017, 6:37 AM.

Details

Summary

The objectives window in particular looks pretty bad on 1024x768.

I think other people are working on presenting the information in that window in a better way, but it needs to be recentered in any case.

In D713, we kept the chat window centered at 50%-80. The other three windows (diplomacy, trade, objectives) have titles that stick out above the window, so they need to be centered a little lower: 50%-70 looks good.

I didn't change the objectives window's height, and only slightly changed the trade window's height.

The diplomacy window had a lot of unused space, so I adjusted its height to fit the number of players in the game.

When testing the objectives menu I wanted the map with the longest description (to see if there was a scroll bar). That turned out to be Latium, which turned out to be broken from rP20144, so I've added that tiny fix to this patch. The other maps have already been fixed.

In the first screenshot, "ALPHA XXIII : Ken Wood" on the top bar takes two lines, so I adjusted the spacing so it'd fit on one.

Test Plan

Agree that the windows look better.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

temple created this revision.Sep 21 2017, 6:37 AM
bb added a subscriber: bb.Sep 21 2017, 8:47 PM

Was thinking a bit in aligning the chat panel aswell, but that seems to be more using the percentages and should stay like that, also using those percentages for these screens would just leave empty space on diplo/trade and I rather have the gamedescription aligned with that one.

binaries/data/mods/public/gui/session/diplomacy_window.xml
4 ↗(On Diff #3735)

not sure but wouldn't it be cleaner to align this top with the other panels too? maybe things would be ugly then though

binaries/data/mods/public/gui/session/menu.js
266–268 ↗(On Diff #3735)

shouldn't we just store (g_Players.length - 1) * (firstrow.bottom - firstrow.top) / 2 and use that twice?

binaries/data/mods/public/maps/random/latium.js
330 ↗(On Diff #3735)

nice find

I should've posted this screenshot too, it's the chat window without the history, and it's centered at 50%-80 (the same as chat with history).

Here's the diplomacy window with the top aligned with the objectives and trade windows (which were the same height just by accident).

I wouldn't call this ugly, but I think I prefer having them aligned at the center rather than the top.

temple updated this revision to Diff 3740.Sep 21 2017, 9:13 PM
temple marked an inline comment as done.
temple updated this revision to Diff 3741.Sep 21 2017, 9:22 PM
bb accepted this revision.Sep 21 2017, 10:31 PM

looks ok to me, leaving it accepted for a bit in case someone wants to yell, or if the latium fix breaks some random map cleanup.

This revision is now accepted and ready to land.Sep 21 2017, 10:31 PM
elexis added inline comments.Sep 21 2017, 10:35 PM
binaries/data/mods/public/maps/random/latium.js
330 ↗(On Diff #3735)

Sorry about that. Found it too few days ago while working on a patch fixing that and some other related thousands lines xd
Doesn't really seem related to the feature though

(Agree that centering looks better and the stuff seen on screenshots looks good. Guess running the longstrings test isnt needed as that part isn't resized (there are some simple resizing tickets around in case someone wants to do that stuff). So thanks for the patch and review! )

binaries/data/mods/public/gui/session/trade_window.xml
3 ↗(On Diff #3741)

(That dialog is resized in resizeTradeDialog of menu.js, but only the width, so ok.
At one point the patch supported vertical resizing too if there were too many res iirc, but apparently that was removed due to GUI ugliness)

temple added inline comments.Sep 21 2017, 10:48 PM
binaries/data/mods/public/maps/random/latium.js
330 ↗(On Diff #3735)

I found it on accident and it was such a tiny thing, I thought why not (same with the top bar thing). But yes it would be better placed in a map patch.

LOL I PREFER TOP!!!

LOL I PREFER TOP!!!

Maybe in the future we could allow players to click and drag to move the windows to whereever they want (and remember the location). (I have no idea if that's possible.) (This is obviously of the lowest importance.)

In D922#36131, @temple wrote:

drag & drop windows of the lowest importance

(Then we could also allow stacking of the windows and changing the order of windows.
Would be nice actually, but needs some design thinking.
If we support one system for that, we some day will want to use it in other GUI pages too, for instance the options window.
The session dialogs are GUI objects of a GUI page while we probably also want entire GUI page to be moveable.
So perhaps it would be good to implement support for dragging for GUI pages and prior to that allow not only the topmost GUI page to be executed and receive SDL events and convert the session dialogs to GUI pages.
If we're not going to spend the time on this (probable), it could still be possible to just change the Z order index on click and possibly catch SDL mouse movement (as in input.js?) and drag the current GUI objects around.
So agree that the priority is level meh.)

This revision was automatically updated to reflect the committed changes.