Removed the set_child_rect() in AcceptDialog. AcceptDialog now works as a container!

This commit is contained in:
Juan Linietsky 2017-01-10 01:49:55 -03:00
parent a503f8aadc
commit 48097f6df3
48 changed files with 92 additions and 101 deletions

View file

@ -1257,7 +1257,6 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
settings_vbc = memnew(VBoxContainer);
settings_vbc->set_custom_minimum_size(Size2(200, 0));
settings_dialog->add_child(settings_vbc);
settings_dialog->set_child_rect(settings_vbc);
settings_pick_distance = memnew(SpinBox);
settings_pick_distance->set_max(10000.0f);

View file

@ -3422,7 +3422,7 @@ VisualScriptEditor::VisualScriptEditor() {
edit_signal_edit = memnew( PropertyEditor );
edit_signal_edit->hide_top_label();
edit_signal_dialog->add_child(edit_signal_edit);
edit_signal_dialog->set_child_rect(edit_signal_edit);
edit_signal_edit->edit(signal_editor);
edit_variable_dialog = memnew( AcceptDialog );
@ -3434,7 +3434,7 @@ VisualScriptEditor::VisualScriptEditor() {
edit_variable_edit = memnew( PropertyEditor );
edit_variable_edit->hide_top_label();
edit_variable_dialog->add_child(edit_variable_edit);
edit_variable_dialog->set_child_rect(edit_variable_edit);
edit_variable_edit->edit(variable_editor);
select_base_type=memnew(CreateDialog);

View file

@ -683,7 +683,7 @@ ColorPickerButton::ColorPickerButton() {
popup = memnew( PopupPanel );
picker = memnew( ColorPicker );
popup->add_child(picker);
popup->set_child_rect(picker);
picker->connect("color_changed",this,"_color_changed");
add_child(popup);
}

View file

@ -37,7 +37,7 @@ ColorRampEdit::ColorRampEdit(){
popup = memnew( PopupPanel );
picker = memnew( ColorPicker );
popup->add_child(picker);
popup->set_child_rect(picker);
add_child(popup);
checker = Ref<ImageTexture>(memnew( ImageTexture ));

View file

@ -203,7 +203,7 @@ void AcceptDialog::_notification(int p_what) {
cancel_pressed();
} if (p_what==NOTIFICATION_RESIZED) {
_update_child_rect();
_update_child_rects();
}
}
@ -233,7 +233,7 @@ void AcceptDialog::set_text(String p_text) {
label->set_text(p_text);
minimum_size_changed();
_update_child_rect();
_update_child_rects();
}
void AcceptDialog::set_hide_on_ok(bool p_hide) {
@ -253,7 +253,9 @@ void AcceptDialog::register_text_enter(Node *p_line_edit) {
p_line_edit->connect("text_entered", this,"_builtin_text_entered");
}
void AcceptDialog::_update_child_rect() {
void AcceptDialog::_update_child_rects() {
Size2 label_size=label->get_minimum_size();
if (label->get_text().empty()) {
label_size.height = 0;
@ -265,10 +267,17 @@ void AcceptDialog::_update_child_rect() {
Vector2 cpos(margin,margin+label_size.height);
Vector2 csize(size.x-margin*2,size.y-margin*3-hminsize.y-label_size.height);
if (child) {
for(int i=0;i<get_child_count();i++) {
Control *c = get_child(i)->cast_to<Control>();
if (!c)
continue;
if (c==hbc || c==label || c==get_close_button())
continue;
c->set_pos(cpos);
c->set_size(csize);
child->set_pos(cpos);
child->set_size(csize);
}
cpos.y+=csize.y+margin;
@ -283,13 +292,23 @@ Size2 AcceptDialog::get_minimum_size() const {
int margin = get_constant("margin","Dialogs");
Size2 minsize = label->get_combined_minimum_size();
if (child) {
Size2 cminsize = child->get_combined_minimum_size();
for(int i=0;i<get_child_count();i++) {
Control *c = get_child(i)->cast_to<Control>();
if (!c)
continue;
if (c==hbc || c==label || c==const_cast<AcceptDialog*>(this)->get_close_button())
continue;
Size2 cminsize = c->get_combined_minimum_size();
minsize.x=MAX(cminsize.x,minsize.x);
minsize.y=MAX(cminsize.y,minsize.y);
}
Size2 hminsize = hbc->get_combined_minimum_size();
minsize.x = MAX(hminsize.x,minsize.x);
minsize.y+=hminsize.y;
@ -302,23 +321,6 @@ Size2 AcceptDialog::get_minimum_size() const {
}
void AcceptDialog::set_child_rect(Control *p_child) {
ERR_FAIL_COND(p_child->get_parent()!=this);
//p_child->set_area_as_parent_rect(get_constant("margin","Dialogs"));
child=p_child;
minimum_size_changed();
_update_child_rect();
}
void AcceptDialog::remove_child_notify(Node *p_child) {
if (p_child==child) {
child=NULL;
}
}
void AcceptDialog::_custom_action(const String& p_action) {
emit_signal("custom_action",p_action);
@ -371,7 +373,6 @@ void AcceptDialog::_bind_methods() {
ClassDB::bind_method(_MD("_custom_action"),&AcceptDialog::_custom_action);
ClassDB::bind_method(_MD("set_text","text"),&AcceptDialog::set_text);
ClassDB::bind_method(_MD("get_text"),&AcceptDialog::get_text);
ClassDB::bind_method(_MD("set_child_rect","child:Control"),&AcceptDialog::set_child_rect);
ADD_SIGNAL( MethodInfo("confirmed") );
ADD_SIGNAL( MethodInfo("custom_action",PropertyInfo(Variant::STRING,"action")) );
@ -418,8 +419,6 @@ AcceptDialog::AcceptDialog() {
hide_on_ok=true;
set_title(RTR("Alert!"));
child=NULL;
}

View file

@ -91,7 +91,6 @@ class AcceptDialog : public WindowDialog {
GDCLASS(AcceptDialog,WindowDialog);
Control *child;
HBoxContainer *hbc;
Label *label;
Button *ok;
@ -103,13 +102,11 @@ class AcceptDialog : public WindowDialog {
void _ok_pressed();
void _close_pressed();
void _builtin_text_entered(const String& p_text);
void _update_child_rect();
void _update_child_rects();
static bool swap_ok_cancel;
virtual void remove_child_notify(Node *p_child);
protected:
@ -140,8 +137,6 @@ public:
void set_text(String p_text);
String get_text() const;
void set_child_rect(Control *p_child);
AcceptDialog();
~AcceptDialog();

View file

@ -764,7 +764,7 @@ FileDialog::FileDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
mode=MODE_SAVE_FILE;
set_title(RTR("Save a File"));
@ -828,7 +828,7 @@ FileDialog::FileDialog() {
makedialog->set_title(RTR("Create Folder"));
VBoxContainer *makevb= memnew( VBoxContainer );
makedialog->add_child(makevb);
makedialog->set_child_rect(makevb);
makedirname = memnew( LineEdit );
makevb->add_margin_child(RTR("Name:"),makedirname);
add_child(makedialog);

View file

@ -4104,7 +4104,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
optimize_dialog->set_title(TTR("Anim. Optimizer"));
VBoxContainer *optimize_vb = memnew( VBoxContainer );
optimize_dialog->add_child(optimize_vb);
optimize_dialog->set_child_rect(optimize_vb);
optimize_linear_error = memnew( SpinBox );
optimize_linear_error->set_max(1.0);
optimize_linear_error->set_min(0.001);
@ -4272,7 +4272,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
scale_dialog = memnew( ConfirmationDialog );
VBoxContainer *vbc = memnew( VBoxContainer );
scale_dialog->add_child(vbc);
scale_dialog->set_child_rect(vbc);
scale = memnew( SpinBox );
scale->set_min(-99999);
scale->set_max(99999);
@ -4289,7 +4289,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
add_child(cleanup_dialog);
VBoxContainer *cleanup_vb = memnew( VBoxContainer );
cleanup_dialog->add_child(cleanup_vb);
cleanup_dialog->set_child_rect(cleanup_vb);
cleanup_keys = memnew( CheckButton );
cleanup_keys->set_text(TTR("Remove invalid keys"));
cleanup_keys->set_pressed(true);

View file

@ -270,7 +270,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
VBoxContainer *vbox = memnew( VBoxContainer );
add_child(vbox);
set_child_rect(vbox);
HBoxContainer *hbox = memnew( HBoxContainer);

View file

@ -899,7 +899,7 @@ FindReplaceDialog::FindReplaceDialog() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
set_child_rect(vb);
search_text = memnew( LineEdit );

View file

@ -305,7 +305,7 @@ ConnectDialog::ConnectDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
HBoxContainer *main_hb = memnew( HBoxContainer );
vbc->add_child(main_hb);

View file

@ -649,7 +649,7 @@ CreateDialog::CreateDialog() {
HSplitContainer *hbc = memnew( HSplitContainer );
add_child(hbc);
set_child_rect(hbc);
VBoxContainer *lvbc = memnew( VBoxContainer);
hbc->add_child(lvbc);
@ -932,7 +932,7 @@ CreateDialog::CreateDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
get_ok()->set_text("Create");

View file

@ -261,7 +261,7 @@ DependencyEditor::DependencyEditor() {
VBoxContainer *vb = memnew( VBoxContainer );
vb->set_name(TTR("Dependencies"));
add_child(vb);
set_child_rect(vb);
tree = memnew( Tree );
tree->set_columns(2);
@ -354,7 +354,7 @@ DependencyEditorOwners::DependencyEditorOwners() {
owners = memnew( ItemList );
add_child(owners);
set_child_rect(owners);
}
@ -459,7 +459,7 @@ DependencyRemoveDialog::DependencyRemoveDialog() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
set_child_rect(vb);
text = memnew( Label );
vb->add_child(text);
@ -522,7 +522,7 @@ DependencyErrorDialog::DependencyErrorDialog() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
set_child_rect(vb);
files = memnew( Tree );
@ -699,7 +699,7 @@ OrphanResourcesDialog::OrphanResourcesDialog(){
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
files = memnew( Tree );
files->set_columns(2);
files->set_column_titles_visible(true);

View file

@ -339,7 +339,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
set_child_rect(vb);
tree = memnew( Tree );
vb->add_margin_child("Package Contents:",tree,true);

View file

@ -243,7 +243,7 @@ EditorDirDialog::EditorDirDialog() {
tree = memnew( Tree );
add_child(tree);
set_child_rect(tree);
tree->connect("item_activated",this,"_ok");
makedir = add_button(TTR("Create Folder"),OS::get_singleton()->get_swap_ok_cancel()?true:false,"makedir");
@ -255,7 +255,7 @@ EditorDirDialog::EditorDirDialog() {
VBoxContainer *makevb= memnew( VBoxContainer );
makedialog->add_child(makevb);
makedialog->set_child_rect(makevb);
// makedialog->set_child_rect(makevb);
makedirname = memnew( LineEdit );
makevb->add_margin_child(TTR("Name:"),makedirname);

View file

@ -1289,7 +1289,6 @@ EditorFileDialog::EditorFileDialog() {
disable_overwrite_warning=false;
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
mode=MODE_SAVE_FILE;
set_title(TTR("Save a File"));
@ -1446,7 +1445,7 @@ EditorFileDialog::EditorFileDialog() {
makedialog->set_title(TTR("Create Folder"));
VBoxContainer *makevb= memnew( VBoxContainer );
makedialog->add_child(makevb);
makedialog->set_child_rect(makevb);
makedirname = memnew( LineEdit );
makevb->add_margin_child(TTR("Name:"),makedirname);
add_child(makedialog);

View file

@ -314,7 +314,7 @@ EditorHelpSearch::EditorHelpSearch() {
editor=EditorNode::get_singleton();
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
HBoxContainer *sb_hb = memnew( HBoxContainer);
search_box = memnew( LineEdit );
sb_hb->add_child(search_box);
@ -508,7 +508,6 @@ EditorHelpIndex::EditorHelpIndex() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
search_box = memnew( LineEdit );
vbc->add_margin_child(TTR("Search:"), search_box);
@ -1839,7 +1838,7 @@ EditorHelp::EditorHelp() {
add_child(search_dialog);
VBoxContainer *search_vb = memnew( VBoxContainer );
search_dialog->add_child(search_vb);
search_dialog->set_child_rect(search_vb);
search = memnew( LineEdit );
search_dialog->register_text_enter(search);
search_vb->add_margin_child(TTR("Search Text"),search);

View file

@ -5626,7 +5626,7 @@ EditorNode::EditorNode() {
dock_vb->add_child(dock_select);
dock_select_popoup->set_child_rect(dock_vb);
dock_select_popoup->set_as_minsize();
dock_select_rect_over=-1;
dock_popup_selected=-1;
@ -6690,7 +6690,7 @@ EditorNode::EditorNode() {
load_error_dialog = memnew( AcceptDialog );
load_error_dialog->add_child(load_errors);
load_error_dialog->set_title(TTR("Load Errors"));
load_error_dialog->set_child_rect(load_errors);
//load_error_dialog->set_child_rect(load_errors);
gui_base->add_child(load_error_dialog);

View file

@ -135,7 +135,7 @@ EditorReImportDialog::EditorReImportDialog() {
tree = memnew( Tree );
add_child(tree);
tree->set_hide_root(true);
set_child_rect(tree);
//set_child_rect(tree);
set_title(TTR("Re-Import Changed Resources"));
error = memnew( AcceptDialog);
add_child(error);

View file

@ -203,7 +203,7 @@ EditorSubScene::EditorSubScene() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
set_child_rect(vb);
// set_child_rect(vb);
HBoxContainer *hb = memnew( HBoxContainer );
path = memnew( LineEdit );

View file

@ -179,7 +179,7 @@ public:
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);
HBoxContainer *hbc = memnew(HBoxContainer);

View file

@ -634,7 +634,7 @@ public:
plugin=p_plugin;
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer);
vbc->add_child(hbc);
VBoxContainer *vbl = memnew( VBoxContainer );

View file

@ -294,7 +294,7 @@ public:
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );
vbc->add_margin_child(TTR("Source Mesh(es):"),hbc);

View file

@ -335,7 +335,7 @@ public:
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );

View file

@ -1115,7 +1115,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
set_title(TTR("Import 3D Scene"));
HBoxContainer *import_hb = memnew( HBoxContainer );
add_child(import_hb);
set_child_rect(import_hb);
//set_child_rect(import_hb);
VBoxContainer *vbc = memnew( VBoxContainer );
import_hb->add_child(vbc);
@ -1302,7 +1302,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
add_child(confirm_import);
VBoxContainer *cvb = memnew( VBoxContainer );
confirm_import->add_child(cvb);
confirm_import->set_child_rect(cvb);
// confirm_import->set_child_rect(cvb);
PanelContainer *pc = memnew( PanelContainer );
pc->add_style_override("panel",get_stylebox("normal","TextEdit"));

View file

@ -657,7 +657,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
mode_hb = memnew( HBoxContainer );
add_child(mode_hb);
set_child_rect(mode_hb);
//set_child_rect(mode_hb);
VBoxContainer *vbcg = memnew( VBoxContainer);

View file

@ -299,7 +299,7 @@ public:
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);

View file

@ -1477,7 +1477,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
blend_editor.dialog->set_hide_on_ok(true);
VBoxContainer *blend_vb = memnew( VBoxContainer);
blend_editor.dialog->add_child(blend_vb);
blend_editor.dialog->set_child_rect(blend_vb);
//blend_editor.dialog->set_child_rect(blend_vb);
blend_editor.tree = memnew( Tree );
blend_editor.tree->set_columns(2);
blend_vb->add_margin_child(TTR("Blend Times:"),blend_editor.tree,true);

View file

@ -1473,7 +1473,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
filter = memnew( Tree );
filter_dialog->add_child(filter);
filter_dialog->set_child_rect(filter);
//filter_dialog->set_child_rect(filter);
filter->connect("item_edited",this,"_filter_edited");
filter_button = memnew( Button );

View file

@ -79,7 +79,7 @@ public:
container = memnew( VBoxContainer );
add_child(container);
set_child_rect(container);
// set_child_rect(container);
child_container = memnew( GridContainer );
child_container->set_columns(3);

View file

@ -309,7 +309,7 @@ ItemListEditor::ItemListEditor() {
VBoxContainer *vbc = memnew( VBoxContainer );
dialog->add_child(vbc);
dialog->set_child_rect(vbc);
//dialog->set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->set_h_size_flags(SIZE_EXPAND_FILL);

View file

@ -249,7 +249,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
VBoxContainer *outline_dialog_vbc = memnew( VBoxContainer );
outline_dialog->add_child(outline_dialog_vbc);
outline_dialog->set_child_rect(outline_dialog_vbc);
//outline_dialog->set_child_rect(outline_dialog_vbc);
outline_size = memnew( SpinBox );
outline_size->set_min(0.001);

View file

@ -341,7 +341,7 @@ MultiMeshEditor::MultiMeshEditor() {
VBoxContainer *vbc = memnew( VBoxContainer );
populate_dialog->add_child(vbc);
populate_dialog->set_child_rect(vbc);
//populate_dialog->set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );

View file

@ -853,7 +853,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
VBoxContainer *uv_main_vb = memnew( VBoxContainer );
uv_edit->add_child(uv_main_vb);
uv_edit->set_child_rect(uv_main_vb);
//uv_edit->set_child_rect(uv_main_vb);
HBoxContainer *uv_mode_hb = memnew( HBoxContainer );
uv_main_vb->add_child(uv_mode_hb);
for(int i=0;i<UV_MODE_MAX;i++) {

View file

@ -254,7 +254,7 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);
search_box = memnew( LineEdit );
vbc->add_margin_child(TTR("Search:"),search_box);
search_box->connect("text_changed",this,"_text_changed");
@ -2247,7 +2247,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
{
VBoxContainer *vbc = memnew( VBoxContainer );
disk_changed->add_child(vbc);
disk_changed->set_child_rect(vbc);
// disk_changed->set_child_rect(vbc);
Label *dl = memnew( Label );
dl->set_text(TTR("The following files are newer on disk.\nWhat action should be taken?:"));

View file

@ -1280,7 +1280,7 @@ ScriptTextEditor::ScriptTextEditor() {
add_child(color_panel);
color_picker = memnew(ColorPicker);
color_panel->add_child(color_picker);
color_panel->set_child_rect(color_picker);
color_panel->set_child_rect(color_picker); //NOT
color_picker->connect("color_changed", this, "_color_changed");
edit_hb = memnew (HBoxContainer);

View file

@ -310,7 +310,7 @@ GraphColorRampEdit::GraphColorRampEdit(){
popup = memnew( PopupPanel );
picker = memnew( ColorPicker );
popup->add_child(picker);
popup->set_child_rect(picker);
/popup->set_child_rect(picker);
add_child(popup);
}

View file

@ -3979,7 +3979,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
VBoxContainer *snap_dialog_vbc = memnew( VBoxContainer );
snap_dialog->add_child(snap_dialog_vbc);
snap_dialog->set_child_rect(snap_dialog_vbc);
//snap_dialog->set_child_rect(snap_dialog_vbc);
snap_translate = memnew( LineEdit );
snap_translate->set_text("1");
@ -4001,7 +4001,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
settings_vbc = memnew( VBoxContainer );
settings_vbc->set_custom_minimum_size(Size2(200,0));
settings_dialog->add_child(settings_vbc);
settings_dialog->set_child_rect(settings_vbc);
//settings_dialog->set_child_rect(settings_vbc);

View file

@ -674,7 +674,7 @@ void ProjectExportDialog::_create_android_keystore_window() {
vb->add_child(hb);
keystore_create_dialog->add_child(vb);
keystore_create_dialog->set_child_rect(vb);
//keystore_create_dialog->set_child_rect(vb);
add_child(keystore_create_dialog);
keystore_create_dialog->connect("confirmed", this, "_create_android_keystore");
@ -1345,7 +1345,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
sections = memnew( TabContainer );
add_child(sections);
set_child_rect(sections);
//set_child_rect(sections);
VBoxContainer *pvbox = memnew( VBoxContainer );
sections->add_child(pvbox);
@ -1577,7 +1577,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
atlas_preview_dialog = memnew( AcceptDialog );
ScrollContainer *scroll = memnew( ScrollContainer );
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 );
scroll->add_child(atlas_preview_frame);
add_child(atlas_preview_dialog);
@ -2111,7 +2111,7 @@ ProjectExport::ProjectExport(EditorData* p_data) {
editor_data=p_data;
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);
set_title(TTR("Project Export"));
label = memnew( Label );
label->set_text(TTR("Export Preset:"));

View file

@ -404,7 +404,7 @@ public:
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
set_child_rect(vb);
// set_child_rect(vb);
Label* l = memnew(Label);
l->set_text(TTR("Project Path:"));

View file

@ -1223,7 +1223,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
tab_container = memnew( TabContainer );
add_child(tab_container);
set_child_rect(tab_container);
//set_child_rect(tab_container);
//tab_container->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN, 15 );
//tab_container->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END, 15 );
@ -1424,7 +1424,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
hbc = memnew( HBoxContainer );
device_input->add_child(hbc);
device_input->set_child_rect(hbc);
// device_input->set_child_rect(hbc);
VBoxContainer *vbc_left = memnew( VBoxContainer );
hbc->add_child(vbc_left);

View file

@ -574,7 +574,7 @@ PropertySelector::PropertySelector() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);
search_box = memnew( LineEdit );
vbc->add_margin_child(TTR("Search:"),search_box);
search_box->connect("text_changed",this,"_text_changed");

View file

@ -266,7 +266,7 @@ EditorQuickOpen::EditorQuickOpen() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);
search_box = memnew( LineEdit );
vbc->add_margin_child(TTR("Search:"),search_box);
search_box->connect("text_changed",this,"_text_changed");

View file

@ -88,7 +88,7 @@ ReparentDialog::ReparentDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
// set_child_rect(vbc);
tree = memnew( SceneTreeEditor(false) );
tree->set_show_enabled_subscene(true);

View file

@ -76,7 +76,7 @@ RunSettingsDialog::RunSettingsDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
//set_child_rect(vbc);
run_mode = memnew( OptionButton );
vbc->add_margin_child(TTR("Run Mode:"),run_mode);

View file

@ -1302,7 +1302,7 @@ SceneTreeDialog::SceneTreeDialog() {
tree = memnew( SceneTreeEditor(false,false) );
add_child(tree);
set_child_rect(tree);
//set_child_rect(tree);
tree->get_scene_tree()->connect("item_activated",this,"_select");

View file

@ -353,7 +353,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
set_child_rect(vb);
//set_child_rect(vb);
class_name = memnew( LineEdit );

View file

@ -307,7 +307,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
tabs = memnew( TabContainer );
add_child(tabs);
set_child_rect(tabs);
//set_child_rect(tabs);
VBoxContainer *vbc = memnew( VBoxContainer );
tabs->add_child(vbc);