some class renames

TextureFrame -> TextureRect
Patch9Frame -> NinePatchRect
ColorFrame -> ColorRect
This commit is contained in:
Juan Linietsky 2017-01-12 18:27:27 -03:00
parent a971186c26
commit da477b76a9
43 changed files with 119 additions and 119 deletions

View File

@ -41638,7 +41638,7 @@
<constants> <constants>
</constants> </constants>
</class> </class>
<class name="TextureFrame" inherits="Control" category="Core"> <class name="TextureRect" inherits="Control" category="Core">
<brief_description> <brief_description>
Control Frame that draws a texture. Control Frame that draws a texture.
</brief_description> </brief_description>

View File

@ -590,9 +590,9 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
t=type_icons[left_type]; t=type_icons[left_type];
} }
if (t.is_valid()) { if (t.is_valid()) {
TextureFrame *tf = memnew(TextureFrame); TextureRect *tf = memnew(TextureRect);
tf->set_texture(t); tf->set_texture(t);
tf->set_stretch_mode(TextureFrame::STRETCH_KEEP_CENTERED); tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
hbc->add_child(tf); hbc->add_child(tf);
} }
@ -657,9 +657,9 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
t=type_icons[right_type]; t=type_icons[right_type];
} }
if (t.is_valid()) { if (t.is_valid()) {
TextureFrame *tf = memnew(TextureFrame); TextureRect *tf = memnew(TextureRect);
tf->set_texture(t); tf->set_texture(t);
tf->set_stretch_mode(TextureFrame::STRETCH_KEEP_CENTERED); tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
hbc->add_child(tf); hbc->add_child(tf);
} }
@ -3346,8 +3346,8 @@ VisualScriptEditor::VisualScriptEditor() {
node_filter->connect("text_changed",this,"_node_filter_changed"); node_filter->connect("text_changed",this,"_node_filter_changed");
hbc_nodes->add_child(node_filter); hbc_nodes->add_child(node_filter);
node_filter->set_h_size_flags(SIZE_EXPAND_FILL); node_filter->set_h_size_flags(SIZE_EXPAND_FILL);
node_filter_icon = memnew( TextureFrame ); node_filter_icon = memnew( TextureRect );
node_filter_icon->set_stretch_mode(TextureFrame::STRETCH_KEEP_CENTERED); node_filter_icon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
hbc_nodes->add_child(node_filter_icon); hbc_nodes->add_child(node_filter_icon);
vbc_nodes->add_child(hbc_nodes); vbc_nodes->add_child(hbc_nodes);

View File

@ -58,7 +58,7 @@ class VisualScriptEditor : public ScriptEditorBase {
GraphEdit *graph; GraphEdit *graph;
LineEdit *node_filter; LineEdit *node_filter;
TextureFrame *node_filter_icon; TextureRect *node_filter_icon;
VisualScriptEditorSignalEdit *signal_editor; VisualScriptEditorSignalEdit *signal_editor;

View File

@ -509,7 +509,7 @@ modulate = self_modulate
modulate = self_modulate modulate = self_modulate
[TextureFrame] [TextureRect]
modulate = self_modulate modulate = self_modulate

View File

@ -487,7 +487,7 @@ ColorPicker::ColorPicker() :
btn_pick = memnew( ToolButton ); btn_pick = memnew( ToolButton );
btn_pick->connect("pressed",this,"_screen_pick_pressed"); btn_pick->connect("pressed",this,"_screen_pick_pressed");
sample = memnew( TextureFrame ); sample = memnew( TextureRect );
sample->set_h_size_flags(SIZE_EXPAND_FILL); sample->set_h_size_flags(SIZE_EXPAND_FILL);
sample->connect("draw",this,"_sample_draw"); sample->connect("draw",this,"_sample_draw");
@ -590,7 +590,7 @@ ColorPicker::ColorPicker() :
HBoxContainer *bbc = memnew( HBoxContainer ); HBoxContainer *bbc = memnew( HBoxContainer );
add_child(bbc); add_child(bbc);
preset = memnew( TextureFrame ); preset = memnew( TextureRect );
bbc->add_child(preset); bbc->add_child(preset);
//preset->set_ignore_mouse(false); //preset->set_ignore_mouse(false);
preset->connect("gui_input", this, "_preset_input"); preset->connect("gui_input", this, "_preset_input");

View File

@ -50,8 +50,8 @@ private:
Image last_capture; Image last_capture;
Control *uv_edit; Control *uv_edit;
Control *w_edit; Control *w_edit;
TextureFrame *sample; TextureRect *sample;
TextureFrame *preset; TextureRect *preset;
Button *bt_add_preset; Button *bt_add_preset;
List<Color> presets; List<Color> presets;
ToolButton *btn_pick; ToolButton *btn_pick;

View File

@ -3,33 +3,33 @@
void ColorFrame::set_frame_color(const Color& p_color) { void ColorRect::set_frame_color(const Color& p_color) {
color=p_color; color=p_color;
update(); update();
} }
Color ColorFrame::get_frame_color() const{ Color ColorRect::get_frame_color() const{
return color; return color;
} }
void ColorFrame::_notification(int p_what) { void ColorRect::_notification(int p_what) {
if (p_what==NOTIFICATION_DRAW) { if (p_what==NOTIFICATION_DRAW) {
draw_rect(Rect2(Point2(),get_size()),color); draw_rect(Rect2(Point2(),get_size()),color);
} }
} }
void ColorFrame::_bind_methods() { void ColorRect::_bind_methods() {
ClassDB::bind_method(_MD("set_frame_color","color"),&ColorFrame::set_frame_color); ClassDB::bind_method(_MD("set_frame_color","color"),&ColorRect::set_frame_color);
ClassDB::bind_method(_MD("get_frame_color"),&ColorFrame::get_frame_color); ClassDB::bind_method(_MD("get_frame_color"),&ColorRect::get_frame_color);
ADD_PROPERTY(PropertyInfo(Variant::COLOR,"color"),_SCS("set_frame_color"),_SCS("get_frame_color") ); ADD_PROPERTY(PropertyInfo(Variant::COLOR,"color"),_SCS("set_frame_color"),_SCS("get_frame_color") );
} }
ColorFrame::ColorFrame() { ColorRect::ColorRect() {
color=Color(1,1,1); color=Color(1,1,1);
} }

View File

@ -3,8 +3,8 @@
#include "scene/gui/control.h" #include "scene/gui/control.h"
class ColorFrame : public Control { class ColorRect : public Control {
GDCLASS(ColorFrame,Control) GDCLASS(ColorRect,Control)
Color color; Color color;
protected: protected:
@ -16,7 +16,7 @@ public:
void set_frame_color(const Color& p_color); void set_frame_color(const Color& p_color);
Color get_frame_color() const; Color get_frame_color() const;
ColorFrame(); ColorRect();
}; };
#endif // COLORRECT_H #endif // COLORRECT_H

View File

@ -30,7 +30,7 @@
#include "servers/visual_server.h" #include "servers/visual_server.h"
void Patch9Frame::_notification(int p_what) { void NinePatchRect::_notification(int p_what) {
if (p_what==NOTIFICATION_DRAW) { if (p_what==NOTIFICATION_DRAW) {
@ -61,21 +61,21 @@ void Patch9Frame::_notification(int p_what) {
} }
} }
Size2 Patch9Frame::get_minimum_size() const { Size2 NinePatchRect::get_minimum_size() const {
return Size2(margin[MARGIN_LEFT]+margin[MARGIN_RIGHT],margin[MARGIN_TOP]+margin[MARGIN_BOTTOM]); return Size2(margin[MARGIN_LEFT]+margin[MARGIN_RIGHT],margin[MARGIN_TOP]+margin[MARGIN_BOTTOM]);
} }
void Patch9Frame::_bind_methods() { void NinePatchRect::_bind_methods() {
ClassDB::bind_method(_MD("set_texture","texture"), & Patch9Frame::set_texture ); ClassDB::bind_method(_MD("set_texture","texture"), & NinePatchRect::set_texture );
ClassDB::bind_method(_MD("get_texture"), & Patch9Frame::get_texture ); ClassDB::bind_method(_MD("get_texture"), & NinePatchRect::get_texture );
ClassDB::bind_method(_MD("set_patch_margin","margin","value"), & Patch9Frame::set_patch_margin ); ClassDB::bind_method(_MD("set_patch_margin","margin","value"), & NinePatchRect::set_patch_margin );
ClassDB::bind_method(_MD("get_patch_margin","margin"), & Patch9Frame::get_patch_margin ); ClassDB::bind_method(_MD("get_patch_margin","margin"), & NinePatchRect::get_patch_margin );
ClassDB::bind_method(_MD("set_region_rect","rect"),&Patch9Frame::set_region_rect); ClassDB::bind_method(_MD("set_region_rect","rect"),&NinePatchRect::set_region_rect);
ClassDB::bind_method(_MD("get_region_rect"),&Patch9Frame::get_region_rect); ClassDB::bind_method(_MD("get_region_rect"),&NinePatchRect::get_region_rect);
ClassDB::bind_method(_MD("set_draw_center","draw_center"), & Patch9Frame::set_draw_center ); ClassDB::bind_method(_MD("set_draw_center","draw_center"), & NinePatchRect::set_draw_center );
ClassDB::bind_method(_MD("get_draw_center"), & Patch9Frame::get_draw_center ); ClassDB::bind_method(_MD("get_draw_center"), & NinePatchRect::get_draw_center );
ADD_SIGNAL(MethodInfo("texture_changed")); ADD_SIGNAL(MethodInfo("texture_changed"));
@ -92,7 +92,7 @@ void Patch9Frame::_bind_methods() {
} }
void Patch9Frame::set_texture(const Ref<Texture>& p_tex) { void NinePatchRect::set_texture(const Ref<Texture>& p_tex) {
if (texture==p_tex) if (texture==p_tex)
return; return;
@ -104,14 +104,14 @@ void Patch9Frame::set_texture(const Ref<Texture>& p_tex) {
emit_signal("texture_changed"); emit_signal("texture_changed");
} }
Ref<Texture> Patch9Frame::get_texture() const { Ref<Texture> NinePatchRect::get_texture() const {
return texture; return texture;
} }
void Patch9Frame::set_patch_margin(Margin p_margin,int p_size) { void NinePatchRect::set_patch_margin(Margin p_margin,int p_size) {
ERR_FAIL_INDEX(p_margin,4); ERR_FAIL_INDEX(p_margin,4);
margin[p_margin]=p_size; margin[p_margin]=p_size;
@ -133,13 +133,13 @@ void Patch9Frame::set_patch_margin(Margin p_margin,int p_size) {
} }
} }
int Patch9Frame::get_patch_margin(Margin p_margin) const{ int NinePatchRect::get_patch_margin(Margin p_margin) const{
ERR_FAIL_INDEX_V(p_margin,4,0); ERR_FAIL_INDEX_V(p_margin,4,0);
return margin[p_margin]; return margin[p_margin];
} }
void Patch9Frame::set_region_rect(const Rect2& p_region_rect) { void NinePatchRect::set_region_rect(const Rect2& p_region_rect) {
if (region_rect==p_region_rect) if (region_rect==p_region_rect)
return; return;
@ -150,23 +150,23 @@ void Patch9Frame::set_region_rect(const Rect2& p_region_rect) {
_change_notify("region_rect"); _change_notify("region_rect");
} }
Rect2 Patch9Frame::get_region_rect() const { Rect2 NinePatchRect::get_region_rect() const {
return region_rect; return region_rect;
} }
void Patch9Frame::set_draw_center(bool p_draw) { void NinePatchRect::set_draw_center(bool p_draw) {
draw_center=p_draw; draw_center=p_draw;
update(); update();
} }
bool Patch9Frame::get_draw_center() const{ bool NinePatchRect::get_draw_center() const{
return draw_center; return draw_center;
} }
Patch9Frame::Patch9Frame() { NinePatchRect::NinePatchRect() {
margin[MARGIN_LEFT]=0; margin[MARGIN_LEFT]=0;
@ -179,6 +179,6 @@ Patch9Frame::Patch9Frame() {
} }
Patch9Frame::~Patch9Frame() NinePatchRect::~NinePatchRect()
{ {
} }

View File

@ -33,9 +33,9 @@
/** /**
@author Juan Linietsky <reduzio@gmail.com> @author Juan Linietsky <reduzio@gmail.com>
*/ */
class Patch9Frame : public Control { class NinePatchRect : public Control {
GDCLASS(Patch9Frame,Control); GDCLASS(NinePatchRect,Control);
bool draw_center; bool draw_center;
int margin[4]; int margin[4];
@ -61,8 +61,8 @@ public:
void set_draw_center(bool p_enable); void set_draw_center(bool p_enable);
bool get_draw_center() const; bool get_draw_center() const;
Patch9Frame(); NinePatchRect();
~Patch9Frame(); ~NinePatchRect();
}; };
#endif // PATCH_9_FRAME_H #endif // PATCH_9_FRAME_H

View File

@ -29,7 +29,7 @@
#include "texture_frame.h" #include "texture_frame.h"
#include "servers/visual_server.h" #include "servers/visual_server.h"
void TextureFrame::_notification(int p_what) { void TextureRect::_notification(int p_what) {
if (p_what==NOTIFICATION_DRAW) { if (p_what==NOTIFICATION_DRAW) {
@ -85,22 +85,22 @@ void TextureFrame::_notification(int p_what) {
} }
} }
Size2 TextureFrame::get_minimum_size() const { Size2 TextureRect::get_minimum_size() const {
if (!expand && !texture.is_null()) if (!expand && !texture.is_null())
return texture->get_size(); return texture->get_size();
else else
return Size2(); return Size2();
} }
void TextureFrame::_bind_methods() { void TextureRect::_bind_methods() {
ClassDB::bind_method(_MD("set_texture","texture"), & TextureFrame::set_texture ); ClassDB::bind_method(_MD("set_texture","texture"), & TextureRect::set_texture );
ClassDB::bind_method(_MD("get_texture"), & TextureFrame::get_texture ); ClassDB::bind_method(_MD("get_texture"), & TextureRect::get_texture );
ClassDB::bind_method(_MD("set_expand","enable"), & TextureFrame::set_expand ); ClassDB::bind_method(_MD("set_expand","enable"), & TextureRect::set_expand );
ClassDB::bind_method(_MD("has_expand"), & TextureFrame::has_expand ); ClassDB::bind_method(_MD("has_expand"), & TextureRect::has_expand );
ClassDB::bind_method(_MD("set_stretch_mode","stretch_mode"), & TextureFrame::set_stretch_mode ); ClassDB::bind_method(_MD("set_stretch_mode","stretch_mode"), & TextureRect::set_stretch_mode );
ClassDB::bind_method(_MD("get_stretch_mode"), & TextureFrame::get_stretch_mode ); ClassDB::bind_method(_MD("get_stretch_mode"), & TextureRect::get_stretch_mode );
ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), _SCS("set_texture"),_SCS("get_texture") ); ADD_PROPERTYNZ( PropertyInfo( Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), _SCS("set_texture"),_SCS("get_texture") );
ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "expand" ), _SCS("set_expand"),_SCS("has_expand") ); ADD_PROPERTYNZ( PropertyInfo( Variant::BOOL, "expand" ), _SCS("set_expand"),_SCS("has_expand") );
@ -117,7 +117,7 @@ void TextureFrame::_bind_methods() {
} }
void TextureFrame::set_texture(const Ref<Texture>& p_tex) { void TextureRect::set_texture(const Ref<Texture>& p_tex) {
texture=p_tex; texture=p_tex;
update(); update();
@ -126,35 +126,35 @@ void TextureFrame::set_texture(const Ref<Texture>& p_tex) {
minimum_size_changed(); minimum_size_changed();
} }
Ref<Texture> TextureFrame::get_texture() const { Ref<Texture> TextureRect::get_texture() const {
return texture; return texture;
} }
void TextureFrame::set_expand(bool p_expand) { void TextureRect::set_expand(bool p_expand) {
expand=p_expand; expand=p_expand;
update(); update();
minimum_size_changed(); minimum_size_changed();
} }
bool TextureFrame::has_expand() const { bool TextureRect::has_expand() const {
return expand; return expand;
} }
void TextureFrame::set_stretch_mode(StretchMode p_mode) { void TextureRect::set_stretch_mode(StretchMode p_mode) {
stretch_mode=p_mode; stretch_mode=p_mode;
update(); update();
} }
TextureFrame::StretchMode TextureFrame::get_stretch_mode() const { TextureRect::StretchMode TextureRect::get_stretch_mode() const {
return stretch_mode; return stretch_mode;
} }
TextureFrame::TextureFrame() { TextureRect::TextureRect() {
expand=false; expand=false;
@ -163,7 +163,7 @@ TextureFrame::TextureFrame() {
} }
TextureFrame::~TextureFrame() TextureRect::~TextureRect()
{ {
} }

View File

@ -33,9 +33,9 @@
/** /**
@author Juan Linietsky <reduzio@gmail.com> @author Juan Linietsky <reduzio@gmail.com>
*/ */
class TextureFrame : public Control { class TextureRect : public Control {
GDCLASS(TextureFrame,Control); GDCLASS(TextureRect,Control);
public: public:
enum StretchMode { enum StretchMode {
STRETCH_SCALE_ON_EXPAND, //default, for backwards compatibility STRETCH_SCALE_ON_EXPAND, //default, for backwards compatibility
@ -69,10 +69,10 @@ public:
void set_stretch_mode(StretchMode p_mode); void set_stretch_mode(StretchMode p_mode);
StretchMode get_stretch_mode() const; StretchMode get_stretch_mode() const;
TextureFrame(); TextureRect();
~TextureFrame(); ~TextureRect();
}; };
VARIANT_ENUM_CAST( TextureFrame::StretchMode ); VARIANT_ENUM_CAST( TextureRect::StretchMode );
#endif // TEXTURE_FRAME_H #endif // TEXTURE_FRAME_H

View File

@ -339,9 +339,9 @@ void register_scene_types() {
OS::get_singleton()->yield(); //may take time to init OS::get_singleton()->yield(); //may take time to init
ClassDB::register_class<TextureFrame>(); ClassDB::register_class<TextureRect>();
ClassDB::register_class<ColorFrame>(); ClassDB::register_class<ColorRect>();
ClassDB::register_class<Patch9Frame>(); ClassDB::register_class<NinePatchRect>();
ClassDB::register_class<TabContainer>(); ClassDB::register_class<TabContainer>();
ClassDB::register_class<Tabs>(); ClassDB::register_class<Tabs>();
ClassDB::register_virtual_class<Separator>(); ClassDB::register_virtual_class<Separator>();

View File

@ -4001,7 +4001,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
//menu->set_pos(Point2()); //menu->set_pos(Point2());
//add_child(menu); //add_child(menu);
zoomicon = memnew( TextureFrame ); zoomicon = memnew( TextureRect );
hb->add_child(zoomicon); hb->add_child(zoomicon);
zoomicon->set_tooltip(TTR("Animation zoom.")); zoomicon->set_tooltip(TTR("Animation zoom."));

View File

@ -177,7 +177,7 @@ class AnimationKeyEditor : public VBoxContainer {
PopupMenu *type_menu; PopupMenu *type_menu;
Control *ec; Control *ec;
TextureFrame *zoomicon; TextureRect *zoomicon;
HSlider *zoom; HSlider *zoom;
//MenuButton *menu; //MenuButton *menu;
SpinBox *length; SpinBox *length;

View File

@ -147,7 +147,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() {
vb->add_child(rating_hb); vb->add_child(rating_hb);
for(int i=0;i<5;i++) { for(int i=0;i<5;i++) {
stars[i]=memnew(TextureFrame); stars[i]=memnew(TextureRect);
rating_hb->add_child(stars[i]); rating_hb->add_child(stars[i]);
} }
price = memnew( Label ); price = memnew( Label );
@ -296,7 +296,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
desc_bg->add_child(description); desc_bg->add_child(description);
desc_bg->add_style_override("panel",get_stylebox("normal","TextEdit")); desc_bg->add_style_override("panel",get_stylebox("normal","TextEdit"));
preview = memnew( TextureFrame ); preview = memnew( TextureRect );
preview->set_custom_minimum_size(Size2(640,345)); preview->set_custom_minimum_size(Size2(640,345));
hbox->add_child(preview); hbox->add_child(preview);
@ -485,7 +485,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
HBoxContainer *hb = memnew( HBoxContainer); HBoxContainer *hb = memnew( HBoxContainer);
add_child(hb); add_child(hb);
icon = memnew( TextureFrame ); icon = memnew( TextureRect );
hb->add_child(icon); hb->add_child(icon);
VBoxContainer *vb = memnew( VBoxContainer ); VBoxContainer *vb = memnew( VBoxContainer );
@ -555,7 +555,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
void EditorAssetLibrary::_notification(int p_what) { void EditorAssetLibrary::_notification(int p_what) {
if (p_what==NOTIFICATION_READY) { if (p_what==NOTIFICATION_READY) {
TextureFrame *tf = memnew(TextureFrame); TextureRect *tf = memnew(TextureRect);
tf->set_texture(get_icon("Error","EditorIcons")); tf->set_texture(get_icon("Error","EditorIcons"));
reverse->set_icon(get_icon("Updown","EditorIcons")); reverse->set_icon(get_icon("Updown","EditorIcons"));

View File

@ -58,7 +58,7 @@ class EditorAssetLibraryItem : public PanelContainer {
LinkButton* title; LinkButton* title;
LinkButton* category; LinkButton* category;
LinkButton* author; LinkButton* author;
TextureFrame *stars[5]; TextureRect *stars[5];
Label* price; Label* price;
int asset_id; int asset_id;
@ -104,7 +104,7 @@ class EditorAssetLibraryItemDescription : public ConfirmationDialog {
}; };
Vector<Preview> preview_images; Vector<Preview> preview_images;
TextureFrame *preview; TextureRect *preview;
void set_image(int p_type,int p_index,const Ref<Texture>& p_image); void set_image(int p_type,int p_index,const Ref<Texture>& p_image);
@ -138,7 +138,7 @@ class EditorAssetLibraryItemDownload : public PanelContainer {
GDCLASS(EditorAssetLibraryItemDownload, PanelContainer); GDCLASS(EditorAssetLibraryItemDownload, PanelContainer);
TextureFrame *icon; TextureRect *icon;
Label* title; Label* title;
ProgressBar *progress; ProgressBar *progress;
Button *install; Button *install;

View File

@ -1405,7 +1405,7 @@ EditorFileDialog::EditorFileDialog() {
filter_hb->add_child(preview_vb); filter_hb->add_child(preview_vb);
CenterContainer *prev_cc = memnew( CenterContainer ); CenterContainer *prev_cc = memnew( CenterContainer );
preview_vb->add_margin_child(TTR("Preview:"),prev_cc); preview_vb->add_margin_child(TTR("Preview:"),prev_cc);
preview = memnew( TextureFrame ); preview = memnew( TextureRect );
prev_cc->add_child(preview); prev_cc->add_child(preview);
preview_vb->hide(); preview_vb->hide();

View File

@ -93,7 +93,7 @@ private:
OptionButton *drives; OptionButton *drives;
ItemList *item_list; ItemList *item_list;
TextureFrame *preview; TextureRect *preview;
VBoxContainer *preview_vb; VBoxContainer *preview_vb;
HBoxContainer *list_hb; HBoxContainer *list_hb;
LineEdit *file; LineEdit *file;

View File

@ -5057,7 +5057,7 @@ Variant EditorNode::drag_resource(const Ref<Resource>& p_res,Control* p_from) {
Control *drag_control = memnew( Control ); Control *drag_control = memnew( Control );
TextureFrame *drag_preview = memnew( TextureFrame ); TextureRect *drag_preview = memnew( TextureRect );
Label* label=memnew( Label ); Label* label=memnew( Label );
waiting_for_sources_changed=true; // waiting_for_sources_changed=true; //
@ -6432,7 +6432,7 @@ EditorNode::EditorNode() {
about_text->set_pos(Point2(gui_base->get_icon("Logo","EditorIcons")->get_size().width+30,20)); about_text->set_pos(Point2(gui_base->get_icon("Logo","EditorIcons")->get_size().width+30,20));
gui_base->add_child(about); gui_base->add_child(about);
about->add_child(about_text); about->add_child(about_text);
TextureFrame *logo = memnew( TextureFrame ); TextureRect *logo = memnew( TextureRect );
about->add_child(logo); about->add_child(logo);
logo->set_pos(Point2(20,20)); logo->set_pos(Point2(20,20));
logo->set_texture(gui_base->get_icon("Logo","EditorIcons") ); logo->set_texture(gui_base->get_icon("Logo","EditorIcons") );

View File

@ -708,7 +708,7 @@ EditorProfiler::EditorProfiler()
variables->connect("item_edited",this,"_item_edited"); variables->connect("item_edited",this,"_item_edited");
graph = memnew( TextureFrame ); graph = memnew( TextureRect );
graph->set_expand(true); graph->set_expand(true);
graph->set_mouse_filter(MOUSE_FILTER_STOP); graph->set_mouse_filter(MOUSE_FILTER_STOP);
//graph->set_ignore_mouse(false); //graph->set_ignore_mouse(false);

View File

@ -71,7 +71,7 @@ public:
private: private:
Button *activate; Button *activate;
TextureFrame *graph; TextureRect *graph;
Ref<ImageTexture> graph_texture; Ref<ImageTexture> graph_texture;
PoolVector<uint8_t> graph_image; PoolVector<uint8_t> graph_image;
Tree *variables; Tree *variables;

View File

@ -1770,8 +1770,8 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
path_hb->add_child(search_box); path_hb->add_child(search_box);
search_box->connect("text_changed",this,"_search_changed"); search_box->connect("text_changed",this,"_search_changed");
search_icon = memnew( TextureFrame ); search_icon = memnew( TextureRect );
search_icon->set_stretch_mode(TextureFrame::STRETCH_KEEP_CENTERED); search_icon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
path_hb->add_child(search_icon); path_hb->add_child(search_icon);
button_display_mode = memnew( ToolButton ); button_display_mode = memnew( ToolButton );

View File

@ -95,7 +95,7 @@ private:
Button *button_hist_prev; Button *button_hist_prev;
LineEdit *current_path; LineEdit *current_path;
LineEdit *search_box; LineEdit *search_box;
TextureFrame *search_icon; TextureRect *search_icon;
HBoxContainer *path_hb; HBoxContainer *path_hb;
bool split_mode; bool split_mode;

View File

@ -1579,7 +1579,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
Ref<ImageTexture> atlast = memnew( ImageTexture ); Ref<ImageTexture> atlast = memnew( ImageTexture );
atlast->create_from_image(atlas); atlast->create_from_image(atlas);
// atlast->create_from_image(font_data_list[5]->blit); // atlast->create_from_image(font_data_list[5]->blit);
TextureFrame *tf = memnew( TextureFrame ); TextureRect *tf = memnew( TextureRect );
tf->set_texture(atlast); tf->set_texture(atlast);
dialog->add_child(tf); dialog->add_child(tf);
} }

View File

@ -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=="TextureFrame" || default_type=="Patch9Frame") { if (default_type=="Polygon2D" || default_type=="TouchScreenButton" || default_type=="TextureRect" || default_type=="Patch9Frame") {
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=="TextureFrame") child=memnew(TextureFrame); else if (default_type=="TextureRect") child=memnew(TextureRect);
else if (default_type=="Patch9Frame") child=memnew(Patch9Frame); else if (default_type=="Patch9Frame") 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);
@ -3992,7 +3992,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
types.push_back("Polygon2D"); types.push_back("Polygon2D");
types.push_back("TouchScreenButton"); types.push_back("TouchScreenButton");
// Control // Control
types.push_back("TextureFrame"); types.push_back("TextureRect");
types.push_back("Patch9Frame"); types.push_back("Patch9Frame");
target_node=NULL; target_node=NULL;

View File

@ -949,7 +949,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
uv_mode_hb->add_child(sb_step_y); uv_mode_hb->add_child(sb_step_y);
uv_mode_hb->add_child( memnew( VSeparator )); uv_mode_hb->add_child( memnew( VSeparator ));
uv_icon_zoom = memnew( TextureFrame ); uv_icon_zoom = memnew( TextureRect );
uv_mode_hb->add_child( uv_icon_zoom ); uv_mode_hb->add_child( uv_icon_zoom );
uv_zoom = memnew( HSlider ); uv_zoom = memnew( HSlider );
uv_zoom->set_min(0.01); uv_zoom->set_min(0.01);

View File

@ -77,7 +77,7 @@ class Polygon2DEditor : public HBoxContainer {
HScrollBar *uv_hscroll; HScrollBar *uv_hscroll;
VScrollBar *uv_vscroll; VScrollBar *uv_vscroll;
MenuButton *uv_menu; MenuButton *uv_menu;
TextureFrame *uv_icon_zoom; TextureRect *uv_icon_zoom;
Vector2 uv_draw_ofs; Vector2 uv_draw_ofs;
float uv_draw_zoom; float uv_draw_zoom;

View File

@ -361,7 +361,7 @@ SampleEditor::SampleEditor() {
add_style_override("panel", get_stylebox("panel","Panel")); add_style_override("panel", get_stylebox("panel","Panel"));
library = Ref<SampleLibrary>(memnew(SampleLibrary)); library = Ref<SampleLibrary>(memnew(SampleLibrary));
player->set_sample_library(library); player->set_sample_library(library);
sample_texframe = memnew( TextureFrame ); sample_texframe = memnew( TextureRect );
add_child(sample_texframe); add_child(sample_texframe);
sample_texframe->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN,5); sample_texframe->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN,5);
sample_texframe->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,5); sample_texframe->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,5);

View File

@ -47,7 +47,7 @@ class SampleEditor : public Panel {
Ref<ImageTexture> peakdisplay; Ref<ImageTexture> peakdisplay;
Ref<Sample> sample; Ref<Sample> sample;
Ref<SampleLibrary> library; Ref<SampleLibrary> library;
TextureFrame *sample_texframe; TextureRect *sample_texframe;
Button *stop; Button *stop;
Button *play; Button *play;

View File

@ -2178,7 +2178,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
menu_hb->add_spacer(); menu_hb->add_spacer();
script_icon = memnew( TextureFrame ); script_icon = memnew( TextureRect );
menu_hb->add_child(script_icon); menu_hb->add_child(script_icon);
script_name_label = memnew( Label ); script_name_label = memnew( Label );
menu_hb->add_child(script_name_label); menu_hb->add_child(script_name_label);

View File

@ -179,7 +179,7 @@ class ScriptEditor : public VBoxContainer {
String current_theme; String current_theme;
TextureFrame *script_icon; TextureRect *script_icon;
Label *script_name_label; Label *script_name_label;
ToolButton *script_back; ToolButton *script_back;

View File

@ -2315,7 +2315,7 @@ void ShaderGraphView::_create_node(int p_id) {
gn->add_child(le); gn->add_child(le);
le->set_text(graph->input_node_get_name(type,p_id)); le->set_text(graph->input_node_get_name(type,p_id));
le->connect("text_entered",this,"_input_name_changed",varray(p_id,le)); le->connect("text_entered",this,"_input_name_changed",varray(p_id,le));
TextureFrame *tex = memnew( TextureFrame ); TextureRect *tex = memnew( TextureRect );
tex->set_expand(true); tex->set_expand(true);
tex->set_custom_minimum_size(Size2(80,80)); tex->set_custom_minimum_size(Size2(80,80));
tex->set_drag_forwarding(this); tex->set_drag_forwarding(this);
@ -2530,7 +2530,7 @@ void ShaderGraphView::_sg_updated() {
Variant ShaderGraphView::get_drag_data_fw(const Point2 &p_point, Control *p_from) Variant ShaderGraphView::get_drag_data_fw(const Point2 &p_point, Control *p_from)
{ {
TextureFrame* frame = p_from->cast_to<TextureFrame>(); TextureRect* frame = p_from->cast_to<TextureRect>();
if (!frame) if (!frame)
return Variant(); return Variant();
@ -2576,7 +2576,7 @@ void ShaderGraphView::drop_data_fw(const Point2 &p_point, const Variant &p_data,
if (!can_drop_data_fw(p_point, p_data, p_from)) if (!can_drop_data_fw(p_point, p_data, p_from))
return; return;
TextureFrame *frame = p_from->cast_to<TextureFrame>(); TextureRect *frame = p_from->cast_to<TextureRect>();
if (!frame) if (!frame)
return; return;

View File

@ -643,7 +643,7 @@ void TextureRegionEditor::edit(Object *p_obj)
atlas_tex->disconnect("atlas_changed",this,"_edit_region"); atlas_tex->disconnect("atlas_changed",this,"_edit_region");
if (p_obj) { if (p_obj) {
node_sprite = p_obj->cast_to<Sprite>(); node_sprite = p_obj->cast_to<Sprite>();
node_patch9 = p_obj->cast_to<Patch9Frame>(); node_patch9 = p_obj->cast_to<NinePatchRect>();
if (p_obj->cast_to<StyleBoxTexture>()) if (p_obj->cast_to<StyleBoxTexture>())
obj_styleBox = Ref<StyleBoxTexture>(p_obj->cast_to<StyleBoxTexture>()); obj_styleBox = Ref<StyleBoxTexture>(p_obj->cast_to<StyleBoxTexture>());
if (p_obj->cast_to<AtlasTexture>()) { if (p_obj->cast_to<AtlasTexture>()) {
@ -897,7 +897,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
separator->set_h_size_flags(Control::SIZE_EXPAND_FILL); separator->set_h_size_flags(Control::SIZE_EXPAND_FILL);
hb_tools->add_child(separator); hb_tools->add_child(separator);
icon_zoom = memnew( TextureFrame ); icon_zoom = memnew( TextureRect );
hb_tools->add_child(icon_zoom); hb_tools->add_child(icon_zoom);
zoom_out = memnew( ToolButton ); zoom_out = memnew( ToolButton );

View File

@ -53,7 +53,7 @@ class TextureRegionEditor : public Control {
friend class TextureRegionEditorPlugin; friend class TextureRegionEditorPlugin;
MenuButton *snap_mode_button; MenuButton *snap_mode_button;
TextureFrame *icon_zoom; TextureRect *icon_zoom;
ToolButton *zoom_in; ToolButton *zoom_in;
ToolButton *zoom_reset; ToolButton *zoom_reset;
ToolButton *zoom_out; ToolButton *zoom_out;
@ -81,7 +81,7 @@ class TextureRegionEditor : public Control {
Vector2 snap_step; Vector2 snap_step;
Vector2 snap_separation; Vector2 snap_separation;
Patch9Frame *node_patch9; NinePatchRect *node_patch9;
Sprite *node_sprite; Sprite *node_sprite;
Ref<StyleBoxTexture> obj_styleBox; Ref<StyleBoxTexture> obj_styleBox;
Ref<AtlasTexture> atlas_tex; Ref<AtlasTexture> atlas_tex;

View File

@ -288,7 +288,7 @@ void ProjectExportDialog::_notification(int p_what) {
CenterContainer *cc = memnew( CenterContainer ); CenterContainer *cc = memnew( CenterContainer );
TextureFrame *tf = memnew( TextureFrame); TextureRect *tf = memnew( TextureRect);
tf->set_texture(get_icon("ErrorSign","EditorIcons")); tf->set_texture(get_icon("ErrorSign","EditorIcons"));
cc->add_child(tf); cc->add_child(tf);
plat_errors->add_child(cc); plat_errors->add_child(cc);
@ -1578,7 +1578,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
ScrollContainer *scroll = memnew( ScrollContainer ); ScrollContainer *scroll = memnew( ScrollContainer );
atlas_preview_dialog->add_child(scroll); atlas_preview_dialog->add_child(scroll);
//atlas_preview_dialog->set_child_rect(scroll); //atlas_preview_dialog->set_child_rect(scroll);
atlas_preview_frame = memnew( TextureFrame ); atlas_preview_frame = memnew( TextureRect );
scroll->add_child(atlas_preview_frame); scroll->add_child(atlas_preview_frame);
add_child(atlas_preview_dialog); add_child(atlas_preview_dialog);

View File

@ -134,7 +134,7 @@ private:
AcceptDialog *atlas_preview_dialog; AcceptDialog *atlas_preview_dialog;
TextureFrame *atlas_preview_frame; TextureRect *atlas_preview_frame;
VBoxContainer *script_vbox; VBoxContainer *script_vbox;

View File

@ -869,7 +869,7 @@ void ProjectManager::_load_recent_projects() {
favorite_box->add_child(favorite); favorite_box->add_child(favorite);
hb->add_child(favorite_box); hb->add_child(favorite_box);
TextureFrame *tf = memnew( TextureFrame ); TextureRect *tf = memnew( TextureRect );
tf->set_texture(icon); tf->set_texture(icon);
hb->add_child(tf); hb->add_child(tf);

View File

@ -2084,7 +2084,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
scene_tree->connect("selected", this,"_node_path_selected"); scene_tree->connect("selected", this,"_node_path_selected");
scene_tree->get_scene_tree()->set_show_enabled_subscene(true); scene_tree->get_scene_tree()->set_show_enabled_subscene(true);
texture_preview = memnew( TextureFrame ); texture_preview = memnew( TextureRect );
add_child( texture_preview); add_child( texture_preview);
texture_preview->hide(); texture_preview->hide();

View File

@ -96,7 +96,7 @@ class CustomPropertyEditor : public Popup {
Button *action_buttons[MAX_ACTION_BUTTONS]; Button *action_buttons[MAX_ACTION_BUTTONS];
MenuButton *type_button; MenuButton *type_button;
Vector<String> inheritors_array; Vector<String> inheritors_array;
TextureFrame *texture_preview; TextureRect *texture_preview;
ColorPicker *color_picker; ColorPicker *color_picker;
TextEdit *text_edit; TextEdit *text_edit;
bool read_only; bool read_only;

View File

@ -1926,9 +1926,9 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
filter = memnew( LineEdit ); filter = memnew( LineEdit );
filter->set_h_size_flags(SIZE_EXPAND_FILL); filter->set_h_size_flags(SIZE_EXPAND_FILL);
filter_hbc->add_child(filter); filter_hbc->add_child(filter);
filter_icon = memnew( TextureFrame ); filter_icon = memnew( TextureRect );
filter_hbc->add_child(filter_icon); filter_hbc->add_child(filter_icon);
filter_icon->set_stretch_mode(TextureFrame::STRETCH_KEEP_CENTERED); filter_icon->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
filter->connect("text_changed",this,"_filter_changed"); filter->connect("text_changed",this,"_filter_changed");

View File

@ -102,7 +102,7 @@ class SceneTreeDock : public VBoxContainer {
EditorFileDialog *new_scene_from_dialog; EditorFileDialog *new_scene_from_dialog;
LineEdit *filter; LineEdit *filter;
TextureFrame *filter_icon; TextureRect *filter_icon;
PopupMenu * menu; PopupMenu * menu;

View File

@ -953,7 +953,7 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2& p_point,Control* p_from)
if (i<list_max){ if (i<list_max){
HBoxContainer *hb = memnew( HBoxContainer ); HBoxContainer *hb = memnew( HBoxContainer );
TextureFrame *tf = memnew(TextureFrame); TextureRect *tf = memnew(TextureRect);
tf->set_texture(icons[i]); tf->set_texture(icons[i]);
hb->add_child(tf); hb->add_child(tf);
Label *label = memnew( Label( selected[i]->get_name() ) ); Label *label = memnew( Label( selected[i]->get_name() ) );