Commit graph

7 commits

Author SHA1 Message Date
Ralph Sennhauser
7684e12717
Fix eslint rule 'prefer-const' in modmod
eslint --no-config-lookup --fix --rule '"prefer-const": 1' \
    binaries/data/mods/mod

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-06 13:49:13 +02:00
phosit
d3bc5bc802 Enable page-inits to return a Promise
Allows to return the page-completion-value instead of passing it to an
`Engine` function.

Closes: #7000
2025-03-09 10:39:20 +01:00
phosit
36b9fd7b42 Return a promise from setButtonCaptionsAndVisibility
Now It's not hardcoded what is done if a button is pressed. The caller
can decide that.
Previously one had to call this function and then overwrite the on Press
attribute of each button.

Rename "Visibitily" to "Visibility" in setButtonCaptionsAndVisibility.
2024-10-17 20:47:54 +02:00
Angen
b4fbbed379 There have been quite a bit of number of questions how to change scale of the gui, because this option is hidden from the user.
Use dropdown with values. Implement confirmation box with countdown to
revert scale change because buttons can get unable to click.

Differential revision: D3037
Comments by: @vladislavbelov, @Stan, @wraitii, @pieq, @sera
Tested by: @Langbart
This was SVN commit r25966.
2021-10-17 10:58:51 +00:00
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
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
Itms
364eaa34c6 Move some utility functions from the public mod to the mod mod in preparation for upcoming commit.
Small fixes and improvement while I'm at it, by temple and elexis.

This was SVN commit r21754.
2018-04-22 12:03:51 +00:00