Commit Graph

201 Commits

Author SHA1 Message Date
Ainsley Su 57bc1d7574 Add duplicate animation
Co-authored-by: Nonunknown <nonunknown777@gmail.com>
2024-09-01 17:00:47 +02:00
Sofox eccd1452fa Enable SpriteFramesEditor to guess the amount of rows and columns of a sprite sheet when loading it for the first time 2024-08-26 20:48:04 +01:00
jsjtxietian 7cecdc0dab Fix sprite frame editor crash with null `frames` pounter 2024-07-03 10:58:25 +08:00
kobewi 57e046541d Add a way to force history for undoredo 2024-06-26 13:24:34 +02:00
A Thousand Ships fbb879debd
[Scene] Add `SceneStringNames::text/value_changed` 2024-06-19 09:44:38 +02:00
A Thousand Ships ca18a06ecb
[Scene] Add `SceneStringNames::confirmed` 2024-06-19 09:40:54 +02:00
A Thousand Ships d9e2fc74c7
[Scene] Add `SceneStringNames::item_selected` 2024-06-19 09:39:05 +02:00
Hilderin 4575ccbad9 Fix Crash when trying to undo SpriteFrames animation rename #93079 2024-06-12 21:42:49 -04:00
A Thousand Ships 926afccbd8
[Scene] Add `SceneStringNames::panel` 2024-05-30 22:54:50 +02:00
Paweł 18243c5b7a Select text in SpriteFramesEditor spin boxes on focus 2024-05-27 21:50:15 +02:00
A Thousand Ships ee79386f7b
[Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +02:00
Rémi Verschelde bdefe53992
Merge pull request #91909 from KoBeWi/have_fun_reviewing_this
Use Core/Scene stringnames consistently
2024-05-14 12:07:03 +02:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Yuri Rubinsky 56026e6c76 Fix errors on pressing autoplay in sprite frames editor 2024-05-13 22:39:05 +03:00
A Thousand Ships a0dbdcc3ab
Replace `find` with `contains/has` where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
kobewi e36301e418 Avoid double editing when clicking AnimatedSprite 2024-04-17 19:51:42 +02:00
Aaron Franke 6dd4a68797
Reorganize some code to have 2D things grouped together 2024-04-13 02:56:50 -07:00
kobewi 969bfeae4c Fix SpriteFrames editor visibility problems 2024-03-21 16:35:22 +01:00
Rémi Verschelde 0975e2941c
Merge pull request #88413 from LeulMulugeta/dont_reset_select_frames
Remember frames when selecting `SpriteFrame` frames
2024-03-05 23:44:33 +01:00
Hugo Locurcio 8221e7546b
Add editor shortcuts to toggle bottom panel visibility
Default shortcuts use the first or second letter of each word.

This also adds a new shortcut to toggle the last opened bottom panel.
On editor startup, this defaults to the first panel in the list
(which is the Output panel).
2024-03-05 15:53:15 +01:00
Leul Mulugeta effad7be0c Remember frames when selecting SpriteFrame frames 2024-03-05 16:50:06 +03:00
Rémi Verschelde 8eb08522b3
Merge pull request #85494 from Hobitus/Allow-multi-selection-of-frames-in-the-SpriteFrames-animation-editor
Add multi-selection for `SpriteFramesEditor`
2024-03-04 13:32:44 +01:00
Dominic Marier 8faba242a4 Added multi-selection for sprite_frame_editor
use multi-selection for copy/paste
move up or down
frame duration set while multi-selected
2024-02-29 20:01:00 -05:00
kit eb6ca91ba6 Extract BottomPanel from EditorNode 2024-02-20 15:09:07 -05:00
Michael Alexsander 7b42c24550
Make auto translation inheritable 2024-02-15 16:51:19 -03:00
Hugo Locurcio 085629a7c9
Extend minimum/maximum zoom level of TextureRegion editor
This also applies a similar change to the SpriteFrames editor.
2024-01-29 14:58:40 +01:00
Yuri Sizov 95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
Rémi Verschelde 5eb22a317d
Merge pull request #83577 from DennisManaa/fix-translation-for-item-list
Add automatic translation of items to ItemList
2024-01-04 16:39:36 +01:00
Wilson E. Alvarez a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
kobewi 55f7d493ee Remove AnimatedSprite pointer when clearing editor 2023-11-08 18:09:42 +01:00
DennisManaa 1a1c542836 Implement automatic translation for ItemList 2023-10-23 10:14:08 +02:00
风青山 2642c6851f Defer updating the animations Tree in SpriteFramesEditor to avoid crashes
Previously, clicking the LMB while renaming an animation could cause
`SpriteFramesEditor::_update_library(false)` to be called during
`Tree::propagate_mouse_event()`. This may cause a crash.

We can defer updates to the editor interface to avoid calling
`Tree::create_item()` at the wrong time.

Enables `SpriteFramesEditor::_select_animation()` to be able to undo/redo
2023-10-18 06:46:03 +08:00
Rémi Verschelde 642479db1e
Merge pull request #79872 from dalexeev/sprite-frames-editor-2
SpriteFrames Editor: Fix Frame Duration applied to wrong frame when switching frame
2023-10-05 22:48:04 +02:00
Rémi Verschelde 3cf1bc0a24
Merge pull request #79692 from dalexeev/sprite-frames-editor
SpriteFrames Editor: Fix FPS applied to two animations when switching animation
2023-10-05 22:47:37 +02:00
Rémi Verschelde 8ddf73c74d
Merge pull request #81939 from YuriSizov/gui-flat-and-depressed
Replace flat buttons with flat-styled buttons with a visible pressed state
2023-09-25 17:18:29 +02:00
Yuri Sizov 4bd569be95 Replace flat buttons with flat-styled buttons with a visible pressed state 2023-09-19 22:36:29 +02:00
ajreckof 6afadbaa9f Replace Ctrl in editor shortcuts with Cmd or Ctrl depending on platform 2023-09-19 10:29:07 +02:00
A Thousand Ships 75ee58fd04 [Editor] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-15 20:15:39 +02:00
kobewi 6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Hugo Locurcio e9f723006a
Use compile-time Unicode string conversion
Thanks to this syntax introduced in C++11, this reduces the amount of work
that needs to be performed at run-time while making the code more terse.
2023-08-07 10:38:16 +02:00
Danil Alexeev 0d39121b3a
SpriteFrames Editor: Fix Frame Duration applied to wrong frame when switching frame 2023-07-25 10:55:37 +03:00
Danil Alexeev 2f1e135573
SpriteFrames Editor: Fix FPS applied to two animations when switching animation 2023-07-25 10:51:35 +03:00
Yuri Sizov 7dbbf2eef9 Merge pull request #79743 from TokageItLab/fix-name-list-asp
Make animation name list scroll to new animation in `SpriteEditor`
2023-07-24 19:33:23 +02:00
Silc Lizard (Tokage) Renew 99451b55c2 Make animation name list scroll to new animation in SpriteEditor
Co-authored-by: DarellLdark <darell.ldark@gmail.com>
2023-07-21 19:36:25 +09:00
Rindbee e9cd29cf22 Fix rename animation in SpriteFramesEditor/AnimationNodeStateMachineEditor
When the name suffix grows, the old name is used if it is obtained first.

Fix the case where the following error message would appear when renaming
an animation.

```
ERROR: Animation '' doesn't exist.
   at: get_frame_count (scene/resources/sprite_frames.cpp:71)
```
2023-07-18 15:39:02 +08:00
Hendrik Brucker 7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Rémi Verschelde 4f17a94d69
Merge pull request #74341 from dalexeev/sprite-frames-texture-filter
Use nearest with mipmaps texture filter in SpriteFrames editor plugin
2023-05-22 13:48:18 +02:00
Hakim 9cf2d0f058 Hide Animation Frames section when there are no animations and show message 2023-05-19 01:14:11 +02:00
kleonc d58e832062 Make SpriteFrames editor toolbar a FlowContainer 2023-05-13 16:00:25 +02:00