Commit graph

126 commits

Author SHA1 Message Date
Angen
eb3b7f089e Fix mod list filter
Fixing problem with filters reported in 64bfa089af.

Use filtered version of mods for manipulation in javascript instead non
filtered one.
Fixing following problems when filter is applied:
not enabling selected mod
displaying wrong tooltip
getting out of bounds error when using keyboard arrows to select
next/previous mod

This is also disabling possibility to sort enabled mods manually when
filters are applied. See comment in moveCurrItem for more details.

Differential Revision: https://code.wildfiregames.com/D1944
This was SVN commit r23269.
2019-12-20 20:19:21 +00:00
elexis
5a691463a3 Update sprintf.js library from 1.0.2 to 1.1.2.
Includes a changeset that removes a SpiderMonkey segfault from occurring
(when passing an XmppClient JS::Heap or JS::PersistentRooted GUIMessage
following 9023f4bebb), refs #5636.
https://bugzilla.mozilla.org/show_bug.cgi?id=1234425
https://bugzilla.mozilla.org/show_bug.cgi?id=1238475
61c7956242

sprintf.js commits that add new features:

padding (intent) support:
9e846915e2

Adds support for the %g placeholder
g — yields a float as is; see notes on precision above
a60a5705fc

Adds type option
T — yields the type of the argument1
c31c24ecef

Adds support for the %t (boolean) type specifier
t — yields true or false
b92b530c7a

Adds support for returning primitive values through the %v specifier
v — yields the primitive value of the specified argument
f18037240b

The other commits clean sprintf internals and do not change the existing
formats, see:
https://github.com/alexei/sprintf.js/blob/1.0.2/src/sprintf.js
https://github.com/alexei/sprintf.js/blob/1.1.2/src/sprintf.js
https://github.com/alexei/sprintf.js/blob/1.1.2/README.md

Differential Revision: https://code.wildfiregames.com/D2421
Tested by: Angen
This was SVN commit r23157.
2019-11-14 13:00:35 +00:00
elexis
92cbcf85e5 Rename CProgressBar numeric "caption" setting to "progress" to distinguish it from the Button, Input, Text and Tooltip "caption" setting values that are tag-formatted texts.
Remove TODO question from c4684effb6 since the class updates correctly.

Differential Revision: https://code.wildfiregames.com/D2419
Tested on: clang 9.0.0, Jenkins/gcc6, Jenkins/vs2015

This was SVN commit r23151.
2019-11-12 16:53:19 +00:00
elexis
31a2dd294e Fix top panel being hidden during pause mode following 702cdbf0c7 / D2292 reported by Freagarach, ValihrAnt, Krinkle et al.
Remove the false misleading default.cfg z value that is always
overwritten by CGUI::Xeromyces_ReadObject, both introduced in
e21ebb37f5.
Remove multiline property since its redundant with the default C++
boolean, making the default style more agnostic of final GUI Object
classes.

Close advanced locale dialog correctly upon cancel following 86c151ebaa
/ D1684.
Don't switch the background image when closing the credits dialog
following bcf2c75513, refs #3744.

This was SVN commit r22966.
2019-09-22 10:51:08 +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
d412b2010b Delete unused CCheckbox text setting remains following b1422137e5, refs 0f807c643a.
Differential Revision: https://code.wildfiregames.com/D2314
Tested on: clang 8.0.1., Jenkins

This was SVN commit r22952.
2019-09-21 03:11:18 +00:00
Stan
4b0b545fa9 Use the pyrogenesis logo instead of the 0 A.D. logo for the modmod when there is no mod selected because 0 A.D. Empires ascendant is just a mod of Pyrogenesis
Fixes #4782

refs: a89bcf837b f46d721630, 27d99765bb

This was SVN commit r22884.
2019-09-10 13:51:50 +00:00
elexis
0c3a610acc Delete invalid ModmodScrollbar style use and style property from 64bfa089af and 833c9f108c, identified by the LOGWARNING from be963ec9b7, reported by nani.
This was SVN commit r22800.
2019-08-29 07:56:26 +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
bb
7e1f959db0 redo 2d57478781, Create a ConfigDB_CreateAndWriteValueToFile function to absorb some duplication in the gui
Move two duplicated lines from 7e14a33411 in a function

