Commit graph

6 commits

Author SHA1 Message Date
Dunedan
93ce94655d
Use @stylistic/brace-style for eslint
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
2026-01-12 21:33:52 +01:00
Ralph Sennhauser
f3ac9e9669
Fix eslint rule 'default-case'
Manual fixes needed for:
eslint --no-config-lookup --rule '"default-case": 1'

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-28 19:24:50 +02: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
marder
a6c1d5bbb9 revert last commit / 39dd5329cc
Misscommunication if this was the right move or not.

Leave the size as it was until someone has time to fix all buttons at
once.

This was SVN commit r26987.
2022-06-24 16:41:53 +00:00
marder
39dd5329cc [GUI] increase msgbox button size to fix text overlap
Report:
https://wildfiregames.com/forum/topic/82754-alpha-26-pre-releaserelease-candidate-build-testing/page/6/#comment-504135

3ab25cbd95 added a new button which has more text and can span have
multiple lines in some languages.
Fix: increase the size.
possible todo for the future: unify button sizes or make them adaptive
depending on the text size.

comments by @Langbart @Stan

accepted by @wraitii

Differential revision: https://code.wildfiregames.com/D4707
This was SVN commit r26986.
2022-06-24 11:19:17 +00: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