Commit graph

15 commits

Author SHA1 Message Date
phosit
094a7c2268 Return a promise from most page-inits
Adopt the new interface by all pages which close themself. (Not thous
using `Engine.SwitchGuiPage`.)
2025-03-09 10:39:20 +01:00
bb
3ff65b451f Fix jsDocs object => Object
This was SVN commit r23991.
2020-08-24 11:01:25 +00:00
s0600204
b2842e8021 Rewrite Structure Tree and Template Viewer to use OOP principles
Commenters: elexis, Stan, Angen
Refs.: #5387
Differential Revision: https://code.wildfiregames.com/D2734
This was SVN commit r23808.
2020-07-07 19:11:36 +00:00
s0600204
40f77d0f0f Rename civinfo page from "History" to "Civilization Overview"
Patch by: Nescio
Accepted by: s0600204
Differential Revision: https://code.wildfiregames.com/D2722
This was SVN commit r23671.
2020-05-15 21:27:35 +00:00
Gallaecio
9b9410c923 [gui] building → structure
This patch corrects occurrences of “building” into “structure”.
Whilst “constructing a building” is proper English, it is important to
refer to one and the same thing with a single term, to avoid potential
misunderstandings (see
https://trac.wildfiregames.com/wiki/EnglishStyleGuide ), thence
“building a structure”, because the unit action is “build” and the
entity is a “structure” (see `simulation/templates/`).

Patch By: Nescio
Reviewed By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D2429
This was SVN commit r23366.
2020-01-11 10:58:43 +00:00
elexis
86c151ebaa PushGuiPage support for passing a function instead of a function name.
Allows coding the GUI without global functions which break
prototype-oriented coding, refs #5322, fixing the concern in 4b1297b328.

Supports stacked message boxes and removes the according workaround.
Change structree / civinfo switch-dialog code from 760a47335d to perform
the callback for page that actually registered the callback.
Ensure the parent that the callbackhandler is always called if the page
is closed.
Merge PopGuiPage and PopGuiPageCB following that choice, incidentally
leaving cleaner code.

Differential Revision: https://code.wildfiregames.com/D1684
Comments by: Yves, Vladislav, wraitii, leper
This was SVN commit r22676.
2019-08-16 18:46:04 +00:00
elexis
e370c509a6 Small closePage() cleanup for D1684.
Rename close() to closePage() for structree / template viewer / civ info
for global consistency.
Remove a splashscreen proxy and move splashscreen closing from XML to
closePage() in JS.

This was SVN commit r22669.
2019-08-15 13:29:11 +00:00
s0600204
760a47335d Add buttons for changing between, and hotkeys for opening, the civinfo and structree
Patch by: fpre
Reviewed By: s0600204
Fixes: #4970
Differential Revision: https://code.wildfiregames.com/D846
This was SVN commit r21339.
2018-02-23 20:54:28 +00:00
s0600204
9501292661 Merge the structree's loadUnit and loadStructure functions
The resultant function should be able to handle any (selectable) entity
template.

This was SVN commit r21174.
2018-02-11 04:09:28 +00:00
elexis
c53adeaaa6 Unify structree production queue loading duplication.
Differential Revision: https://code.wildfiregames.com/D1192
Reviewed By: s0600204
This was SVN commit r21022.
2018-01-26 22:18:35 +00:00
s0600204
f6b5488a24 Move unravelPhases function from structree to globalscripts for use in AI init.
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D1183
This was SVN commit r20750.
2018-01-02 06:38:09 +00:00
s0600204
00b05fd9f7 Use phase techs to determine phase order in structure tree.
(Instead of non-phase techs which is what it was using up to now.)


Reviewed/accepted by: mimo
Changes agreed (but not tested/formally proven) by: elexis

Differential Revision: https://code.wildfiregames.com/D1181
This was SVN commit r20749.
2018-01-02 06:23:33 +00:00
elexis
b5ea27904d JS GUI cleanup.
Mark g_CivData as const and don't use optional arguments at loadCivData.
Translate the infinity symbol in the summary screen.

Refs D829
Reviewed By: s0600204
This was SVN commit r20043.
2017-08-26 18:53:37 +00:00
elexis
c4cef0d289 Don't write two helper variables to g_CivInfo in the structure tree,
so that the object has the same content throughout the entire GUI and
can be marked read-only.

Refs D829
Reviewed by: s0600204
This was SVN commit r20042.
2017-08-26 17:57:11 +00:00
s0600204
cdf6109713 Relocate and Rearrange the structree codebase
Makes it possible to reuse the more generic parts of the `structree`
codebase in other pages without including `structree`-specific logic.
This sets the stage for further reference/encyclopedia-type pages.

Reviewed By: fatherbushido, elexis
Differential Revision: https://code.wildfiregames.com/D295
This was SVN commit r19940.
2017-07-31 12:49:00 +00:00