Up to now `eslint-plugin-brace-rules` was used to enforce a common brace
style for JavaScript code. This plugin was however updated the last time
over 9 years ago and will be incompatible with ESLint v10, as that
[removes `context.getSourceCode()`][1], the plugin relies on.
To keep the eslint config working with ESLint v10, this replaces
`eslint-plugin-brace-rules` with the [`@stylistic/brace-style`][2] rule
from `@stylistic/eslint-plugin`, a package we already use.
While `@stylistic/brace-style` doesn't offer an option to format braces
in exactly the same way as before, the "allman" style seems to be the
one closest to the existing code.
[1]: https://eslint.org/blog/2025/11/eslint-v10.0.0-alpha.0-released/#removed-deprecated-rule-context-members
[2]: https://eslint.style/rules/brace-style
It is possible to modify sizes by setting the properties directly.
(Without having to create a copy of it)
This allows to shorten those passages quite a bit without any functional change.
When the root page gets closed the engine quits instead or crashing.
The root pages are changed to use that mechanism to quit the engine.
This removes the need of `Engine.Exit` for the GUI.
This implements necessary tooling to create a simple SP campaign.
The architecture is intended to be easily extensible in the future.
'Campaign Run' contains the metadata of a campaign, e.g. maps
played/won. It's saved in the user folder under
saves/campaigns/*.0adcampaign
Campaign templates are JSON files in campaigns/
Campaigns can specify which Menu interface they will use. This is
intended to allow more complex layouts/presentation.
For now, a simple list interface is provided. This allows making
campaigns without any fancy art required (and effectively mimics AoE1's
campaign interface).
The behaviour on game end is also intended to be extensible, supporting
things such as carrying over units between scenarios - for now, it
simply records won games.
GameSetup is not available for now - scenarios are triggered with the
settings defined in the map/default settings. Improving on this requires
refactoring the gamesetup further.
The load/save game page has been extended slightly to support
showing/hiding campaign games (campaign gamed are saved under saves/
directly, there is no strong motivation to do otherwise at this point)
Closes#4387
Differential Revision: https://code.wildfiregames.com/D11
This was SVN commit r24979.
Change HotkeyPress event to be non-repeating (HotkeyDown to replace the
repeating case)
Fix shiftlag
Make toggle hotkeys only respond to the first SDL event.
Many iterations of review by: elexis
Test done by: Imarok
Comments By: vladislav, Stan
Reviewed By: wraitii
Fixes: #5055
Differential Revision: https://code.wildfiregames.com/D1398
This was SVN commit r23701.
Add class MainMenuPage, BackgroundLayer, remove duplication of XML size
values in the MainMenuItemHandler,
remove onTick assignment from XML, replace references to globals with
local references.
Differential Revision: https://code.wildfiregames.com/D2390
Comments By: Stan
This was SVN commit r23093.
Specify menu and submenu buttons title, tooltip, hotkey and actions
comfortably in an extensible JS object and derive the GUI object
settings based on that rather than relying on complex markup alternating
with JS in the same file.
Automatically compute the position and number of submenu items instead
of letting the author manually compute and keep that in sync in various
places of the XML file.
Use object oriented programming, so that there is a strong separation of
concerns, allowing the readers and authors to only involve themselves
with the component relevant to the feature they work on, refs #5387.
Use class keyword instead of prototype keyword for the JS classes,
because that enforces a policy where no globals are inserted between
class members and informs the reader of that as soon as reading the
classes first line, anticipating fragmentation.
Group project information and community links in a more clearly arranged
JS file.
Keep and document splashscreen onTick hack from a684f7646b, #2042,
#5578.
String change: Inform instead of warn (deter) about the state of the
game in the main menu.
Depends on Engine.SetGlobalHotkey from D2260.
Differential Revision: https://code.wildfiregames.com/D2240
Class syntax comments by: Krinkle, bb, Chakakhan, smiley, nani, fpre
Main menu comments by: Krinkle, nani, Stan (and Imarok in D820)
This was SVN commit r22854.