1
0
forked from 0ad/0ad
0ad/source/gui
wraitii 557fa0312e Fix non-visual autostart, as well as client/host autostart.
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.
2022-05-15 06:34:17 +00:00
..
ObjectBases Adds header for forward declarations of CStr. 2021-09-09 17:39:08 +00:00
ObjectTypes Avoids drawing text in GUI if it will be clipped. 2022-05-10 16:32:25 +00:00
Scripting Fix non-visual autostart, as well as client/host autostart. 2022-05-15 06:34:17 +00:00
SettingTypes Set the size of the overlaybox without relying on the arbitrary initSize 2022-03-02 16:27:11 +00:00
tests Remove executable bit on some source files. 2021-09-12 18:41:51 +00:00
CGUI.cpp Allied chat opens with t bug (on linux) 2022-03-03 11:36:08 +00:00
CGUI.h Allied chat opens with t bug (on linux) 2022-03-03 11:36:08 +00:00
CGUIScrollBarVertical.cpp Provides Canvas2D for sprite rendering. 2021-05-29 19:47:36 +00:00
CGUIScrollBarVertical.h Provides Canvas2D for sprite rendering. 2021-05-29 19:47:36 +00:00
CGUISetting.cpp Split off JSON-related function from ScriptInterface, clean up headers. 2021-05-14 10:18:03 +00:00
CGUISetting.h Split JS conversions from ScriptInterface. 2021-05-13 09:43:33 +00:00
CGUISprite.cpp Removes raw pointers management from sprites owned by CGUI. 2021-06-06 00:32:49 +00:00
CGUISprite.h Moves texture management to CDeviceCommandContext, adds quality options. 2022-02-13 19:30:28 +00:00
CGUIText.cpp Avoids drawing text in GUI if it will be clipped. 2022-05-10 16:32:25 +00:00
CGUIText.h Fix BufferZone in right alignment 2022-03-02 16:14:05 +00:00
GUIManager.cpp Allied chat opens with t bug (on linux) 2022-03-03 11:36:08 +00:00
GUIManager.h Uses CDeviceCommandContext as an input parameter for CCanvas2D. 2022-02-25 08:14:11 +00:00
GUIMatrix.cpp Make scale variables constant 2022-02-06 11:11:35 +00:00
GUIMatrix.h Move GetDefaultGuiMatrix to a separate file. 2019-08-04 03:52:00 +00:00
GUIObjectTypes.cpp Map flares 2021-06-05 17:37:18 +00:00
GUIRenderer.cpp Moves texture management to CDeviceCommandContext, adds quality options. 2022-02-13 19:30:28 +00:00
GUIRenderer.h Fixes builds after d0115185b9 by removing includes to res handle. 2022-02-14 06:29:50 +00:00
GUIStringConversions.cpp Replaces CPos by more a consistent CVector2D, reduces geometry code duplication. 2021-03-28 21:55:13 +00:00
GUITooltip.cpp Change GUI settings to explicitly be member variables. 2021-05-06 08:22:37 +00:00
GUITooltip.h Generalize icon-specific tooltips to a tag, streamline code. 2021-05-01 12:38:05 +00:00
IGUIScrollBar.cpp Replaces CPos by more a consistent CVector2D, reduces geometry code duplication. 2021-03-28 21:55:13 +00:00
IGUIScrollBar.h Provides Canvas2D for sprite rendering. 2021-05-29 19:47:36 +00:00
SGUIIcon.h Moves CSize into a separate file and renames it to CSize2D according to other geometric entities. 2021-03-27 16:08:06 +00:00
SGUIMessage.h Allow right-click on disabled buttons. 2020-11-14 18:16:24 +00:00
SGUIStyle.h Move GUIbase structs and enums to separate files. 2019-10-01 12:46:55 +00:00