Page MenuHomeWildfire Games

[gui] list “Credits” above “Exit”
ClosedPublic

Authored by Nescio on Nov 17 2019, 11:05 AM.

Details

Reviewers
bb
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23387: Move the credits button on main menu
Summary

Credits are part of the game. They deserve a more prominent place than at the bottom of the project information contact box, as if they're merely an afterthought. Moreover, unlike the other buttons there, it does not open a webpage to contact the community.
This patch lists the “Credits” button between the “Scenario Editor” and “Exit” buttons; it also shrinks the PI contact box.

Before:


After:

Test Plan

Agree this is an improvement.

To see how it would look like on a 1024×768 screen, insert the following lines in your user.cfg file:

gui.scale = "1"
windowed = "true"
xres = "1024"
yres = "768"

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

Nescio created this revision.Nov 17 2019, 11:05 AM
Owners added a subscriber: Restricted Owners Package.Nov 17 2019, 11:05 AM
Nescio edited the summary of this revision. (Show Details)Nov 17 2019, 11:06 AM

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/593/display/redirect

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 200| 200| 		"tooltip": translate("Exits the game."),
| 201| 201| 		"onPress": () => {
| 202| 202| 			messageBox(
| 203|    |-					400, 200,
|    | 203|+				400, 200,
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 201| 201| 		"onPress": () => {
| 202| 202| 			messageBox(
| 203| 203| 					400, 200,
| 204|    |-					translate("Are you sure you want to quit 0 A.D.?"),
|    | 204|+				translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
| 207| 207| 					[null, Engine.Exit]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 202| 202| 			messageBox(
| 203| 203| 					400, 200,
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205|    |-					translate("Confirmation"),
|    | 205|+				translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
| 207| 207| 					[null, Engine.Exit]);
| 208| 208| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 203| 203| 					400, 200,
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206|    |-					[translate("No"), translate("Yes")],
|    | 206|+				[translate("No"), translate("Yes")],
| 207| 207| 					[null, Engine.Exit]);
| 208| 208| 		}
| 209| 209| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
| 207|    |-					[null, Engine.Exit]);
|    | 207|+				[null, Engine.Exit]);
| 208| 208| 		}
| 209| 209| 	}
| 210| 210| ];
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1109/display/redirect

Also, the licences are nowhere displayed in game; or am I mistaken?

@elexis and @Stan, any opinions on this?

Stan added a comment.Jan 3 2020, 7:09 PM

Once again I failed to see this. I am sorry. I think this is a good idea, but I believe it breaks 1024x768 min resolution. :/

Nescio added a comment.Jan 3 2020, 7:35 PM

I think this is a good idea, but I believe it breaks 1024x768 min resolution. :/

Why would it? The number of lines stays the same; one button is just moved up.
Here's how it looks on 1024×768 on my end before:

and after:
.
On second thought I could actually try reducing the unused space so it can be displayed on 960×720 (thus also 1280×720).

Nescio updated this revision to Diff 10865.EditedJan 3 2020, 7:56 PM

remove some empty space to support 960×720:

Vulcan added a comment.Jan 3 2020, 7:58 PM

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/938/display/redirect

Vulcan added a comment.Jan 3 2020, 8:01 PM

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 200| 200| 		"tooltip": translate("Exits the game."),
| 201| 201| 		"onPress": () => {
| 202| 202| 			messageBox(
| 203|    |-					400, 200,
|    | 203|+				400, 200,
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 201| 201| 		"onPress": () => {
| 202| 202| 			messageBox(
| 203| 203| 					400, 200,
| 204|    |-					translate("Are you sure you want to quit 0 A.D.?"),
|    | 204|+				translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
| 207| 207| 					[null, Engine.Exit]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 202| 202| 			messageBox(
| 203| 203| 					400, 200,
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205|    |-					translate("Confirmation"),
|    | 205|+				translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
| 207| 207| 					[null, Engine.Exit]);
| 208| 208| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 203| 203| 					400, 200,
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206|    |-					[translate("No"), translate("Yes")],
|    | 206|+				[translate("No"), translate("Yes")],
| 207| 207| 					[null, Engine.Exit]);
| 208| 208| 		}
| 209| 209| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
| 207|    |-					[null, Engine.Exit]);
|    | 207|+				[null, Engine.Exit]);
| 208| 208| 		}
| 209| 209| 	}
| 210| 210| ];
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1456/display/redirect

Vulcan added a comment.Jan 3 2020, 8:02 PM

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/34/display/redirect

It seems I should be more careful next time:

Nescio updated this revision to Diff 10886.EditedJan 5 2020, 10:22 AM
Nescio edited the test plan for this revision. (Show Details)

Reverted problematic (i - 1).
To do: figure out another way to remove the unnecessary empty space (of one button height + margin) between the logo and the Learn To Play button (maybe @elexis knows?), so it could not only work for 1024×768 (4:3):

but also for 1280×720 (16:9):
(Could be done in a separate patch.)

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/50/display/redirect

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/954/display/redirect

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 200| 200| 		"tooltip": translate("Exits the game."),
| 201| 201| 		"onPress": () => {
| 202| 202| 			messageBox(
| 203|    |-					400, 200,
|    | 203|+				400, 200,
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 201| 201| 		"onPress": () => {
| 202| 202| 			messageBox(
| 203| 203| 					400, 200,
| 204|    |-					translate("Are you sure you want to quit 0 A.D.?"),
|    | 204|+				translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
| 207| 207| 					[null, Engine.Exit]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 202| 202| 			messageBox(
| 203| 203| 					400, 200,
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205|    |-					translate("Confirmation"),
|    | 205|+				translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
| 207| 207| 					[null, Engine.Exit]);
| 208| 208| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 203| 203| 					400, 200,
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206|    |-					[translate("No"), translate("Yes")],
|    | 206|+				[translate("No"), translate("Yes")],
| 207| 207| 					[null, Engine.Exit]);
| 208| 208| 		}
| 209| 209| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/pregame/MainMenuItems.js
| 204| 204| 					translate("Are you sure you want to quit 0 A.D.?"),
| 205| 205| 					translate("Confirmation"),
| 206| 206| 					[translate("No"), translate("Yes")],
| 207|    |-					[null, Engine.Exit]);
|    | 207|+				[null, Engine.Exit]);
| 208| 208| 		}
| 209| 209| 	}
| 210| 210| ];
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1472/display/redirect

Nescio added a comment.Jan 7 2020, 4:21 PM

@elexis, you've been working on the gui files. Any problems or suggestions for this?

bb accepted this revision.Jan 13 2020, 1:12 PM
bb added a subscriber: bb.

change seems same

Tested on min-res and appears working
front doesn't fall

This revision is now accepted and ready to land.Jan 13 2020, 1:12 PM
This revision was automatically updated to reflect the committed changes.
Nescio retitled this revision from list “Credits” above “Exit” to [gui] list “Credits” above “Exit”.May 18 2020, 10:28 AM