Commit graph

18 commits

Author SHA1 Message Date
elexis
702cdbf0c7 Remove GUI object setting values z="0", size="0 0 100% 100%", hidden="false" in XML page specifications that are redundant with the default style values.
Remove question by brian in single_details_area.xml from b66d1716e7
which is answered by "because the style set it".
Delete BuildNameText style, because it specifies ghost="true" in both
style and sole object using the style.
Don't touch progressbar and structree styles, because there is more to
clean.

Differential Revision: https://code.wildfiregames.com/D2292
This was SVN commit r22957.
2019-09-21 15:54:25 +00:00
elexis
be963ec9b7 Delete 27 invalid style settings and add LOGWARNING to inform future authors.
Unify the two IGUIObject::LoadStyle functions and remove CGUI argument
that is always identical to the member.

Differential Revision: https://code.wildfiregames.com/D2232
Tested on: gcc 9.1.0., clang 8.0.1, Jenkins

This was SVN commit r22792.
2019-08-27 16:03:24 +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
Itms
e84e712801 Enlarge some GUI elements in order to display correctly the majority of strings for the bundled languages.
This was SVN commit r21804.
2018-04-29 14:34:10 +00:00
elexis
db07c11216 Maximize civ selection dropdown size in the gamesetup, i.e increase the size by 3 more civs.
Further increasing the size for mods was neglected in d6c028923e / D527
and
Delenda Est had a copy of gamesetup.xml to extend the size already.

This was SVN commit r21353.
2018-02-24 12:19:47 +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
c8fda40b02 Implement an in-game Template Details Viewer
Right-click on icons of units, structures, technologies, flora, fauna,
etc. and view additional details.


Reviewed By: elexis
Fixes: #3212
Differential Revision: https://code.wildfiregames.com/D297
This was SVN commit r21310.
2018-02-21 21:39:00 +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
9950e06d4c Include entire directories in GUI pages instead of a subset of the files contained, where possible.
This allows mods to add new JS files without introducing a hardly
maintainable copy of the XML file.

Differential Revision: https://code.wildfiregames.com/D619
Proofread By: bb
This was SVN commit r20535.
2017-11-27 16:29:23 +00:00
elexis
89055ef858 Delete GetCivData from MapGeneratorWorker.cpp which is redundant with the ReadJSONFile from 871ed04521.
Unify civ file loading from gui/common/functions_civinfo.js and
rmgen/library.js in globalscripts/Templates.js.
Delete the two forgotton headers in 4275a8a33c.

Refs #4868, #4804, D900.
Differential Revision: https://code.wildfiregames.com/D1062
Discussed with: leper

This was SVN commit r20528.
2017-11-26 13:30:57 +00:00
elexis
3c73b329f2 JS cleanup.
Mark global consts as variable if mods can legitimately modify them.
Keep global objects const if mods should insert their modifications at a
different place, refs D829.
Mark the few consts inside function scope as let or var for consistency.
Don't touch the AI, simulation test and rmgen folder.
Change some var to let.
Remove an unused variable in the mainmenu and summary screen.
Inline few variables.

This was SVN commit r20047.
2017-08-26 20:10:39 +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