diff options
author | Stijn Hinlopen <f.a.hinlopen@gmail.com> | 2020-07-02 12:08:03 +0200 |
---|---|---|
committer | Stijn Hinlopen <f.a.hinlopen@gmail.com> | 2020-07-02 13:50:31 +0200 |
commit | c3d9f12a102d20a67eb203b342c9c9ef65192025 (patch) | |
tree | 54bf7305ebb0baada74f44b2a2f2664ad5711b82 /editor | |
parent | b46627e7b2872caa0e0141e8c45179b1000964af (diff) |
Remove unused class PaneDrag
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_log.h | 2 | ||||
-rw-r--r-- | editor/editor_node.cpp | 1 | ||||
-rw-r--r-- | editor/editor_node.h | 2 | ||||
-rw-r--r-- | editor/pane_drag.cpp | 75 | ||||
-rw-r--r-- | editor/pane_drag.h | 51 |
5 files changed, 0 insertions, 131 deletions
diff --git a/editor/editor_log.h b/editor/editor_log.h index 3bf5615346..73a8c3f0c5 100644 --- a/editor/editor_log.h +++ b/editor/editor_log.h @@ -32,7 +32,6 @@ #define EDITOR_LOG_H #include "core/os/thread.h" -#include "pane_drag.h" #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/control.h" @@ -50,7 +49,6 @@ class EditorLog : public VBoxContainer { Label *title; RichTextLabel *log; HBoxContainer *title_hb; - //PaneDrag *pd; Button *tool_button; static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b30d280023..d233b6b17d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -103,7 +103,6 @@ #include "editor/import_dock.h" #include "editor/multi_node_edit.h" #include "editor/node_dock.h" -#include "editor/pane_drag.h" #include "editor/plugin_config_dialog.h" #include "editor/plugins/animation_blend_space_1d_editor.h" #include "editor/plugins/animation_blend_space_2d_editor.h" diff --git a/editor/editor_node.h b/editor/editor_node.h index 413e228e2a..f6cae466ff 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -71,7 +71,6 @@ class ImportDock; class MenuButton; class NodeDock; class OrphanResourcesDialog; -class PaneDrag; class Panel; class PanelContainer; class PluginConfigDialog; @@ -255,7 +254,6 @@ private: VSplitContainer *top_split; HBoxContainer *bottom_hb; Control *vp_base; - PaneDrag *pd; HBoxContainer *menu_hb; Control *viewport; diff --git a/editor/pane_drag.cpp b/editor/pane_drag.cpp deleted file mode 100644 index 09f2b90b90..0000000000 --- a/editor/pane_drag.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/*************************************************************************/ -/* pane_drag.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#include "pane_drag.h" - -void PaneDrag::_gui_input(const Ref<InputEvent> &p_input) { - Ref<InputEventMouseMotion> mm = p_input; - if (mm.is_valid() && mm->get_button_mask() & BUTTON_MASK_LEFT) { - emit_signal("dragged", Point2(mm->get_relative().x, mm->get_relative().y)); - } -} - -void PaneDrag::_notification(int p_what) { - switch (p_what) { - case NOTIFICATION_DRAW: { - Ref<Texture2D> icon = mouse_over ? get_theme_icon("PaneDragHover", "EditorIcons") : get_theme_icon("PaneDrag", "EditorIcons"); - if (!icon.is_null()) { - icon->draw(get_canvas_item(), Point2(0, 0)); - } - - } break; - case NOTIFICATION_MOUSE_ENTER: - mouse_over = true; - update(); - break; - case NOTIFICATION_MOUSE_EXIT: - mouse_over = false; - update(); - break; - } -} - -Size2 PaneDrag::get_minimum_size() const { - Ref<Texture2D> icon = get_theme_icon("PaneDrag", "EditorIcons"); - if (!icon.is_null()) { - return icon->get_size(); - } - return Size2(); -} - -void PaneDrag::_bind_methods() { - ClassDB::bind_method("_gui_input", &PaneDrag::_gui_input); - ADD_SIGNAL(MethodInfo("dragged", PropertyInfo(Variant::VECTOR2, "amount"))); -} - -PaneDrag::PaneDrag() { - mouse_over = false; -} diff --git a/editor/pane_drag.h b/editor/pane_drag.h deleted file mode 100644 index 81aff4b2a8..0000000000 --- a/editor/pane_drag.h +++ /dev/null @@ -1,51 +0,0 @@ -/*************************************************************************/ -/* pane_drag.h */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#ifndef PANE_DRAG_H -#define PANE_DRAG_H - -#include "scene/gui/control.h" - -class PaneDrag : public Control { - GDCLASS(PaneDrag, Control); - - bool mouse_over; - -protected: - void _gui_input(const Ref<InputEvent> &p_input); - void _notification(int p_what); - virtual Size2 get_minimum_size() const; - static void _bind_methods(); - -public: - PaneDrag(); -}; - -#endif // PANE_DRAG_H |