mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
toggle native dialog with embed subwindows option
This commit is contained in:
parent
6bc9ad625d
commit
9699381f5c
2 changed files with 6 additions and 3 deletions
|
@ -73,12 +73,14 @@ func _ready() -> void:
|
|||
tab_container.add_button_pressed.connect(add_empty_deck)
|
||||
RendererPersistence.init_namespace(PERSISTENCE_NAMESPACE)
|
||||
|
||||
var embed_subwindows: bool = RendererPersistence.get_or_create(PERSISTENCE_NAMESPACE, "config", "embed_subwindows", true)
|
||||
debug_popup_menu.set_item_checked(
|
||||
DebugMenuId.EMBED_SUBWINDOWS,
|
||||
RendererPersistence.get_or_create(PERSISTENCE_NAMESPACE, "config", "embed_subwindows", true)
|
||||
embed_subwindows
|
||||
)
|
||||
|
||||
get_tree().get_root().gui_embed_subwindows = RendererPersistence.get_value(PERSISTENCE_NAMESPACE, "config", "embed_subwindows")
|
||||
get_tree().get_root().gui_embed_subwindows = embed_subwindows
|
||||
file_dialog.use_native_dialog = !embed_subwindows
|
||||
|
||||
recent_files = RendererPersistence.get_or_create(
|
||||
PERSISTENCE_NAMESPACE, "config",
|
||||
|
@ -318,6 +320,7 @@ func _on_debug_id_pressed(id: int) -> void:
|
|||
debug_popup_menu.set_item_checked(id, !c)
|
||||
get_tree().get_root().gui_embed_subwindows = !c
|
||||
RendererPersistence.set_value(PERSISTENCE_NAMESPACE, "config", "embed_subwindows", !c)
|
||||
file_dialog.use_native_dialog = c
|
||||
|
||||
|
||||
func _on_debug_decks_viewer_item_pressed(deck_id: String, instance_id: String) -> void:
|
||||
|
|
|
@ -160,7 +160,7 @@ layout_mode = 2
|
|||
size = Vector2i(776, 447)
|
||||
mode_overrides_title = false
|
||||
access = 2
|
||||
filters = PackedStringArray("*.deck ;StreamGraph Decks")
|
||||
filters = PackedStringArray("*.deck;StreamGraph Decks")
|
||||
use_native_dialog = true
|
||||
|
||||
[node name="Connections" type="Node" parent="."]
|
||||
|
|
Loading…
Reference in a new issue