summaryrefslogtreecommitdiff
path: root/scene/gui/graph_edit.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/graph_edit.h')
-rw-r--r--scene/gui/graph_edit.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index 7f1d2699ba..37cb5989e9 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -32,29 +32,27 @@
#define GRAPH_EDIT_H
#include "scene/gui/box_container.h"
+#include "scene/gui/button.h"
#include "scene/gui/graph_node.h"
#include "scene/gui/scroll_bar.h"
#include "scene/gui/slider.h"
#include "scene/gui/spin_box.h"
#include "scene/gui/texture_rect.h"
-#include "scene/gui/tool_button.h"
class GraphEdit;
class GraphEditFilter : public Control {
-
GDCLASS(GraphEditFilter, Control);
friend class GraphEdit;
GraphEdit *ge;
- virtual bool has_point(const Point2 &p_point) const;
+ virtual bool has_point(const Point2 &p_point) const override;
public:
GraphEditFilter(GraphEdit *p_edit);
};
class GraphEdit : public Control {
-
GDCLASS(GraphEdit, Control);
public:
@@ -67,11 +65,11 @@ public:
};
private:
- ToolButton *zoom_minus;
- ToolButton *zoom_reset;
- ToolButton *zoom_plus;
+ Button *zoom_minus;
+ Button *zoom_reset;
+ Button *zoom_plus;
- ToolButton *snap_button;
+ Button *snap_button;
SpinBox *snap_amount;
void _zoom_minus();
@@ -95,16 +93,17 @@ private:
String connecting_target_to;
int connecting_target_index;
bool just_disconnected;
+ bool connecting_valid;
+ Vector2 click_pos;
bool dragging;
bool just_selected;
Vector2 drag_accum;
- Point2 drag_origin; // Workaround for GH-5907
float zoom;
bool box_selecting;
- bool box_selection_mode_aditive;
+ bool box_selection_mode_additive;
Point2 box_selecting_from;
Point2 box_selecting_to;
Rect2 box_selecting_rect;
@@ -142,7 +141,6 @@ private:
bool lines_on_bg;
struct ConnType {
-
union {
struct {
uint32_t type_a;
@@ -176,10 +174,10 @@ private:
protected:
static void _bind_methods();
- virtual void add_child_notify(Node *p_child);
- virtual void remove_child_notify(Node *p_child);
+ virtual void add_child_notify(Node *p_child) override;
+ virtual void remove_child_notify(Node *p_child) override;
void _notification(int p_what);
- virtual bool clips_input() const;
+ virtual bool clips_input() const override;
public:
Error connect_node(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port);