Finish renaming *Frame GUI classes to *Rect
ReferenceFrame had been overlooked, and the cpp files still used the old names. Also ripgrep'ed it all to find some forgotten references.
@ -8816,7 +8816,7 @@
|
|||||||
<constants>
|
<constants>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
<class name="ColorFrame" inherits="Control" category="Core">
|
<class name="ColorRect" inherits="Control" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
@ -26354,7 +26354,7 @@
|
|||||||
</constant>
|
</constant>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
<class name="Patch9Frame" inherits="Control" category="Core">
|
<class name="Patch9Rect" inherits="Control" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
@ -32557,7 +32557,7 @@
|
|||||||
<constants>
|
<constants>
|
||||||
</constants>
|
</constants>
|
||||||
</class>
|
</class>
|
||||||
<class name="ReferenceFrame" inherits="Control" category="Core">
|
<class name="ReferenceRect" inherits="Control" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
Reference frame for GUI.
|
Reference frame for GUI.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
#include "scene/gui/tab_container.h"
|
#include "scene/gui/tab_container.h"
|
||||||
#include "scene/gui/tree.h"
|
#include "scene/gui/tree.h"
|
||||||
#include "scene/gui/rich_text_label.h"
|
#include "scene/gui/rich_text_label.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "io/image_loader.h"
|
#include "io/image_loader.h"
|
||||||
#include "print_string.h"
|
#include "print_string.h"
|
||||||
#include "scene/2d/sprite.h"
|
#include "scene/2d/sprite.h"
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
#include "scene/gui/button.h"
|
#include "scene/gui/button.h"
|
||||||
#include "scene/gui/popup.h"
|
#include "scene/gui/popup.h"
|
||||||
#include "scene/gui/box_container.h"
|
#include "scene/gui/box_container.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/tool_button.h"
|
#include "scene/gui/tool_button.h"
|
||||||
#include "scene/gui/check_button.h"
|
#include "scene/gui/check_button.h"
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,34 @@
|
|||||||
|
/*************************************************************************/
|
||||||
|
/* color_rect.cpp */
|
||||||
|
/*************************************************************************/
|
||||||
|
/* This file is part of: */
|
||||||
|
/* GODOT ENGINE */
|
||||||
|
/* http://www.godotengine.org */
|
||||||
|
/*************************************************************************/
|
||||||
|
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
|
||||||
|
/* */
|
||||||
|
/* 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 "color_rect.h"
|
#include "color_rect.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ColorRect::set_frame_color(const Color& p_color) {
|
void ColorRect::set_frame_color(const Color& p_color) {
|
||||||
|
|
||||||
color=p_color;
|
color=p_color;
|
||||||
@ -33,4 +59,3 @@ ColorRect::ColorRect() {
|
|||||||
|
|
||||||
color=Color(1,1,1);
|
color=Color(1,1,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,33 @@
|
|||||||
#ifndef COLORRECT_H
|
/*************************************************************************/
|
||||||
#define COLORRECT_H
|
/* color_rect.h */
|
||||||
|
/*************************************************************************/
|
||||||
|
/* This file is part of: */
|
||||||
|
/* GODOT ENGINE */
|
||||||
|
/* http://www.godotengine.org */
|
||||||
|
/*************************************************************************/
|
||||||
|
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
|
||||||
|
/* */
|
||||||
|
/* 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 COLOR_RECT_H
|
||||||
|
#define COLOR_RECT_H
|
||||||
|
|
||||||
#include "scene/gui/control.h"
|
#include "scene/gui/control.h"
|
||||||
|
|
||||||
@ -19,4 +47,4 @@ public:
|
|||||||
ColorRect();
|
ColorRect();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COLORRECT_H
|
#endif // COLOR_RECT_H
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include "scene/gui/slider.h"
|
#include "scene/gui/slider.h"
|
||||||
#include "scene/gui/tool_button.h"
|
#include "scene/gui/tool_button.h"
|
||||||
#include "scene/gui/spin_box.h"
|
#include "scene/gui/spin_box.h"
|
||||||
#include "texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
|
|
||||||
class GraphEdit;
|
class GraphEdit;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* patch_9_frame.cpp */
|
/* patch_9_rect.cpp */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
@ -26,7 +26,7 @@
|
|||||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#include "patch_9_frame.h"
|
#include "patch_9_rect.h"
|
||||||
|
|
||||||
#include "servers/visual_server.h"
|
#include "servers/visual_server.h"
|
||||||
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* patch_9_frame.h */
|
/* patch_9_rect.h */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
@ -1,5 +1,5 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* reference_frame.cpp */
|
/* reference_rect.cpp */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
@ -26,9 +26,9 @@
|
|||||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#include "reference_frame.h"
|
#include "reference_rect.h"
|
||||||
|
|
||||||
void ReferenceFrame::_notification(int p_what) {
|
void ReferenceRect::_notification(int p_what) {
|
||||||
|
|
||||||
if (p_what==NOTIFICATION_DRAW) {
|
if (p_what==NOTIFICATION_DRAW) {
|
||||||
|
|
||||||
@ -39,6 +39,6 @@ void ReferenceFrame::_notification(int p_what) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReferenceFrame::ReferenceFrame()
|
ReferenceRect::ReferenceRect()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* reference_frame.h */
|
/* reference_rect.h */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
@ -26,20 +26,20 @@
|
|||||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#ifndef REFERENCE_FRAME_H
|
#ifndef REFERENCE_RECT_H
|
||||||
#define REFERENCE_FRAME_H
|
#define REFERENCE_RECT_H
|
||||||
|
|
||||||
#include "scene/gui/control.h"
|
#include "scene/gui/control.h"
|
||||||
|
|
||||||
class ReferenceFrame : public Control {
|
class ReferenceRect : public Control {
|
||||||
|
|
||||||
GDCLASS( ReferenceFrame, Control);
|
GDCLASS( ReferenceRect, Control);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
public:
|
public:
|
||||||
ReferenceFrame();
|
ReferenceRect();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // REFERENCE_FRAME_H
|
#endif // REFERENCE_RECT_H
|
||||||
@ -1,5 +1,5 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* texture_frame.cpp */
|
/* texture_rect.cpp */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
@ -26,7 +26,7 @@
|
|||||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
#include "texture_frame.h"
|
#include "texture_rect.h"
|
||||||
#include "servers/visual_server.h"
|
#include "servers/visual_server.h"
|
||||||
|
|
||||||
void TextureRect::_notification(int p_what) {
|
void TextureRect::_notification(int p_what) {
|
||||||
@ -1,5 +1,5 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* texture_frame.h */
|
/* texture_rect.h */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* This file is part of: */
|
/* This file is part of: */
|
||||||
/* GODOT ENGINE */
|
/* GODOT ENGINE */
|
||||||
@ -54,9 +54,9 @@
|
|||||||
#include "scene/gui/spin_box.h"
|
#include "scene/gui/spin_box.h"
|
||||||
#include "scene/gui/option_button.h"
|
#include "scene/gui/option_button.h"
|
||||||
#include "scene/gui/color_picker.h"
|
#include "scene/gui/color_picker.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/color_rect.h"
|
#include "scene/gui/color_rect.h"
|
||||||
#include "scene/gui/patch_9_frame.h"
|
#include "scene/gui/patch_9_rect.h"
|
||||||
#include "scene/gui/menu_button.h"
|
#include "scene/gui/menu_button.h"
|
||||||
#include "scene/gui/check_box.h"
|
#include "scene/gui/check_box.h"
|
||||||
#include "scene/gui/check_button.h"
|
#include "scene/gui/check_button.h"
|
||||||
@ -81,7 +81,7 @@
|
|||||||
#include "scene/gui/grid_container.h"
|
#include "scene/gui/grid_container.h"
|
||||||
#include "scene/gui/split_container.h"
|
#include "scene/gui/split_container.h"
|
||||||
#include "scene/gui/video_player.h"
|
#include "scene/gui/video_player.h"
|
||||||
#include "scene/gui/reference_frame.h"
|
#include "scene/gui/reference_rect.h"
|
||||||
#include "scene/gui/graph_node.h"
|
#include "scene/gui/graph_node.h"
|
||||||
#include "scene/gui/graph_edit.h"
|
#include "scene/gui/graph_edit.h"
|
||||||
#include "scene/gui/tool_button.h"
|
#include "scene/gui/tool_button.h"
|
||||||
@ -383,7 +383,7 @@ void register_scene_types() {
|
|||||||
ClassDB::register_virtual_class<TreeItem>();
|
ClassDB::register_virtual_class<TreeItem>();
|
||||||
ClassDB::register_class<OptionButton>();
|
ClassDB::register_class<OptionButton>();
|
||||||
ClassDB::register_class<SpinBox>();
|
ClassDB::register_class<SpinBox>();
|
||||||
ClassDB::register_class<ReferenceFrame>();
|
ClassDB::register_class<ReferenceRect>();
|
||||||
ClassDB::register_class<ColorPicker>();
|
ClassDB::register_class<ColorPicker>();
|
||||||
ClassDB::register_class<ColorPickerButton>();
|
ClassDB::register_class<ColorPickerButton>();
|
||||||
ClassDB::register_class<RichTextLabel>();
|
ClassDB::register_class<RichTextLabel>();
|
||||||
|
|||||||
@ -934,12 +934,12 @@ void fill_default_theme(Ref<Theme>& t, const Ref<Font> & default_font, const Ref
|
|||||||
t->set_stylebox("focus","VButtonArray", focus );
|
t->set_stylebox("focus","VButtonArray", focus );
|
||||||
|
|
||||||
|
|
||||||
// ReferenceFrame
|
// ReferenceRect
|
||||||
|
|
||||||
Ref<StyleBoxTexture> ttnc = make_stylebox( full_panel_bg_png,8,8,8,8);
|
Ref<StyleBoxTexture> ttnc = make_stylebox( full_panel_bg_png,8,8,8,8);
|
||||||
ttnc->set_draw_center(false);
|
ttnc->set_draw_center(false);
|
||||||
|
|
||||||
t->set_stylebox("border","ReferenceFrame", make_stylebox( reference_border_png,4,4,4,4) );
|
t->set_stylebox("border","ReferenceRect", make_stylebox( reference_border_png,4,4,4,4) );
|
||||||
t->set_stylebox("panelnc","Panel", ttnc );
|
t->set_stylebox("panelnc","Panel", ttnc );
|
||||||
t->set_stylebox("panelf","Panel", tc_sb );
|
t->set_stylebox("panelf","Panel", tc_sb );
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
#include "scene/gui/slider.h"
|
#include "scene/gui/slider.h"
|
||||||
#include "scene/gui/menu_button.h"
|
#include "scene/gui/menu_button.h"
|
||||||
#include "scene/gui/spin_box.h"
|
#include "scene/gui/spin_box.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/scroll_bar.h"
|
#include "scene/gui/scroll_bar.h"
|
||||||
#include "scene/gui/tool_button.h"
|
#include "scene/gui/tool_button.h"
|
||||||
#include "scene/gui/file_dialog.h"
|
#include "scene/gui/file_dialog.h"
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
#include "scene/gui/option_button.h"
|
#include "scene/gui/option_button.h"
|
||||||
#include "os/dir_access.h"
|
#include "os/dir_access.h"
|
||||||
#include "scene/gui/box_container.h"
|
#include "scene/gui/box_container.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/tool_button.h"
|
#include "scene/gui/tool_button.h"
|
||||||
/**
|
/**
|
||||||
@author Juan Linietsky <reduzio@gmail.com>
|
@author Juan Linietsky <reduzio@gmail.com>
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
//#include "scene/gui/empty_control.h"
|
//#include "scene/gui/empty_control.h"
|
||||||
#include "scene/gui/box_container.h"
|
#include "scene/gui/box_container.h"
|
||||||
#include "scene/gui/panel_container.h"
|
#include "scene/gui/panel_container.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/tool_button.h"
|
#include "scene/gui/tool_button.h"
|
||||||
#include "pane_drag.h"
|
#include "pane_drag.h"
|
||||||
#include "os/thread.h"
|
#include "os/thread.h"
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "scene/gui/box_container.h"
|
#include "scene/gui/box_container.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/button.h"
|
#include "scene/gui/button.h"
|
||||||
#include "scene/gui/label.h"
|
#include "scene/gui/label.h"
|
||||||
#include "scene/gui/tree.h"
|
#include "scene/gui/tree.h"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 160 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 201 B |
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
@ -18,7 +18,7 @@
|
|||||||
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
|
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
|
||||||
inkscape:export-xdpi="90"
|
inkscape:export-xdpi="90"
|
||||||
inkscape:export-ydpi="90"
|
inkscape:export-ydpi="90"
|
||||||
sodipodi:docname="icon_patch_9_frame.svg">
|
sodipodi:docname="icon_patch_9_rect.svg">
|
||||||
<defs
|
<defs
|
||||||
id="defs4" />
|
id="defs4" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
||||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
@ -18,7 +18,7 @@
|
|||||||
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
|
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
|
||||||
inkscape:export-xdpi="90"
|
inkscape:export-xdpi="90"
|
||||||
inkscape:export-ydpi="90"
|
inkscape:export-ydpi="90"
|
||||||
sodipodi:docname="icon_reference_frame.svg">
|
sodipodi:docname="icon_reference_rect.svg">
|
||||||
<defs
|
<defs
|
||||||
id="defs4" />
|
id="defs4" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
||||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@ -18,7 +18,7 @@
|
|||||||
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
|
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
|
||||||
inkscape:export-xdpi="90"
|
inkscape:export-xdpi="90"
|
||||||
inkscape:export-ydpi="90"
|
inkscape:export-ydpi="90"
|
||||||
sodipodi:docname="icon_texture_frame.svg">
|
sodipodi:docname="icon_texture_rect.svg">
|
||||||
<defs
|
<defs
|
||||||
id="defs4" />
|
id="defs4" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
||||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
@ -41,7 +41,7 @@
|
|||||||
#include "os/input.h"
|
#include "os/input.h"
|
||||||
#include "tools/editor/editor_settings.h"
|
#include "tools/editor/editor_settings.h"
|
||||||
#include "scene/gui/grid_container.h"
|
#include "scene/gui/grid_container.h"
|
||||||
#include "scene/gui/patch_9_frame.h"
|
#include "scene/gui/patch_9_rect.h"
|
||||||
#include "tools/editor/animation_editor.h"
|
#include "tools/editor/animation_editor.h"
|
||||||
#include "tools/editor/plugins/animation_player_editor_plugin.h"
|
#include "tools/editor/plugins/animation_player_editor_plugin.h"
|
||||||
#include "tools/editor/script_editor_debugger.h"
|
#include "tools/editor/script_editor_debugger.h"
|
||||||
@ -3767,7 +3767,7 @@ void CanvasItemEditorViewport::_create_nodes(Node* parent, Node* child, String&
|
|||||||
editor_data->get_undo_redo().add_do_property(child,property,texture);
|
editor_data->get_undo_redo().add_do_property(child,property,texture);
|
||||||
|
|
||||||
// make visible for certain node type
|
// make visible for certain node type
|
||||||
if (default_type=="Patch9Frame") {
|
if (default_type=="Patch9Rect") {
|
||||||
editor_data->get_undo_redo().add_do_property(child,"rect/size",texture_size);
|
editor_data->get_undo_redo().add_do_property(child,"rect/size",texture_size);
|
||||||
} else if (default_type=="Polygon2D") {
|
} else if (default_type=="Polygon2D") {
|
||||||
PoolVector<Vector2> list;
|
PoolVector<Vector2> list;
|
||||||
@ -3785,7 +3785,7 @@ void CanvasItemEditorViewport::_create_nodes(Node* parent, Node* child, String&
|
|||||||
}
|
}
|
||||||
Transform2D trans=canvas->get_canvas_transform();
|
Transform2D trans=canvas->get_canvas_transform();
|
||||||
Point2 target_pos = (p_point-trans.get_origin())/trans.get_scale().x-pos;
|
Point2 target_pos = (p_point-trans.get_origin())/trans.get_scale().x-pos;
|
||||||
if (default_type=="Polygon2D" || default_type=="TouchScreenButton" || default_type=="TextureRect" || default_type=="Patch9Frame") {
|
if (default_type=="Polygon2D" || default_type=="TouchScreenButton" || default_type=="TextureRect" || default_type=="Patch9Rect") {
|
||||||
target_pos -= texture_size/2;
|
target_pos -= texture_size/2;
|
||||||
}
|
}
|
||||||
editor_data->get_undo_redo().add_do_method(child,"set_pos",target_pos);
|
editor_data->get_undo_redo().add_do_method(child,"set_pos",target_pos);
|
||||||
@ -3857,8 +3857,8 @@ void CanvasItemEditorViewport::_perform_drop_data(){
|
|||||||
else if (default_type=="Particles2D") child=memnew(Particles2D);
|
else if (default_type=="Particles2D") child=memnew(Particles2D);
|
||||||
else if (default_type=="Polygon2D") child=memnew(Polygon2D);
|
else if (default_type=="Polygon2D") child=memnew(Polygon2D);
|
||||||
else if (default_type=="TouchScreenButton") child=memnew(TouchScreenButton);
|
else if (default_type=="TouchScreenButton") child=memnew(TouchScreenButton);
|
||||||
else if (default_type=="TextureRect") child=memnew(TextureRect);
|
else if (default_type=="TextureRect") child=memnew(TextureRect);
|
||||||
else if (default_type=="Patch9Frame") child=memnew(NinePatchRect);
|
else if (default_type=="Patch9Rect") child=memnew(NinePatchRect);
|
||||||
else child=memnew(Sprite); // default
|
else child=memnew(Sprite); // default
|
||||||
|
|
||||||
_create_nodes(target_node, child, path, drop_pos);
|
_create_nodes(target_node, child, path, drop_pos);
|
||||||
@ -3993,7 +3993,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
|
|||||||
types.push_back("TouchScreenButton");
|
types.push_back("TouchScreenButton");
|
||||||
// Control
|
// Control
|
||||||
types.push_back("TextureRect");
|
types.push_back("TextureRect");
|
||||||
types.push_back("Patch9Frame");
|
types.push_back("Patch9Rect");
|
||||||
|
|
||||||
target_node=NULL;
|
target_node=NULL;
|
||||||
editor=p_node;
|
editor=p_node;
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
#define STYLE_BOX_EDITOR_PLUGIN_H
|
#define STYLE_BOX_EDITOR_PLUGIN_H
|
||||||
|
|
||||||
#include "scene/resources/style_box.h"
|
#include "scene/resources/style_box.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/option_button.h"
|
#include "scene/gui/option_button.h"
|
||||||
#include "tools/editor/editor_node.h"
|
#include "tools/editor/editor_node.h"
|
||||||
|
|
||||||
|
|||||||
@ -935,7 +935,7 @@ void TextureRegionEditorPlugin::edit(Object *p_node)
|
|||||||
|
|
||||||
bool TextureRegionEditorPlugin::handles(Object *p_obj) const
|
bool TextureRegionEditorPlugin::handles(Object *p_obj) const
|
||||||
{
|
{
|
||||||
return p_obj->is_class("Sprite") || p_obj->is_class("Patch9Frame") || p_obj->is_class("StyleBoxTexture") || p_obj->is_class("AtlasTexture");
|
return p_obj->is_class("Sprite") || p_obj->is_class("Patch9Rect") || p_obj->is_class("StyleBoxTexture") || p_obj->is_class("AtlasTexture");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureRegionEditorPlugin::make_visible(bool p_visible)
|
void TextureRegionEditorPlugin::make_visible(bool p_visible)
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
#include "tools/editor/editor_plugin.h"
|
#include "tools/editor/editor_plugin.h"
|
||||||
#include "tools/editor/editor_node.h"
|
#include "tools/editor/editor_node.h"
|
||||||
#include "scene/2d/sprite.h"
|
#include "scene/2d/sprite.h"
|
||||||
#include "scene/gui/patch_9_frame.h"
|
#include "scene/gui/patch_9_rect.h"
|
||||||
#include "scene/resources/style_box.h"
|
#include "scene/resources/style_box.h"
|
||||||
#include "scene/resources/texture.h"
|
#include "scene/resources/texture.h"
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
#define THEME_EDITOR_PLUGIN_H
|
#define THEME_EDITOR_PLUGIN_H
|
||||||
|
|
||||||
#include "scene/resources/theme.h"
|
#include "scene/resources/theme.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/option_button.h"
|
#include "scene/gui/option_button.h"
|
||||||
#include "scene/gui/file_dialog.h"
|
#include "scene/gui/file_dialog.h"
|
||||||
#include "scene/gui/check_box.h"
|
#include "scene/gui/check_box.h"
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
#include "scene/gui/center_container.h"
|
#include "scene/gui/center_container.h"
|
||||||
#include "io/stream_peer_ssl.h"
|
#include "io/stream_peer_ssl.h"
|
||||||
|
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/margin_container.h"
|
#include "scene/gui/margin_container.h"
|
||||||
#include "io/resource_saver.h"
|
#include "io/resource_saver.h"
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
#include "scene/gui/dialogs.h"
|
#include "scene/gui/dialogs.h"
|
||||||
#include "scene/gui/color_picker.h"
|
#include "scene/gui/color_picker.h"
|
||||||
#include "scene/gui/menu_button.h"
|
#include "scene/gui/menu_button.h"
|
||||||
#include "scene/gui/texture_frame.h"
|
#include "scene/gui/texture_rect.h"
|
||||||
#include "scene/gui/text_edit.h"
|
#include "scene/gui/text_edit.h"
|
||||||
#include "scene/gui/check_button.h"
|
#include "scene/gui/check_button.h"
|
||||||
#include "scene/gui/split_container.h"
|
#include "scene/gui/split_container.h"
|
||||||
|
|||||||