Skip to content

Commit

Permalink
Add a setting to allow usage of native file dialogs in the preferences
Browse files Browse the repository at this point in the history
Closes #274 and implements #568, at long last! Some issues remain:
- The native save pxo dialog doesn't have an "Include blended images" option. This will be fixed once godotengine/godot#83480 is merged.
- When a native file dialog closes, the interface still remains dimmed.
- In the export dialog, the "Browse" file dialog will also close the export dialog itself when it closes, when it's native.
  • Loading branch information
OverloadedOrama committed Jan 24, 2024
1 parent 4bc0fba commit d640b6a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Translations/Translations.pot
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,10 @@ msgstr ""
msgid "Dim interface on dialog popup"
msgstr ""

#. Found in the preferences, under the interface section. When this setting is enabled, the native file dialogs of the operating system are being used, instead of Pixelorama's custom ones.
msgid "Use native file dialogs"
msgstr ""

msgid "Dark"
msgstr ""

Expand Down Expand Up @@ -2305,6 +2309,10 @@ msgstr ""
msgid "Quit confirmation"
msgstr ""

#. Found in the preferences, under the startup section. Path is a noun and it refers to the location in the device where FFMPEG is located at. FFMPEG is a software name and it should not be translated. See https://en.wikipedia.org/wiki/Path_(computing)
msgid "FFMPEG path"
msgstr ""

msgid "Enable autosave"
msgstr ""

Expand Down
1 change: 1 addition & 0 deletions src/Preferences/PreferencesDialog.gd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var preferences: Array[Preference] = [
Preference.new("shrink", "%ShrinkSlider", "value"),
Preference.new("font_size", "Interface/InterfaceOptions/FontSizeSlider", "value"),
Preference.new("dim_on_popup", "Interface/InterfaceOptions/DimCheckBox", "button_pressed"),
Preference.new("use_native_file_dialogs", "Interface/InterfaceOptions/NativeFileDialogs", "button_pressed"),
Preference.new("icon_color_from", "Interface/ButtonOptions/IconColorOptionButton", "selected"),
Preference.new("custom_icon_color", "Interface/ButtonOptions/IconColorButton", "color"),
Preference.new("left_tool_color", "Interface/ButtonOptions/LeftToolColorButton", "color"),
Expand Down
12 changes: 12 additions & 0 deletions src/Preferences/PreferencesDialog.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,18 @@ mouse_default_cursor_shape = 2
button_pressed = true
text = "On"

[node name="NativeFileDialogsLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
layout_mode = 2
size_flags_horizontal = 3
text = "Use native file dialogs"

[node name="NativeFileDialogs" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
button_pressed = true
text = "On"

[node name="ThemesHeader" type="HBoxContainer" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface"]
layout_mode = 2
theme_override_constants/separation = 0
Expand Down

0 comments on commit d640b6a

Please sign in to comment.