当前位置: 首页>>代码示例>>C++>>正文


C++ MarginContainer::set_v_size_flags方法代码示例

本文整理汇总了C++中MarginContainer::set_v_size_flags方法的典型用法代码示例。如果您正苦于以下问题:C++ MarginContainer::set_v_size_flags方法的具体用法?C++ MarginContainer::set_v_size_flags怎么用?C++ MarginContainer::set_v_size_flags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MarginContainer的用法示例。


在下文中一共展示了MarginContainer::set_v_size_flags方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: memnew

ProjectExportDialog::ProjectExportDialog() {

	set_title(TTR("Export"));
	set_resizable(true);

	VBoxContainer *main_vb = memnew(VBoxContainer);
	add_child(main_vb);
	HBoxContainer *hbox = memnew(HBoxContainer);
	main_vb->add_child(hbox);
	hbox->set_v_size_flags(SIZE_EXPAND_FILL);

	VBoxContainer *preset_vb = memnew(VBoxContainer);
	preset_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	hbox->add_child(preset_vb);

	HBoxContainer *preset_hb = memnew(HBoxContainer);
	preset_hb->add_child(memnew(Label(TTR("Presets"))));
	preset_hb->add_spacer();
	preset_vb->add_child(preset_hb);

	add_preset = memnew(MenuButton);
	add_preset->set_text(TTR("Add.."));
	add_preset->get_popup()->connect("index_pressed", this, "_add_preset");
	preset_hb->add_child(add_preset);
	MarginContainer *mc = memnew(MarginContainer);
	preset_vb->add_child(mc);
	mc->set_v_size_flags(SIZE_EXPAND_FILL);
	presets = memnew(ItemList);
	presets->set_drag_forwarding(this);
	mc->add_child(presets);
	presets->connect("item_selected", this, "_edit_preset");
	delete_preset = memnew(ToolButton);
	preset_hb->add_child(delete_preset);
	delete_preset->connect("pressed", this, "_delete_preset");

	VBoxContainer *settings_vb = memnew(VBoxContainer);
	settings_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	hbox->add_child(settings_vb);

	name = memnew(LineEdit);
	settings_vb->add_margin_child(TTR("Name:"), name);
	name->connect("text_changed", this, "_name_changed");
	runnable = memnew(CheckButton);
	runnable->set_text(TTR("Runnable"));
	runnable->connect("pressed", this, "_runnable_pressed");
	settings_vb->add_child(runnable);

	sections = memnew(TabContainer);
	sections->set_tab_align(TabContainer::ALIGN_LEFT);
	settings_vb->add_child(sections);
	sections->set_v_size_flags(SIZE_EXPAND_FILL);

	parameters = memnew(PropertyEditor);
	sections->add_child(parameters);
	parameters->set_name(TTR("Options"));
	parameters->hide_top_label();
	parameters->set_v_size_flags(SIZE_EXPAND_FILL);
	parameters->set_hide_script(true);
	parameters->connect("property_edited", this, "_update_parameters");

	VBoxContainer *resources_vb = memnew(VBoxContainer);
	sections->add_child(resources_vb);
	resources_vb->set_name(TTR("Resources"));

	export_filter = memnew(OptionButton);
	export_filter->add_item(TTR("Export all resources in the project"));
	export_filter->add_item(TTR("Export selected scenes (and dependencies)"));
	export_filter->add_item(TTR("Export selected resources (and dependencies)"));
	resources_vb->add_margin_child(TTR("Export Mode:"), export_filter);
	export_filter->connect("item_selected", this, "_export_type_changed");

	include_label = memnew(Label);
	include_label->set_text(TTR("Resources to export:"));
	resources_vb->add_child(include_label);
	include_margin = memnew(MarginContainer);
	include_margin->set_v_size_flags(SIZE_EXPAND_FILL);
	resources_vb->add_child(include_margin);

	include_files = memnew(Tree);
	include_margin->add_child(include_files);
	include_files->connect("item_edited", this, "_tree_changed");

	include_filters = memnew(LineEdit);
	resources_vb->add_margin_child(TTR("Filters to export non-resource files (comma separated, e.g: *.json, *.txt)"), include_filters);
	include_filters->connect("text_changed", this, "_filter_changed");

	exclude_filters = memnew(LineEdit);
	resources_vb->add_margin_child(TTR("Filters to exclude files from project (comma separated, e.g: *.json, *.txt)"), exclude_filters);
	exclude_filters->connect("text_changed", this, "_filter_changed");

	VBoxContainer *patch_vb = memnew(VBoxContainer);
	sections->add_child(patch_vb);
	patch_vb->set_name(TTR("Patches"));

	patches = memnew(Tree);
	patch_vb->add_child(patches);
	patches->set_v_size_flags(SIZE_EXPAND_FILL);
	patches->set_hide_root(true);
	patches->connect("button_pressed", this, "_patch_button_pressed");
	patches->connect("item_edited", this, "_patch_edited");
//.........这里部分代码省略.........
开发者ID:Zylann,项目名称:godot,代码行数:101,代码来源:project_export.cpp

示例2: memnew

ProjectExportDialog::ProjectExportDialog() {

	set_title(TTR("Export"));
	set_resizable(true);

	VBoxContainer *main_vb = memnew(VBoxContainer);
	add_child(main_vb);
	HBoxContainer *hbox = memnew(HBoxContainer);
	main_vb->add_child(hbox);
	hbox->set_v_size_flags(SIZE_EXPAND_FILL);

	VBoxContainer *preset_vb = memnew(VBoxContainer);
	preset_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	hbox->add_child(preset_vb);

	HBoxContainer *preset_hb = memnew(HBoxContainer);
	preset_hb->add_child(memnew(Label(TTR("Presets"))));
	preset_hb->add_spacer();
	preset_vb->add_child(preset_hb);

	add_preset = memnew(MenuButton);
	add_preset->set_text(TTR("Add..."));
	add_preset->get_popup()->connect("index_pressed", this, "_add_preset");
	preset_hb->add_child(add_preset);
	MarginContainer *mc = memnew(MarginContainer);
	preset_vb->add_child(mc);
	mc->set_v_size_flags(SIZE_EXPAND_FILL);
	presets = memnew(ItemList);
	presets->set_drag_forwarding(this);
	mc->add_child(presets);
	presets->connect("item_selected", this, "_edit_preset");
	duplicate_preset = memnew(ToolButton);
	preset_hb->add_child(duplicate_preset);
	duplicate_preset->connect("pressed", this, "_duplicate_preset");
	delete_preset = memnew(ToolButton);
	preset_hb->add_child(delete_preset);
	delete_preset->connect("pressed", this, "_delete_preset");

	VBoxContainer *settings_vb = memnew(VBoxContainer);
	settings_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	hbox->add_child(settings_vb);

	name = memnew(LineEdit);
	settings_vb->add_margin_child(TTR("Name:"), name);
	name->connect("text_changed", this, "_name_changed");
	runnable = memnew(CheckButton);
	runnable->set_text(TTR("Runnable"));
	runnable->connect("pressed", this, "_runnable_pressed");
	settings_vb->add_child(runnable);

	sections = memnew(TabContainer);
	sections->set_tab_align(TabContainer::ALIGN_LEFT);
	settings_vb->add_child(sections);
	sections->set_v_size_flags(SIZE_EXPAND_FILL);

	parameters = memnew(EditorInspector);
	sections->add_child(parameters);
	parameters->set_name(TTR("Options"));
	parameters->set_v_size_flags(SIZE_EXPAND_FILL);
	parameters->connect("property_edited", this, "_update_parameters");

	VBoxContainer *resources_vb = memnew(VBoxContainer);
	sections->add_child(resources_vb);
	resources_vb->set_name(TTR("Resources"));

	export_filter = memnew(OptionButton);
	export_filter->add_item(TTR("Export all resources in the project"));
	export_filter->add_item(TTR("Export selected scenes (and dependencies)"));
	export_filter->add_item(TTR("Export selected resources (and dependencies)"));
	resources_vb->add_margin_child(TTR("Export Mode:"), export_filter);
	export_filter->connect("item_selected", this, "_export_type_changed");

	include_label = memnew(Label);
	include_label->set_text(TTR("Resources to export:"));
	resources_vb->add_child(include_label);
	include_margin = memnew(MarginContainer);
	include_margin->set_v_size_flags(SIZE_EXPAND_FILL);
	resources_vb->add_child(include_margin);

	include_files = memnew(Tree);
	include_margin->add_child(include_files);
	include_files->connect("item_edited", this, "_tree_changed");

	include_filters = memnew(LineEdit);
	resources_vb->add_margin_child(TTR("Filters to export non-resource files (comma separated, e.g: *.json, *.txt)"), include_filters);
	include_filters->connect("text_changed", this, "_filter_changed");

	exclude_filters = memnew(LineEdit);
	resources_vb->add_margin_child(TTR("Filters to exclude files from project (comma separated, e.g: *.json, *.txt)"), exclude_filters);
	exclude_filters->connect("text_changed", this, "_filter_changed");

	VBoxContainer *patch_vb = memnew(VBoxContainer);
	sections->add_child(patch_vb);
	patch_vb->set_name(TTR("Patches"));

	patches = memnew(Tree);
	patch_vb->add_child(patches);
	patches->set_v_size_flags(SIZE_EXPAND_FILL);
	patches->set_hide_root(true);
	patches->connect("button_pressed", this, "_patch_button_pressed");
//.........这里部分代码省略.........
开发者ID:mcanders,项目名称:godot,代码行数:101,代码来源:project_export.cpp

示例3: memnew

ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){



	ppeer = Ref<PacketPeerStream>( memnew( PacketPeerStream ) );
	editor=p_editor;

	tabs = memnew( TabContainer );
	tabs->set_v_size_flags(SIZE_EXPAND_FILL);
	tabs->set_area_as_parent_rect();
	add_child(tabs);

	tb = memnew( TextureButton );
	tb->connect("pressed",this,"_hide_request");
	tb->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_END,20);
	tb->set_margin(MARGIN_TOP,2);
	add_child(tb);



	VBoxContainer *vbc = memnew( VBoxContainer );
	vbc->set_name("Debugger");
	//tabs->add_child(vbc);
	Control *dbg=vbc;

	HBoxContainer *hbc = memnew( HBoxContainer );
	vbc->add_child(hbc);


	reason = memnew( Label );
	reason->set_text("");
	hbc->add_child(reason);
	reason->add_color_override("font_color",Color(1,0.4,0.0,0.8));
	reason->set_h_size_flags(SIZE_EXPAND_FILL);
	reason->set_clip_text(true);

	hbc->add_child( memnew( VSeparator) );

	step = memnew( Button );
	hbc->add_child(step);
	step->set_tooltip("Step Into");
	step->connect("pressed",this,"debug_step");

	next = memnew( Button );
	hbc->add_child(next);
	next->set_tooltip("Step Over");
	next->connect("pressed",this,"debug_next");

	hbc->add_child( memnew( VSeparator) );

	dobreak = memnew( Button );
	hbc->add_child(dobreak);
	dobreak->set_tooltip("Break");
	dobreak->connect("pressed",this,"debug_break");

	docontinue = memnew( Button );
	hbc->add_child(docontinue);
	docontinue->set_tooltip("Continue");
	docontinue->connect("pressed",this,"debug_continue");

	hbc->add_child( memnew( VSeparator) );

	back = memnew( Button );
	hbc->add_child(back);
	back->set_tooltip("Inspect Previous Instance");

	forward = memnew( Button );
	hbc->add_child(forward);
	back->set_tooltip("Inspect Next Instance");


	HSplitContainer *sc = memnew( HSplitContainer );
	vbc->add_child(sc);
	sc->set_v_size_flags(SIZE_EXPAND_FILL);

	stack_dump = memnew( Tree );
	stack_dump->set_columns(1);
	stack_dump->set_column_titles_visible(true);
	stack_dump->set_column_title(0,"Stack Frames");
	stack_dump->set_h_size_flags(SIZE_EXPAND_FILL);
	stack_dump->set_hide_root(true);
	stack_dump->connect("cell_selected",this,"_stack_dump_frame_selected");
	sc->add_child(stack_dump);

	inspector = memnew( PropertyEditor );
	inspector->set_h_size_flags(SIZE_EXPAND_FILL);
	inspector->hide_top_label();
	inspector->get_scene_tree()->set_column_title(0,"Variable");
	inspector->set_capitalize_paths(false);
	inspector->set_read_only(true);
	sc->add_child(inspector);

	server = TCP_Server::create_ref();

	pending_in_queue=0;

	variables = memnew( ScriptEditorDebuggerVariables );
	inspector->edit(variables);
	breaked=false;

//.........这里部分代码省略.........
开发者ID:Ragar0ck,项目名称:godot,代码行数:101,代码来源:script_editor_debugger.cpp


注:本文中的MarginContainer::set_v_size_flags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。