9761 Commits

Author SHA1 Message Date
David Capello
b2e4f78b69 clang-format all files 2024-12-16 10:10:34 -03:00
David Capello
4b3ff3369e Update laf module 2024-12-16 09:52:55 -03:00
David Capello
d8fdc22648 [precommit] Add .m and .mm files to clang-format 2024-12-14 00:07:23 -03:00
David Capello
d0dbc78f1c Revert "[clang-format] Set SeparateDefinitionBlocks=Always"
This reverts commit d38565f64e4c0304b8ea2ae060c9e1c11ba5a863.

It added blank lines between one line member function definitions
inside class bodies/header files, something which is undesirable.
2024-12-13 19:59:24 -03:00
David Capello
6555e74d83 [clang-format] We use west const (might fix #4361) 2024-12-12 22:16:55 -03:00
David Capello
b146f0648e [clang-format] Set PackConstructorInitializers=CurrentLine
We prefer two kinds of formatting for constructors:

  Ctor() : a(), b() {}

  Ctor()
    : aaa()
    , bbb()
    , ccc()
2024-12-12 21:53:22 -03:00
David Capello
70ec2d422f [clang-format] Enable the alignment of short "case: break;" statements 2024-12-12 20:13:40 -03:00
David Capello
f19cbe8a37 [clang-format] Set AllowShortCaseLabelsOnASingleLine=true
Allows "case value: stmt; break;" in one line if it's short enough.
2024-12-12 20:02:36 -03:00
David Capello
d38565f64e [clang-format] Set SeparateDefinitionBlocks=Always
With the current code it makes no difference, but it will force new
definitions to be in its own block, e.g. we cannot define two
functions without a blank line between then.
2024-12-12 19:54:49 -03:00
David Capello
4a9ccf27b4 [clang-format] Set ReflowComments=1 to allow adjusting comments
Allows to format the code in better ways adjusting the comments to fit
the column limit. In few cases the comment will require to be moved to
other place (e.g. at the top of a statement rather than to the side of
it).
2024-12-12 19:45:39 -03:00
David Capello
1447e829f7 [clang-format] Change AllowAllParametersOfDeclarationOnNextLine=false
With this we prefer to format a function declaration as:

  int function(arg1,
               arg2,
               arg3);

Rather than:

  int function(
    arg1, arg2, arg3);

Cons: This makes the definition of NewParams structures a bit worse.
2024-12-12 19:29:01 -03:00
David Capello
17bb11fc42 [clang-format] Change SpaceInEmptyBlock=false
I love { } for empty blocks, but it looks like {} is too common among
developers now.
2024-12-12 19:20:05 -03:00
David Capello
28043e8305 [clang-format] Change SpacesBeforeTrailingComments=1 2024-12-12 19:15:20 -03:00
David Capello
b38a3c03eb [clang-format] Change AllowAllArgumentsOnNextLine=false
With this we prefer to format function calls as:

  int value = function(arg1,
                       arg2,
                       arg3);

Or:

  int value =
    function(arg1, arg2, arg3);

Rather than:

  int value = function(
    arg1, arg2, arg3);
2024-12-12 19:03:04 -03:00
David Capello
215f22cce3 [clang-format] New ColumnLimit=100 and new penalty weights
Making PenaltyBreakAssignment bigger creates better looking
const/variable declarations, where the following term to the
assignment operator is in the same line.
2024-12-12 18:38:53 -03:00
David Capello
8cf1a185b6 [clang-format] Set AlignArrayOfStructures: Left
We get better results when defining command Params and scripting
structures (methods/properties).
2024-12-12 16:28:52 -03:00
David Capello
aff027dcf4 Update clang-format config with --dump-config (clang-format v19.1.5) 2024-12-12 15:52:32 -03:00
Christian Kaiser
2f0c107c3b Sort clang-format file 2024-12-12 13:44:52 -03:00
David Capello
8e1eee3b9c Enable clang-format config for C++ and Objective-C files 2024-12-11 16:27:07 -03:00
David Capello
cb19167a6f Update laf module 2024-12-11 15:24:33 -03:00
David Capello
6cc0bbd0bf [precommit] Add GitHub action 2024-12-11 08:30:16 -03:00
David Capello
df19b09c23 Avoid using tabs in run-tests.sh expected output 2024-12-10 22:42:22 -03:00
David Capello
a154faf3f9 [precommit] Default EOL as LF (and CRLF for .cmd and .ps1 files) 2024-12-10 22:38:57 -03:00
David Capello
67a971618d [precommit] Allow tabs in .gpl files and .gitmodules 2024-12-10 22:15:30 -03:00
David Capello
e47148a360 [pre-commit] Autoupdate packages 2024-12-10 14:06:43 -03:00
David Capello
db7c4658be [pre-commit] Remove codespell 2024-12-10 14:00:21 -03:00
Christian Kaiser
102624cad3 Add pre-commit configuration and documentation. 2024-12-10 13:52:39 -03:00
David Capello
f5f3cc03b9 Update laf module 2024-12-10 13:51:35 -03:00
David Capello
70f2cd9559 Remove duplicated code checking if mnemonic+modifiers are pressed 2024-12-10 10:16:20 -03:00
David Capello
cfc92e7cdb Add { } in switch-case to define vars inside
This is required if a new case is added below in the future to avoid
compiler errors. It's better to always use { } if we're going to
define local variables for the case.
2024-12-10 09:31:32 -03:00
Martín Capello
0edc4e16ed Disable and reset columns/rows according to type 2024-12-10 09:30:29 -03:00
Martín Capello
26a750108c Break long line 2024-12-10 09:30:29 -03:00
Martín Capello
a0e8f8653c Add columns and rows parameters 2024-12-10 09:30:29 -03:00
Martín Capello
9ca6368088 Fix button's kKeyUpMessage handling
Now the checkbox button skips the kKeyUpMessage when the key being
depressed is not the space key and is not the associated mnemonic key.
Before this change, for instance, if a checkbox received the focus by
using the Tab key, the kKeyUpMessage (of the Tab key) was intercepted by
the checkbox and triggered the onClick() event.
2024-12-10 09:30:29 -03:00
Martín Capello
8a8a324651 Add columns and rows fields to Import Sprite Sheet 2024-12-10 09:30:29 -03:00
Martín Capello
a99161a2d2 Add MaskByColor command lua tests 2024-12-09 19:26:46 -03:00
Martín Capello
ad0d30b2df Set appropriate default parameters values
Take the default values for the command parameters from the UI when the
UI is available and ui=false
2024-12-09 19:26:46 -03:00
Martín Capello
8d7e6e3f5b Remove MSVC warning deactivation
This is because now it is disabled by using laf-base flags
2024-12-09 19:26:46 -03:00
Martín Capello
2596af548a Add "ui" param to MaskByColorCommand (fix #2774) 2024-12-09 19:26:46 -03:00
Martín Capello
4dc7ba6dc0 Move code into a MaskByColorWindow class
Refactor code to separate responsibilities, now the UI related code is
in its own class and the command class looks cleaner
2024-12-09 19:26:46 -03:00
David Capello
5464c4a3c2 Minor fixes for the new "tile index" in status bar (#2082)
* Only show when we are inside the grid bounds or tilemap layer
  bounds (don't show it for negative tile positions)
* Count final "partial column" for the tile index
2024-12-09 15:26:16 -03:00
Liebranca
ebd17b0ced Show grid cell index in status bar (#2082) 2024-12-09 15:11:06 -03:00
Gaspar Capello
951c2d0de9 Fix 'cel.image = nil' is not allowed (fix #4514)
Now 'cel.image = nil' results in the cel remotion.
2024-12-09 12:05:40 -03:00
Gaspar Capello
f7a9f44cec Fix Magic Wand doesn't work correctly in Tiled Mode (fix #4659) 2024-12-06 09:45:30 -03:00
David Capello
77e0944baa Add more instructions about how to solve an incomplete cloned repo
Related to issues commented in #4562 and #4866
2024-12-05 10:16:55 -03:00
David Capello
97dc9c8988 [osx] Fix showing the native window back when the app is hidden (fix #4857) 2024-12-03 22:25:12 -03:00
Ryan Carsten Schmidt
2b97e44dfd Set ZLIB_FOUND ON rather than unset it
Fixes #4854
2024-12-03 07:27:41 -06:00
David Capello
f710603f99 Update SDK dirs of all CMakeFiles/*/*.cmake files too (#4773) 2024-12-02 00:19:24 -03:00
David Capello
0905e974cd Add option to update the MSVC cl.exe dir for all builds (#4773)
CMakeCache.txt and other files (rules.ninja, other .cmake files) save
the full path to the cl.exe binary, including the specific MSVC
version. We've added an option to update that specific version to
continue using all builds/configurations with the new updated path to
cl.exe.
2024-12-02 00:07:30 -03:00
David Capello
8241e03612 Fix clang-tidy-review action 2024-11-27 15:20:15 -03:00