Cleanup embed subwindows getters
This commit is contained in:
parent
47c35f5b96
commit
3c53752b4a
5 changed files with 8 additions and 19 deletions
|
@ -130,11 +130,6 @@
|
|||
Removes the focus from the currently focused [Control] within this viewport. If no [Control] has the focus, does nothing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_embedding_subwindows" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_input_handled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
|
@ -219,7 +214,7 @@
|
|||
<member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled" default="false">
|
||||
If [code]true[/code], the viewport will not receive input events.
|
||||
</member>
|
||||
<member name="gui_embed_subwindows" type="bool" setter="set_embed_subwindows_hint" getter="get_embed_subwindows_hint" default="false">
|
||||
<member name="gui_embed_subwindows" type="bool" setter="set_embedding_subwindows" getter="is_embedding_subwindows" default="false">
|
||||
If [code]true[/code], sub-windows (popups and dialogs) will be embedded inside application window as control-like nodes. If [code]false[/code], they will appear as separate windows handled by the operating system.
|
||||
</member>
|
||||
<member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled" default="true">
|
||||
|
|
|
@ -6291,7 +6291,7 @@ EditorNode::EditorNode() {
|
|||
scene_root_parent->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
scene_root = memnew(SubViewport);
|
||||
scene_root->set_embed_subwindows_hint(true);
|
||||
scene_root->set_embedding_subwindows(true);
|
||||
scene_root->set_disable_3d(true);
|
||||
|
||||
scene_root->set_disable_input(true);
|
||||
|
|
|
@ -2247,7 +2247,7 @@ bool Main::start() {
|
|||
bool embed_subwindows = GLOBAL_DEF("display/window/subwindows/embed_subwindows", true);
|
||||
|
||||
if (OS::get_singleton()->is_single_window() || (!project_manager && !editor && embed_subwindows)) {
|
||||
sml->get_root()->set_embed_subwindows_hint(true);
|
||||
sml->get_root()->set_embedding_subwindows(true);
|
||||
}
|
||||
ResourceLoader::add_custom_loaders();
|
||||
ResourceSaver::add_custom_savers();
|
||||
|
@ -2429,7 +2429,7 @@ bool Main::start() {
|
|||
"interface/editor/single_window_mode");
|
||||
|
||||
if (editor_embed_subwindows) {
|
||||
sml->get_root()->set_embed_subwindows_hint(true);
|
||||
sml->get_root()->set_embedding_subwindows(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -3040,14 +3040,10 @@ Viewport *Viewport::get_parent_viewport() const {
|
|||
return get_parent()->get_viewport();
|
||||
}
|
||||
|
||||
void Viewport::set_embed_subwindows_hint(bool p_embed) {
|
||||
void Viewport::set_embedding_subwindows(bool p_embed) {
|
||||
gui.embed_subwindows_hint = p_embed;
|
||||
}
|
||||
|
||||
bool Viewport::get_embed_subwindows_hint() const {
|
||||
return gui.embed_subwindows_hint;
|
||||
}
|
||||
|
||||
bool Viewport::is_embedding_subwindows() const {
|
||||
return gui.embed_subwindows_hint;
|
||||
}
|
||||
|
@ -3638,8 +3634,7 @@ void Viewport::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_default_canvas_item_texture_filter", "mode"), &Viewport::set_default_canvas_item_texture_filter);
|
||||
ClassDB::bind_method(D_METHOD("get_default_canvas_item_texture_filter"), &Viewport::get_default_canvas_item_texture_filter);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_embed_subwindows_hint", "enable"), &Viewport::set_embed_subwindows_hint);
|
||||
ClassDB::bind_method(D_METHOD("get_embed_subwindows_hint"), &Viewport::get_embed_subwindows_hint);
|
||||
ClassDB::bind_method(D_METHOD("set_embedding_subwindows", "enable"), &Viewport::set_embedding_subwindows);
|
||||
ClassDB::bind_method(D_METHOD("is_embedding_subwindows"), &Viewport::is_embedding_subwindows);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_default_canvas_item_texture_repeat", "mode"), &Viewport::set_default_canvas_item_texture_repeat);
|
||||
|
@ -3721,7 +3716,7 @@ void Viewport::_bind_methods() {
|
|||
ADD_GROUP("GUI", "gui_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gui_disable_input"), "set_disable_input", "is_input_disabled");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gui_snap_controls_to_pixels"), "set_snap_controls_to_pixels", "is_snap_controls_to_pixels_enabled");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gui_embed_subwindows"), "set_embed_subwindows_hint", "get_embed_subwindows_hint");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "gui_embed_subwindows"), "set_embedding_subwindows", "is_embedding_subwindows");
|
||||
ADD_GROUP("SDF", "sdf_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "sdf_oversize", PROPERTY_HINT_ENUM, "100%,120%,150%,200%"), "set_sdf_oversize", "get_sdf_oversize");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "sdf_scale", PROPERTY_HINT_ENUM, "100%,50%,25%"), "set_sdf_scale", "get_sdf_scale");
|
||||
|
|
|
@ -600,8 +600,7 @@ public:
|
|||
|
||||
virtual DisplayServer::WindowID get_window_id() const = 0;
|
||||
|
||||
void set_embed_subwindows_hint(bool p_embed);
|
||||
bool get_embed_subwindows_hint() const;
|
||||
void set_embedding_subwindows(bool p_embed);
|
||||
bool is_embedding_subwindows() const;
|
||||
|
||||
Viewport *get_parent_viewport() const;
|
||||
|
|
Loading…
Add table
Reference in a new issue