fixes 2d57478781
Reviewed By: elexis
Comments By: Stan, vladislav
Differential Revision: https://code.wildfiregames.com/D1939
This was SVN commit r22615.
2019-08-05 14:12:55 +00:00
bb
3a77eb25d3 Fix ESLint semicolon-related warnings
Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D2004
This was SVN commit r22419.
2019-07-01 11:09:19 +00:00
vladislavbelov
ac1a56e0cc Fix cell text wrapping inside COList.
Patch By: gentz
Tested By: vladislavbelov
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D1717
This was SVN commit r22066.
2019-01-24 20:00:31 +00:00
Itms
5561327d3f Fix some untranslated strings, fixes #5155.
Patch By: Stan
Differential Revision: https://code.wildfiregames.com/D1560
This was SVN commit r21960.
2018-12-28 13:07:22 +00:00
elexis
6fe427664b Bump version to alpha 24.
Last alpha 23 commit was 0044c5c2e8.

Differential Revision: https://code.wildfiregames.com/D1705
Reviewed By: Itms
Comments By: Stan, smiley, bb
This was SVN commit r21951.
2018-12-26 11:28:37 +00:00
elexis
237c706dff Allow the user to print and save the text of the terms and conditions before the conclusion of the contract and use the word "Clickwrap agreement".
See EU Court of Justice decision C-322/14, refs #5257.
Adds one string.

Differential Revision: https://code.wildfiregames.com/D1657
This was SVN commit r21919.
2018-10-25 12:32:28 +00:00
elexis
9459825159 Remove two unused dangling gui xml references.
Revert the unintentional revert of 31e412b94e during the rebase of
ac7b5ce861.
Remove unintentionally copy-pasted onscreenToolTip reference from the
termsdialog following 74fbb4b823.

This was SVN commit r21917.
2018-10-24 12:04:11 +00:00
elexis
c69cf5076f Add COPPA compliance note to UserReporter and mod.io terms.
Outlaw cheating on the lobby as proposed by user1.
Phrasing improvement of b3631d7bd5 by Hannibal Barca.

This was SVN commit r21904.
2018-10-13 00:01:35 +00:00
elexis
209bab0255 New UserReporter Terms and Conditions, hopefully GDPR compliant, refs #5257.
Require SSL for the UserReporter clientside.

Differential Revision: https://code.wildfiregames.com/D1598
Includes contributions by bb and Itms

This was SVN commit r21898.
2018-10-05 22:19:28 +00:00
elexis
82740d9278 Mod.io Disclaimer.
Have the user accept explicitly that he is subject to the Terms and
Conditions and Privacy Policy by the DBolical Pty Ltd company when using
their service with our client.

Rely on luck that this is sufficient to count as educating the users
about the personal data processed, the purposes and legal grounds of
personal data processing and the GDPR user right to access, rectify,
erase, restrict and complain, refs #5257, GDPR 13.
The Mod.IO DMCA report possibility should be added eventually.
Remove FileExists hack from da49aa1541 / D1602.
Refs D1601, https://github.com/elexis1/0ad/tree/terms

This was SVN commit r21896.
2018-10-02 15:52:48 +00:00
elexis
a098f59a6b New strings for the Terms and Conditions dialog, refs #5257.
Button captions and instruction strings by bb from D1602.
For the UserReporter replace "anonymous feedback" with "feedback"
because it was never anonymized on Philips backend and won't be
anonymous on the new backend either, certainly until the logfile is
rotated and possibly arguably afterwards too.

This was SVN commit r21895.
2018-09-30 14:49:02 +00:00
elexis
74fbb4b823 Language selection dropdown in the terms dialog.
Allows the user to either read the english Terms and Conditions written
by Wildfire Games or the version translated into the current locale by
transifex users.
The underlying problem that Wildfire Games cannot verify the accuracy or
completeness of the translations while providing the services to a
global audience remains.

