1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Enable SpriteFramesEditor to guess the amount of rows and columns of a sprite sheet when loading it for the first time

This commit is contained in:
Sofox
2024-08-11 16:38:41 +01:00
parent 88f3b5f9d5
commit eccd1452fa
2 changed files with 89 additions and 4 deletions

View File

@@ -234,6 +234,9 @@ class SpriteFramesEditor : public HSplitContainer {
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
void _open_sprite_sheet();
void _auto_slice_sprite_sheet();
bool _matches_background_color(const Color &p_background_color, const Color &p_pixel_color);
Size2i _estimate_sprite_sheet_size(const Ref<Texture2D> p_texture);
void _prepare_sprite_sheet(const String &p_file);
int _sheet_preview_position_to_frame_index(const Vector2 &p_position);
void _sheet_preview_draw();