Page MenuHomeWildfire Games

Fix in-game bandbox when gui.scale is not 1
ClosedPublic

Authored by Dariost on Apr 12 2017, 11:29 AM.

Details

Reviewers
elexis
domdomegg
mimo
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP19411: Fix in-game bandbox when gui.scale is not 1
Trac Tickets
#3874
Summary

Setting gui.scale != 1.0 causes the bandbox to appear in a wrong location.

Test Plan

Applying the scale to the bandbox size the problem is fixed, as it can be seen inside the game

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

Dariost created this revision.Apr 12 2017, 11:29 AM
domdomegg added a subscriber: domdomegg.
elexis requested changes to this revision.Apr 13 2017, 12:12 AM
elexis added a subscriber: elexis.

Patch looks correct, but you should add an entry to programming.json, with or without your realname.

Also could you check/imagine whether there are similar things missing somewhere else?

This revision now requires changes to proceed.Apr 13 2017, 12:12 AM
Dariost added a comment.EditedApr 13 2017, 12:16 AM

I've already modified programming.json in D320, so I'll wait for that patch to be accepted.

I've played for a while with a 4K screen and that's the only thing I've noticed that behaves in this way

domdomegg accepted this revision.Apr 13 2017, 12:16 AM

Tested on 4K screen on Ubuntu 16.04 with gui.scale = 0.5, 0.75 and 1, bandbox now actually matches up in all three cases (previously only when gui.scale = 1).

All relevant automated tests pass (it's an extremely minor change so would be amazed if they didn't).

As owner of a 4k screen can confirm, this is the only unexpected behaviour related to mouse movements/clicking I've found in 4K - main other gripe is some stuff still doesn't scale (e.g. cursor, addressed in D320, and low-res bitmap graphics that don't scale nicely - including font)

mimo accepted this revision.Apr 13 2017, 9:38 AM
mimo added a subscriber: mimo.

Thanks for the patch. Could be nice (in another patch) to add gui.scale in the option panel (adding it in gui/options/options.json would do the job).

mimo added a comment.EditedApr 13 2017, 9:52 AM

I forgot to save my inline comment when accepting the patch, so here it is.

binaries/data/mods/public/gui/session/input.js
428 ↗(On Diff #1219)

scale returns a string, so you should use "scale = +Engine..."
(not necessary to upload a new patch for that, can be fixed when committing)

This revision was automatically updated to reflect the committed changes.

Thanks for the patch and the reviews. (Remember programming.json entry should be committed with the first patch of the author, as we want to avoid committed contributions without contributor entries)

mimo added a comment.Apr 13 2017, 12:06 PM
In D321#12640, @elexis wrote:

Thanks for the patch and the reviews. (Remember programming.json entry should be committed with the first patch of the author, as we want to avoid committed contributions without contributor entries)

Feel free to update programming.json if that prevents you from sleeping, but honestly i start to be tired of people thinking they have to rule everything.
Darios explicitely said he doesn't care and can wait for D320, which as could be seen from the comments, i had started to look at and would have been commited soon. But i think i will leave it to you now, so you won't have to do any such comments.

elexis added a comment.EditedApr 13 2017, 12:10 PM
In D321#12641, @mimo wrote:
In D321#12640, @elexis wrote:

Thanks for the patch and the reviews. (Remember programming.json entry should be committed with the first patch of the author, as we want to avoid committed contributions without contributor entries)

honestly i start to be tired of people thinking they have to rule everything.

It's not my rule, I got complaints too about violating that too.

Agree about getting tired of getting complaints about everything when I'm trying to help.