You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-05 17:15:09 +00:00
Added popup menu for some actions in visual shaders
This commit is contained in:
@@ -81,6 +81,7 @@ class VisualShaderEditor : public VBoxContainer {
|
||||
bool saved_node_pos_dirty;
|
||||
|
||||
ConfirmationDialog *members_dialog;
|
||||
PopupMenu *popup_menu;
|
||||
MenuButton *tools;
|
||||
|
||||
bool preview_showed;
|
||||
@@ -90,6 +91,15 @@ class VisualShaderEditor : public VBoxContainer {
|
||||
COLLAPSE_ALL
|
||||
};
|
||||
|
||||
enum NodeMenuOptions {
|
||||
ADD,
|
||||
SEPARATOR, // ignore
|
||||
COPY,
|
||||
DELETE,
|
||||
DUPLICATE,
|
||||
PASTE,
|
||||
};
|
||||
|
||||
Tree *members;
|
||||
AcceptDialog *alert;
|
||||
LineEdit *node_filter;
|
||||
@@ -216,7 +226,7 @@ class VisualShaderEditor : public VBoxContainer {
|
||||
|
||||
void _clear_buffer();
|
||||
void _copy_nodes();
|
||||
void _paste_nodes();
|
||||
void _paste_nodes(bool p_use_custom_position = false, const Vector2 &p_custom_position = Vector2());
|
||||
|
||||
Vector<Ref<VisualShaderNodePlugin> > plugins;
|
||||
|
||||
@@ -250,6 +260,9 @@ class VisualShaderEditor : public VBoxContainer {
|
||||
void _member_create();
|
||||
void _member_cancel();
|
||||
|
||||
Vector2 menu_point;
|
||||
void _node_menu_id_pressed(int p_idx);
|
||||
|
||||
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
|
||||
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
|
||||
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
|
||||
|
||||
Reference in New Issue
Block a user