1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-04 19:21:46 +00:00

Change Theme to EditorDock and add closable property

This commit is contained in:
kobewi
2025-11-24 20:10:34 +01:00
parent 5f12ada7a4
commit 2de97cafb7
7 changed files with 55 additions and 22 deletions

View File

@@ -60,6 +60,10 @@ void EditorDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_transient"), &EditorDock::is_transient);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "transient"), "set_transient", "is_transient");
ClassDB::bind_method(D_METHOD("set_closable", "closable"), &EditorDock::set_closable);
ClassDB::bind_method(D_METHOD("is_closable"), &EditorDock::is_closable);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "closable"), "set_closable", "is_closable");
ClassDB::bind_method(D_METHOD("set_icon_name", "icon_name"), &EditorDock::set_icon_name);
ClassDB::bind_method(D_METHOD("get_icon_name"), &EditorDock::get_icon_name);
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "icon_name"), "set_icon_name", "get_icon_name");
@@ -88,6 +92,8 @@ void EditorDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_available_layouts"), &EditorDock::get_available_layouts);
ADD_PROPERTY(PropertyInfo(Variant::INT, "available_layouts", PROPERTY_HINT_FLAGS, "Vertical:1,Horizontal:2,Floating:3"), "set_available_layouts", "get_available_layouts");
ADD_SIGNAL(MethodInfo("closed"));
BIND_BITFIELD_FLAG(DOCK_LAYOUT_VERTICAL);
BIND_BITFIELD_FLAG(DOCK_LAYOUT_HORIZONTAL);
BIND_BITFIELD_FLAG(DOCK_LAYOUT_FLOATING);