You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Allow for easier editing of rect CollisionShape2D
This commit is contained in:
@@ -52,6 +52,17 @@ class CollisionShape2DEditor : public Control {
|
||||
SEGMENT_SHAPE
|
||||
};
|
||||
|
||||
const Point2 RECT_HANDLES[8] = {
|
||||
Point2(1, 0),
|
||||
Point2(1, 1),
|
||||
Point2(0, 1),
|
||||
Point2(-1, 1),
|
||||
Point2(-1, 0),
|
||||
Point2(-1, -1),
|
||||
Point2(0, -1),
|
||||
Point2(1, -1),
|
||||
};
|
||||
|
||||
EditorNode *editor;
|
||||
UndoRedo *undo_redo;
|
||||
CanvasItemEditor *canvas_item_editor;
|
||||
@@ -63,6 +74,8 @@ class CollisionShape2DEditor : public Control {
|
||||
int edit_handle;
|
||||
bool pressed;
|
||||
Variant original;
|
||||
Transform2D original_transform;
|
||||
Point2 last_point;
|
||||
|
||||
Variant get_handle_value(int idx) const;
|
||||
void set_handle(int idx, Point2 &p_point);
|
||||
|
||||
Reference in New Issue
Block a user