mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 12:26:59 +01:00
Connect PolygonControlpoint's gui input method.
This commit is contained in:
parent
6da06474cf
commit
d73d398155
@ -57,6 +57,9 @@ PolygonControlPoint::~PolygonControlPoint() {
|
||||
|
||||
void PolygonControlPoint::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_POSTINITIALIZE: {
|
||||
connect("gui_input", this, "_on_ControlPoint_gui_input");
|
||||
} break;
|
||||
case NOTIFICATION_DRAW: {
|
||||
_draw();
|
||||
} break;
|
||||
|
@ -42,9 +42,7 @@ void PolygonEditor::_on_ControlPoint_moved(const int index) {
|
||||
PolygonControlPoint *control_point = Object::cast_to<PolygonControlPoint>(get_child(index));
|
||||
|
||||
PoolVector2Array points = polygon->get_points();
|
||||
|
||||
points.set(index, reverse_transform_point(control_point->get_position() + control_point->OFFSET));
|
||||
|
||||
polygon->set_points(points);
|
||||
|
||||
update();
|
||||
|
Loading…
Reference in New Issue
Block a user