Follows f8d2927748.
There is an issue with text-wrapping and word separators (aka spaces).
Because 0 A.D. collates the space after a word to the same TextCall, we
occasionally need to ignore it when considering line-wrapping, because
we don't want empty spaces on the right-side of right-aligned text.
However, the logic to handle this is currently broken and inconsistent.
The method introduced here uses the SFeedback structure to properly
report it and generalises the checks.
Note that multiples spaces are not collapsed in 0 A.D., and for
consistency the word-separator-collapsing behaviour is ignored.
Comments by: phosit, vlasdislavbelov
Fixes#6551
Differential Revision: https://code.wildfiregames.com/D4662
This was SVN commit r26915.
Follows 8eecc39e71.
Piping the autostart through a GUI page is easy but requires using the
GUI in non-visual mode, which is problematic since it's not initialized.
The GUI is not needed, only its ability to load scripts, so this diff
fixes the problem by adding an 'entrypoint' script in the new
`autostart` folder that gets called with this unique ability, setting
things up properly. The mod mod gets a placeholder.
Other changes:
- Fix some issues with networked autostart:
- Players were not assigned slots.
- The host didn't actually wait for other players.
- Move gamesettings from `gui/gamesettings/` to `gamesettings/`. This
moves attributes as well.
- Move autostart files from `gui/autostart/` to ` autostart/`. Note that
`gui/autostart/` still exists as it's used in the tutorial button from
the main menu.
- Rename the JSI_VFS functions to be explicitly about their function:
the ability to write and the potential restricted folders.
- Don't require `autostart` when using `--autostart-client` in
non-visual mode.
Starting the autostart client/host has poor UX in some situations, but
improving that feature is beyond the scope of this diff.
Suggestions for future work:
- Some files in gui/common should probably be moved elsewhere
- Template loading code is duplicated
- The gamesetup code still needs work for proper UI/logic separation.
Help & comments by: smiley
Reported by: vladislav / Langbart
Fixes#6513
Differential Revision: https://code.wildfiregames.com/D4628
This was SVN commit r26879.
Users sometimes ended up with bad (wrong version) XMB files in the user
mod. This resulted in A25 loading a black screen.
There is a combination of unfortunate code paths that lead to this. The
core issue is that:
- cdd75deafb changed the XMB loading code that if there is an error in
Init from a cached XMB, it reports an error. This error happens to be
silent, because the GUI expects CXeromyces to do its own error reporting
(a pretty poor decision, all in all, but whatever). This explained why
the black screen showed no errors.
- The code flow attemps to load an 'archive' XMB first, then only a
loose cache. _But_ if the XMB that fails to load is an archive (which
generally never happens except when using incompatible mods, which is
generally less easy in A25 since we added code to stop that), then the
game will try to recreate the XMB as an 'archived' path, not a 'loose
cache' path as it would usually do.
- Because the 'archived' path already exists in the VFS, the game will
attempt to overwrite that. It so happens that in non-dev copies, this
writes to the user mod.
- Because the user-mod is always loaded, this was unexpected for users.
Fixing this is rather simple: the game should never attempt to write
'archive' XMBs in that function. Added explicit barrier, which shouldn't
matter performance-wise but fixes the issue by writing in the proper
place, and also properly recovering in case of read failure.
I will note that the game will still try to load the archived file, and
recreate it every time, but I don't think that's a particularly big
deal, in general having engine-incompatible mods in the future should be
harder because of A25 changes there.
(NB: users that have used both A24 and A25 should perhaps still be
advised to check their user mod folder, otherwise they'll end up
recreating those files forever).
Reported by: dave_k
Fixes#6320
Differential Revision: https://code.wildfiregames.com/D4275
This was SVN commit r26272.
Cursor should not blink in read-only.
The path was too similar to the list and thus easy to miss, it has been
changed to a 'golden' colour.
A tooltip was added to the path.
The border colour of input fields was changed from white to gold.
The buttons at the bottom of the page are spread evenly.
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4296
Refs: #6350
This was SVN commit r25976.
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.
It removes the software implementation intentionally. Because it
duplicates SDL functionality. But it might be added in future on demand.
Tested By: bb, Langbart
Differential Revision: https://code.wildfiregames.com/D4278
This was SVN commit r25936.