Refs #5257
Differential Revision: https://code.wildfiregames.com/D1643
Comments By: bb on irc, smiley, asterix
This was SVN commit r21894.
2018-09-29 21:25:04 +00:00
elexis
27c107a448 Inform users that they are subject to the mod.io Terms and Conditions and Privacy Policy and provide links following 833c9f108c / D1029. Refs GDPR #5257.
Add link to feedback.wildfiregames.com, which demonstrates users how
their data is going to be used.

Add link buttons to the Terms dialog (refs #4583), so that users are
informed of the terms prior to becoming subject to them.
Don't link the DMCA / copyright terms of mod.io now since I found no UI
with support for 3 buttons that doesn't appear unsatisfyingly ugly.
Adds 3 button captions and 1 tooltip string.

Differential Revision: https://code.wildfiregames.com/D1627
A Comment and a relatable patch in D1601 by smiley / (-_-).

This was SVN commit r21890.
2018-09-22 16:27:49 +00:00
elexis
82a89c4eb1 Move openURL function and two strings from public/ to mod/.
Use it for the mod author website now.
Use it for the terms links next, refs #5257, D1627.

This was SVN commit r21889.
2018-09-22 16:23:43 +00:00
elexis
da49aa1541 Refactor lobby terms and conditions UI from 80dbd1f2a3 / D1568 to a new terms dialog UI and reuse that for mod.io and the UserReporter, refs #5257, #5218.
Reuse all existing strings, use a FileExists hack for mod.io until the
new strings are committed.
Rename prelobby/common/terms/terms.js to termslobby.js for easier
distinction from common/terms.js.

Based on patch by: bb
Differential Revision: https://code.wildfiregames.com/D1602
refs https://code.wildfiregames.com/D1601
refs https://github.com/bb-bb/0ad/tree/terms
refs https://github.com/elexis1/0ad/tree/terms

This was SVN commit r21887.
2018-09-14 15:14:48 +00:00
elexis
7f4950cb17 Use https in hyperlinks for sites that support it, refs #5257.
This was SVN commit r21870.
2018-08-23 09:23:06 +00:00
Itms
a89bcf837b Fix the window icon that cannot be loaded in release packages, refs 27d99765bb.
Discussed with Imarok and elexis.

This was SVN commit r21812.
2018-05-01 20:29:36 +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
Itms
833c9f108c mod.io support.
mod.io is a new platform for sharing mods, that 0 A.D. can make use of
in order to download mods and install them.

Based on patch by leper, numerous changes from s0600204, vladislavbelov,
Imarok, elexis, temple and myself.
Differential Revision: https://code.wildfiregames.com/D1029
This was SVN commit r21759.
2018-04-22 18:14:45 +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
Imarok
724b25bac6 Style adjustments to 936c16050b
This was SVN commit r21738.
2018-04-17 17:31:11 +00:00
Itms
404e1a9a4a Add a mod installer, fixes #4027.
pyrogenesis can now take a zip file (rename it to .pyromod for direct
file association following 943a61e4ea) and install it. It then starts
the mod selector.

Patch by vladislavbelov, with contributions from Imarok, elexis and
myself.
Differential Revision: https://code.wildfiregames.com/D1142
This was SVN commit r21726.
2018-04-15 01:46:28 +00:00
Itms
3eaaddf3ef Implement a "modern" style progressbar.
Patch By: s0600204
This was SVN commit r21725.
2018-04-15 01:25:58 +00:00
Itms
5aaa8af3c0 Do not compute mipmaps for GUI textures in the mod mod.
This was SVN commit r21724.
2018-04-15 01:16:53 +00:00
Imarok
5094c05c6a Add images arcanist didn't manage to add in 7e23a43249
This was SVN commit r21722.
2018-04-14 20:23:12 +00:00
Imarok
936c16050b Make modmod looking nicer
Reviewed by: Itms
Differential Revision: https://code.wildfiregames.com/D1412
This was SVN commit r21721.
2018-04-14 20:04:17 +00:00
Itms
f46d721630 Use the 0 A.D. logo as window icon for the standalone pyrogenesis mod selector, fixes a warning.
Differential Revision: https://code.wildfiregames.com/D1427
Tested By: elexis
This was SVN commit r21654.
2018-04-04 14:12:29 +00:00
vladislavbelov
a1c4c23ce4 Adds axes to the CChart and the summary screen.
Comments By: elexis, Imarok
Reviewed By: s0600204
Trac Tickets: #4892
Differential Revision: https://code.wildfiregames.com/D474
This was SVN commit r21429.
2018-03-04 12:42:35 +00:00
bb
3698c134b5 Make sure dropdowns fit in the screen by allowing the list to be above when there is not enough space
Reviewed By: Vladislav
Differential Revision: D1061
fixes #4857

This was SVN commit r21379.
2018-02-25 22:26:31 +00:00
elexis
c69b5688bc Revert 8684e06ce0 / D1083 since the translated strings are only accessible while the public mod is enabled.
Reported By: leper
Reviewed By: Vladislav
Alternatively one might consider mod label and description translations
contained in the mod.json.

This was SVN commit r21341.
2018-02-24 00:33:30 +00:00
Imarok
d5807cd59f Check for and save mod version for savegames and replays
Reviewed by: elexis
Fixes: #4887
Differential Revision: https://code.wildfiregames.com/D955
This was SVN commit r21239.
2018-02-17 16:53:14 +00:00
elexis
8aaff7fc62 Implement an auto-scroll setting for GUI lists.
Patch By: fpre / ffffffff
Fixes #4987, refs #4254

This allows the replay menu and lobby to focus the selected element if,
but only if it is expected by the user.
Replaces 3f5648767d which scrolled the selected player into view every
single time a new playerlist was received by the lobby server.

This was SVN commit r20958.
2018-01-22 04:45:27 +00:00
bb
ac7b5ce861 New UI for gamesetup settings
Nuke the more options window
Create 3 tabs containing all options from more options and map options,
giving more space for new options
Rename options => settings in gamesetup

Reviewed By: elexis
Comments By: ffffffff and gentz
Differential Revision: https://code.wildfiregames.com/D1027
This was SVN commit r20945.
2018-01-21 12:35:47 +00:00
Stan
efa6bdf2c2 Remove the last occurence of multiply_color in the repo.
Fixes #2422

This was SVN commit r20832.
2018-01-11 12:44:43 +00:00
elexis
263c2c8c3c Fix my fail in 3cfb8730a8.
Reviewed By: rosievers
This was SVN commit r20701.
2017-12-27 16:53:29 +00:00
elexis
3cfb8730a8 Add helper function to apply arbitrary GUI tags (such as font and color).
This avoids the caller having to duplicate the GUI tag format over and
over again (equal to 54904b1750),
detects syntax errors at compile time and
applies the separation-of-concerns pattern (callers only have to specify
the tag value agnosticly of the tag format).

Differential Revision: https://code.wildfiregames.com/D1167
Patch By: fpre / ffffffff
Comments By: bb
Refs e1b13dead9

This was SVN commit r20697.
2017-12-27 13:36:28 +00:00
elexis
adc2bb872d Fix three wrongly chosen variables in 71121b8a89 / D1093, a wrong case-insensitive implementation and extend the tests to catch that.
Differential Revision: https://code.wildfiregames.com/D1151
Reviewed By: mimo
This was SVN commit r20656.
2017-12-15 23:37:43 +00:00
elexis
16dab5a587 Hide the cancel button in the modmod of the mod mod and the quit button when called from the public mod.
Differential Revision: https://code.wildfiregames.com/D1141
Reviewed By: Grugnas
Refs #4890

This was SVN commit r20645.
2017-12-12 16:06:52 +00:00
elexis
71121b8a89 Define, document, validate and test validation of the format of mod.json files.
The mod "name" may only consist of alphanumeric characters, underscore
and dash, because it should be used for mod dependency checks.
Drop two special characters from the "version" property.

Differential Revision: https://code.wildfiregames.com/D1093
Res #4427, d3ce5289b6
Reviewed By: Itms
This was SVN commit r20637.
2017-12-10 16:13:18 +00:00
elexis
8684e06ce0 Support translation of mod labels and description.
Differential Revision: https://code.wildfiregames.com/D1083
Reviewed By: Vladislav
This was SVN commit r20614.
2017-12-08 20:51:36 +00:00