mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Add a variable in Global for setting file dialogs as native, and add a "FileDialogs" node group
This settings is not exposed in the preferences in this commit
This commit is contained in:
parent
b08420d09d
commit
4bc0fba941
|
@ -148,16 +148,23 @@ var integer_zoom := false:
|
|||
zoom_slider.step = 1
|
||||
zoom_slider.value = zoom_slider.value # to trigger signal emission
|
||||
|
||||
## Found in Preferences. The scale of the Interface.
|
||||
## Found in Preferences. The scale of the interface.
|
||||
var shrink := 1.0
|
||||
## Found in Preferences. The font size used by the Interface.
|
||||
## Found in Preferences. The font size used by the interface.
|
||||
var font_size := 16:
|
||||
set(value):
|
||||
font_size = value
|
||||
control.theme.default_font_size = value
|
||||
control.theme.set_font_size("font_size", "HeaderSmall", value + 2)
|
||||
## Found in Preferences. If [code]true[/code], the Interface dims on popups.
|
||||
## Found in Preferences. If [code]true[/code], the interface dims on popups.
|
||||
var dim_on_popup := true
|
||||
var use_native_file_dialogs := false:
|
||||
set(value):
|
||||
use_native_file_dialogs = value
|
||||
if not is_inside_tree():
|
||||
await tree_entered
|
||||
await get_tree().process_frame
|
||||
get_tree().set_group(&"FileDialogs", "use_native_dialog", value)
|
||||
## Found in Preferences. The modulation color (or simply color) of icons.
|
||||
var modulate_icon_color := Color.GRAY
|
||||
## Found in Preferences. Determines if [member modulate_icon_color] uses custom or theme color.
|
||||
|
@ -1055,6 +1062,7 @@ func create_ui_for_shader_uniforms(
|
|||
file_dialog.access = FileDialog.ACCESS_FILESYSTEM
|
||||
file_dialog.size = Vector2(384, 281)
|
||||
file_dialog.file_selected.connect(file_selected.bind(u_name))
|
||||
file_dialog.use_native_dialog = use_native_file_dialogs
|
||||
var button := Button.new()
|
||||
button.text = "Load texture"
|
||||
button.pressed.connect(file_dialog.popup_centered)
|
||||
|
|
|
@ -115,7 +115,7 @@ text = "Delete Palette?"
|
|||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ExportFileDialog" type="FileDialog" parent="."]
|
||||
[node name="ExportFileDialog" type="FileDialog" parent="." groups=["FileDialogs"]]
|
||||
size = Vector2i(677, 400)
|
||||
access = 2
|
||||
filters = PackedStringArray("*.png ; PNG Image", "*.jpg,*.jpeg ; JPEG Image", "*.webp ; WebP Image")
|
||||
|
|
|
@ -1320,7 +1320,7 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="AddExtensionFileDialog" type="FileDialog" parent="Popups"]
|
||||
[node name="AddExtensionFileDialog" type="FileDialog" parent="Popups" groups=["FileDialogs"]]
|
||||
mode = 1
|
||||
title = "Open File(s)"
|
||||
size = Vector2i(560, 400)
|
||||
|
|
|
@ -773,7 +773,7 @@ script = ExtResource("5")
|
|||
wait_time = 0.2
|
||||
one_shot = true
|
||||
|
||||
[node name="LoadModelDialog" type="FileDialog" parent="." index="6"]
|
||||
[node name="LoadModelDialog" type="FileDialog" parent="." index="6" groups=["FileDialogs"]]
|
||||
mode = 1
|
||||
title = "Open File(s)"
|
||||
size = Vector2i(558, 300)
|
||||
|
|
|
@ -306,7 +306,7 @@ offset_right = 692.0
|
|||
offset_bottom = 551.0
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="PathDialog" type="FileDialog" parent="Popups"]
|
||||
[node name="PathDialog" type="FileDialog" parent="Popups" groups=["FileDialogs"]]
|
||||
mode = 2
|
||||
title = "Open a Directory"
|
||||
size = Vector2i(675, 500)
|
||||
|
|
|
@ -53,7 +53,7 @@ text = "No shader loaded!"
|
|||
[node name="ShaderParams" type="VBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FileDialog" type="FileDialog" parent="."]
|
||||
[node name="FileDialog" type="FileDialog" parent="." groups=["FileDialogs"]]
|
||||
access = 2
|
||||
filters = PackedStringArray("*gdshader; Godot Shader File")
|
||||
show_hidden_files = true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene format=3 uid="uid://b3aeqj2k58wdk"]
|
||||
|
||||
[node name="OpenSprite" type="FileDialog"]
|
||||
[node name="OpenSprite" type="FileDialog" groups=["FileDialogs"]]
|
||||
title = "Open File(s)"
|
||||
size = Vector2i(558, 400)
|
||||
exclusive = false
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene format=3 uid="uid://d4euwo633u33b"]
|
||||
|
||||
[node name="SaveSprite" type="FileDialog"]
|
||||
[node name="SaveSprite" type="FileDialog" groups=["FileDialogs"]]
|
||||
size = Vector2i(675, 400)
|
||||
exclusive = false
|
||||
popup_window = true
|
||||
|
|
Loading…
Reference in a new issue