mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 05:33:11 +00:00
Remove unused class PaneDrag
This commit is contained in:
parent
b46627e7b2
commit
c3d9f12a10
@ -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);
|
||||
|
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
@ -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
|
@ -33,7 +33,6 @@
|
||||
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "editor/pane_drag.h"
|
||||
#include "grid_map.h"
|
||||
|
||||
class Node3DEditorPlugin;
|
||||
|
Loading…
Reference in New Issue
Block a user