9729 Commits

Author SHA1 Message Date
David Capello
c83dd16a43 Add TinyEXIF submodule 2024-10-28 18:40:23 -03:00
David Capello
35fcd94f04 Update laf (fix #4740) 2024-10-28 12:11:54 -03:00
Martín Capello
9667def753 Move kCallbackMessage logic to Widget 2024-10-23 23:09:28 -03:00
Martín Capello
cbac6f98a7 Fix MouseEnter and MouseLeave (fix #4240)
Callback messages were not being handled and since MouseEnter and
MouseLeave events were wrapped into CallbackMessages they were lost
and so never got called
2024-10-23 23:09:28 -03:00
دانتي باولا
85eb64ca35
Fix slice tool for tiles mode (fix #4306, #4705) 2024-10-21 14:58:54 -03:00
David Capello
a7799b76fc Add more tracing options to debug UI messages
Added REPORT_MOUSE/PAINT/TIMER_MESSAGES macros, and change _EVENTS to
_MESSAGES to avoid confusion with the current terminology.

The output string for each message was also simplified.
2024-10-17 19:23:52 -03:00
David Capello
71f6dbad28 Assert that we're in the UI thread in some ui::Manager functions
Simplify code removing DEBUG_UI_THREADS.
2024-10-17 15:30:18 -03:00
David Capello
a49bfe7f0a Lua was still being compiled as C (instead of C++) when generating Visual Studio solutions
We're compiling Lua as C++, but it seems that target_compile_options()
doesn't work for Visual Studio solutions (only for Ninja/makefiles).
The proper cmake solution to this issue is using
set_source_files_properties() to specify C++ as the language to use to
compile all Lua C files. This generates a valid Visual Studio solution.
2024-10-11 15:05:18 -03:00
David Capello
11883a51ff Disable Curl tests in compilation
This avoid creating a lot of testNNN projects inside the Visual Studio
solution generated by cmake.
2024-10-11 14:59:37 -03:00
Liebranca
0a45319e06 Fix cursor alignment and implement pivot point 2024-10-09 21:49:35 -03:00
Liebranca
dca06a53c0 Cap scaling to grid size 2024-10-09 21:49:35 -03:00
Liebranca
d6ddaa7a27 Snap cels to grid on moving cel action (fix #4027) 2024-10-09 21:49:35 -03:00
David Capello
384813421c [lua] Update scripting API version to 29
This should have been changed for v1.3.9.
2024-10-06 20:41:08 -03:00
Gaspar Capello
ff520c14d2 Fix transparency issue with new color criterias (fix #4686)
Prior to this fix, the following particular conditions caused
an incorrect conversion of an opaque color to a transparent color
during RGBA->Indexed conversion:
- RGBA image with black color (#000000 a=255) painted on the canvas
- The black color is absent from the palette.
- The mask color is present in the palette
- Converts the sprite to indexed color mode using
  Sprite > Color Mode > More Options
- Select Advanced Options, select a Color Best Fit Criteria other than
  Default (for example CIELAB) and press OK
- The original black color becomes the mask color.
v1.3.9.1
2024-10-04 10:37:28 -03:00
David Capello
e5faac07b5 Fix regression breaking linked cels on "Merge Down" (fix #4685) 2024-10-03 12:43:26 -03:00
Christian Kaiser
a975873f7a Fix Sentry wrapper compilation v1.3.9 2024-09-24 11:30:59 -03:00
David Capello
4e2488534f Don't show GPU checkbox in preferences dialog
This option is only available in ENABLE_DEVMODE, regression from
31c80a5e0c8724635eff173a64b88604de595367.
2024-09-23 15:04:11 -03:00
David Capello
c697a8767b Update laf module 2024-09-23 13:46:13 -03:00
Christian Kaiser
96438b789e WebP show_alert reset in options 2024-09-23 13:38:14 -03:00
Christian Kaiser
b10cc60fdb Add dont_show checkbox for WebP format 2024-09-23 13:38:14 -03:00
دانتي باولا
b40614ca36
Use FlattenLayers for MergeDownLayerCommand (#4643)
Rework of the cmd::FlattenLayers implementation to accommodates the
'Merge Down' command as a special case.
2024-09-20 17:25:09 -03:00
David Capello
d1e134d988 Don't read the magic number of all objects to show a backup description (#4610)
Now we lazily initialize the description of each backup on each
session. This means that only when we have to display the item on the
screen (onPaint) we'll ask for the description/doc
info (width/height/color mode, etc.). We've also removed the check of
all magic numbers of every single object in the backup when we only
need the doc description.
2024-09-19 19:13:47 -03:00
David Capello
340883a2f5 Don't use webp/freetype/harfbuzz libs/includes if they're not found
Fixes #3589, #3628, #3831, #3874, #4547
2024-09-19 16:14:32 -03:00
David Capello
c4e5473d1c Parse hour/minutes/seconds from session filenames (#4660) 2024-09-19 16:06:17 -03:00
Christian Kaiser
5860269358
Use new list_files, parse dates to check if sessions are old (#4660) 2024-09-19 15:50:02 -03:00
Christian Kaiser
31c80a5e0c Add reset preferences page (fix #4432, #4620) 2024-09-17 16:09:14 -03:00
Gaspar Capello
0f7cac0f0c [lua] Add get/set the foreground/background tile (fix #4403)
It's now possible to get/set the selected foreground/background tile
index. Example of use:

  app.fgTile = 1    -- the primary tile is '1'
  print(app.fgTile) -- this will show '1'
  app.fgTile = 0    -- the primery tile is 'no tile'
  print(app.fgTile) -- this will show '0'
  app.bgTile = 2    -- the secondary tile is '2'
2024-09-16 16:19:29 -03:00
Liebranca
46c57c91c7 Release mouse before command execution (fix #4484) 2024-09-16 14:31:22 -03:00
David Capello
0a1c5275a7 We have to list commands in Keyboard Shortcuts regardless of context
Removed KeyContext param from Command::isListed().
2024-09-16 10:53:31 -03:00
David Capello
55e1b320c4 Remove invalid ExportSpriteSheet definition from gui.xml 2024-09-16 10:37:36 -03:00
Gaspar Capello
04c45f4329 Fix duplicate items in keyboard shortcuts list (fix #4387)
Introduced Key::isListed() and Command::isListed() to customize when a
command should be displayed in the list of shortcuts.

Removed commands:
'Launch'
'OpenBrowser'
And removed unnecessary commands:
'Change Color Mode: Indexed'
'Contract Selection'
'Export Sprite Sheet'
'Flip Canvas Horizontally'
'Frame Properties'
'Load Palette'
'Open Sprite'
'Playback Speed 1x'
'Run Script'
'Save Palette'
'Select Used Colors'
'Set Palette Entry Size'
'Tileset Mode: Auto'
2024-09-16 10:14:12 -03:00
Gaspar Capello
a7a31f9a4a Fix duplicate "Zoom" items in the keyboard shortcuts list (#4387)
Before this fix, the following items were repeated in the list box:
'Zoom 600%'
'Zoom 800%'
'Zoom 1600%'
2024-09-16 10:08:47 -03:00
Gaspar Capello
aca9bf6bb7 Fix duplicate "Tiled Mode" items in the keyboard shortcuts list (#4387) 2024-09-16 10:08:35 -03:00
David Capello
12e253d1ef Revert [symmetry]reset_position string name
This was changed to reset_position_to_center in
d4c9a2fb36f44576db2dee76613525623d8b5b06 but it's better if we keep
the string ID as it is so we can use the existent i18n.
2024-09-16 09:32:07 -03:00
David Capello
984c62c39a Update laf module 2024-09-13 17:11:11 -03:00
David Czekalla
d4c9a2fb36 Add "Reset Symmetry to View Center" option (fix #4638, #4640)
Added an option in the ContextBar to reset the symmetry options to the
current view center.
2024-09-13 16:55:36 -03:00
David Capello
ec42689b82 Avoid setting an invalid mask color (-1) in doc::Image (fix #4651)
This regression came from 09bb5cc3d3676e88048d5cd845b075ea30ca8e66 as
now we don't Sprite::setTransparentColor() on each undo/redo and only
when needed. This brought a new kind of error where the mask color for
images was set to -1 after convert_pixel_format().

This also fixes a conversion from Indexed -> RGB where the transparent
color was not set back to 0. And the transparent color is always set
when we are in indexed mode to avoid any assert in debug mode.
2024-09-11 12:35:21 -03:00
David Capello
87407f2627 Add section about PR assignee in CONTRIBUTING guide 2024-09-10 16:31:22 -03:00
David Capello
81bf86f9e7 Update laf module 2024-09-05 18:36:10 -03:00
David Capello
410a4df7f7 Minor changes to header files 2024-09-05 18:34:16 -03:00
David Capello
adb537614f Always prefer unique_ptr over shared_ptr 2024-09-05 18:33:07 -03:00
Gaspar Capello
e70bbbd369 Add 'x' and 'y' as input parameters to app.command.Paste() 2024-09-05 17:22:12 -03:00
Gaspar Capello
de1fc581f2 Fix app.command.Cut/Paste does not work in --batch mode (fix #4354)
This fix adds support for cut/copy/paste selected areas during
script execution when there isn't UI.
2024-09-05 17:22:12 -03:00
David Capello
09bb5cc3d3 Restore transparent color correctly after undoing Indexed -> RGB
When we are in Indexed mode we can have a specific index as the
transparent color, if we convert the sprite to RGB, that transparent
color is lost, so we have to save it (in a cmd::SetTransparentColor)
to restore it correctly when we undo the ChangePixelFormatCommand.
2024-09-04 15:59:18 -03:00
Christian Kaiser
d62d279a34
Fix extensions wrongly being detected as "built-in" (#4625) 2024-09-04 15:42:47 -03:00
Gaspar Capello
5798e27993 Fix mask color turns to opaque on RGBA->INDEXED conversion (fix #4438)
Original issue title: When using a background layer, switching to
Indexed Color Mode fills all layer bounding rectangles with
Color 0.
Conditions to reproduce the original issue:
- Opaque RGBA sprite, i.e. the bottom layer is 'Background'.
- There is a second layer with an ellipse (for example).
- There is a mask color #000000 alpha=0 is in the palette.
- The mask color index is greater and not equal than 0.
- Go to Sprite > Color Mode > Indexed.
Result: the transparent color of the second layer will change to
index color = 0 (usually black).

Also added test for RGBA->INDEXED conversion
2024-09-04 13:48:56 -03:00
Gaspar Capello
c8f018f2f1
Fix exporting a Sprite Sheet with Group name has different functionality between CLI and Scripting (fix #4456) (#4475)
Before this fix, the lua command:
app.command.ExportSpriteSheet
could not process a layer within a group when the layer name
was expressed using the layer hierarchy path, for example:
layer = "Group1/Layer1"
2024-09-03 20:20:36 -03:00
David Capello
9429d915ae [lua] Fix default color/bgColor params in app.useTool()
We can select the default color or tile from preferences depending if
we're going to paint pixels or tiles

Fixes a confusing logic from 4a91d150af97e70e588e82d698dc8c5e0db8e6fe
where the bg color was obtained from preferences only when the fg
color type (rgb/gray/index/hsv/tile/etc.) was equal to the bg color
type from the preferences (rgb/gray/index/hsv/tile/etc.).
2024-09-03 19:25:19 -03:00
David Capello
240d481645 Simplify app_get_color_to_clear_layer() in CLI-mode
Just use the background color without preprocessing the index color.
2024-09-03 19:24:02 -03:00
David Capello
afb8a3d94a [lua] Minor change app.pixelColor -> pc in test 2024-09-03 19:11:14 -03:00