You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-05 17:15:09 +00:00
Improve TileMap undo operations, second try
This commit is contained in:
@@ -124,6 +124,7 @@ class TileMapEditor : public VBoxContainer {
|
||||
bool xf;
|
||||
bool yf;
|
||||
bool tr;
|
||||
Vector2 ac;
|
||||
|
||||
CellOp() :
|
||||
idx(TileMap::INVALID_CELL),
|
||||
@@ -150,6 +151,8 @@ class TileMapEditor : public VBoxContainer {
|
||||
|
||||
List<TileData> copydata;
|
||||
|
||||
Map<Point2i, CellOp> undo_data;
|
||||
|
||||
void _pick_tile(const Point2 &p_pos);
|
||||
|
||||
PoolVector<Vector2> _bucket_fill(const Point2i &p_start, bool erase = false, bool preview = false);
|
||||
@@ -174,6 +177,9 @@ class TileMapEditor : public VBoxContainer {
|
||||
void _update_palette();
|
||||
void _menu_option(int p_option);
|
||||
|
||||
void _start_undo(const String &p_action);
|
||||
void _finish_undo();
|
||||
void _create_set_cell_undo(const Vector2 &p_vec, const CellOp &p_cell_old, const CellOp &p_cell_new);
|
||||
void _set_cell(const Point2i &p_pos, int p_value, bool p_flip_h = false, bool p_flip_v = false, bool p_transpose = false);
|
||||
|
||||
void _canvas_mouse_enter();
|
||||
|
||||
Reference in New Issue
Block a user