mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-29 07:07:14 +01:00
PolygonEdit should have inherited from Button, and connected the pressed signal.
This commit is contained in:
parent
9975ea358f
commit
ee9144b1b5
@ -55,6 +55,12 @@ PolygonEdit::PolygonEdit() {
|
||||
PolygonEdit::~PolygonEdit() {
|
||||
}
|
||||
|
||||
void PolygonEdit::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_POSTINITIALIZE) {
|
||||
connect("pressed", this, "_on_PolygonEdit_pressed");
|
||||
}
|
||||
}
|
||||
|
||||
void PolygonEdit::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("updated", PropertyInfo(Variant::OBJECT, "polygon", PROPERTY_HINT_RESOURCE_TYPE, "PolygonBase")));
|
||||
|
||||
|
@ -3,13 +3,13 @@
|
||||
|
||||
#include "core/reference.h"
|
||||
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/button.h"
|
||||
|
||||
class PolygonBase;
|
||||
class PolygonView;
|
||||
|
||||
class PolygonEdit : public Control {
|
||||
GDCLASS(PolygonEdit, Control);
|
||||
class PolygonEdit : public Button {
|
||||
GDCLASS(PolygonEdit, Button);
|
||||
|
||||
public:
|
||||
bool get_closed() const;
|
||||
@ -25,6 +25,8 @@ public:
|
||||
~PolygonEdit();
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
|
||||
static void _bind_methods();
|
||||
|
||||
bool closed;
|
||||
|
Loading…
Reference in New Issue
Block a user