9776 Commits

Author SHA1 Message Date
Martín Capello
9e396227c2 Refactor HAS_MOUSE flag handling
Now each widget is responsible to enable/disable its own HAS_MOUSE flag
in response to the kMouseEnter/Leave message received. Also there is no
need to iterate over the parents since these messages are propagated
to the parent
2024-10-30 10:10:31 -03:00
Martín Capello
f67643a24e Avoid using CallbackMessage for MouseEnter/Leave
Instead of wrapping the MouseEnter and MouseLeave OS events handling
inside a UI CallbackMessage, we now enqueue the corresponding
kMouseEnterMessage and kMouseLeaveMessage
2024-10-30 10:10:31 -03:00
David Capello
6093282ac3 Add pin/unpin icon to font search field (#4617, #4692)
With this we can finally easily save font presets, even references to
external .ttf files.
2024-10-29 09:48:23 -03:00
David Capello
77dd92c679 Don't overlap search icon with text in SearchEntry 2024-10-28 15:32:41 -03:00
David Capello
b547b96835 Paint caret in ui::Entry even when there is no text 2024-10-28 15:28:01 -03:00
David Capello
aed7c6a3b1 Merge branch 'main' into beta 2024-10-23 23:10:45 -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
David Capello
ed39f40efc Fix crash/assert fail rendering UTF-8 file names w/CHARWRAP (fix #4624)
This could happen when painting text with CHARWRAP, where we removed
byte by byte from the end of the string, instead of removing (or
adding) well-formed UTF-8 string spans.
2024-10-22 16:05:03 -03:00
David Capello
4c06fbdaf3 Improve font search/selection from the context bar (#4692)
Improves the way we can write text to search a font, use up/down keys
to navigate through the font list, and use Enter/Esc keys to select
the font and go back to the text box.
2024-10-22 14:51:23 -03:00
دانتي باولا
85eb64ca35
Fix slice tool for tiles mode (fix #4306, #4705) 2024-10-21 14:58:54 -03:00
David Capello
b90807f3e3 Merge branch 'main' into beta 2024-10-21 11:09:01 -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
8b7370a77a Improve click behavior to cancel Text box tool (#4692)
We've moved the logic to interpret "a single click" from DrawingState to
DelayedMouseMove.
2024-10-14 13:32:43 -03:00
David Capello
5b88ea8532 Merge branch 'main' into beta 2024-10-11 15:16:32 -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
David Capello
e900f2dfd9 Fix blending of rendered text into semi-transparent pixels (#4692) 2024-10-10 16:48:51 -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
8fd882d90b Merge branch 'main' into beta 2024-10-08 15:06:57 -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
David Capello
08d9101b62 Fix mouse capture being lost when scrolling list of fonts
As font thumbnails are generated on-demand, each time a new thumbnail
is generated, the viewport will be updated (updateView() called). This
viewport update will remove the scroll bars temporarily which will
remove the mouse capture from them, but we'd like to preserve that
capture so the mouse can continue dragging the mouse/scrolling.
2024-09-27 19:01:51 -03:00
David Capello
ec3f8617f0 Update laf module 2024-09-27 18:10:06 -03:00
David Capello
5c7a3a41f6 Add ligatures button to Text tool (#4679)
Doesn't fully fix the issue as we cannot move the cursor between the
ligature clusters, but at least we can disable the ligatures now.
2024-09-25 16:37:41 -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
e700cce987 Merge branch 'main' into beta 2024-09-23 15:03: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
David Capello
7e504ad5ea Merge branch 'get-gc-from-image' into beta (#4605) 2024-09-16 16:05:02 -03:00
Martín Capello
100ce10618 Add Image.context lua tests 2024-09-16 16:03:41 -03:00
Martín Capello
51c976f167 Add GraphicsContext format hint member
This helps in setting the right paint color when using GraphicsContexts
based on non RGB images.
2024-09-16 16:03:34 -03:00
Martín Capello
79a22deaa9 [lua] Add Image.context property (fix #4330) 2024-09-16 16:00:59 -03:00
Martín Capello
d1f1a8dcb0 Remove include already included in header 2024-09-16 14:39:08 -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