mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-21 13:03:13 +00:00
Add a checkbox in Preferences for quit confirmation
This has no effect if the project has unsaved changes.
This commit is contained in:
parent
0fa6879bdf
commit
c242cd546d
5 changed files with 34 additions and 6 deletions
|
@ -1691,6 +1691,9 @@ msgstr ""
|
||||||
msgid "Opens last opened project on startup"
|
msgid "Opens last opened project on startup"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Quit confirmation"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Enable autosave"
|
msgid "Enable autosave"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ var default_clear_color := Color.gray
|
||||||
# Preferences
|
# Preferences
|
||||||
var pressure_sensitivity_mode = PressureSensitivity.NONE
|
var pressure_sensitivity_mode = PressureSensitivity.NONE
|
||||||
var open_last_project := false
|
var open_last_project := false
|
||||||
|
var quit_confirmation := false
|
||||||
var smooth_zoom := true
|
var smooth_zoom := true
|
||||||
|
|
||||||
var shrink := 1.0
|
var shrink := 1.0
|
||||||
|
|
|
@ -440,7 +440,10 @@ func _can_draw_true() -> void:
|
||||||
func show_quit_dialog() -> void:
|
func show_quit_dialog() -> void:
|
||||||
if !quit_dialog.visible:
|
if !quit_dialog.visible:
|
||||||
if !Global.current_project.has_changed:
|
if !Global.current_project.has_changed:
|
||||||
quit_dialog.call_deferred("popup_centered")
|
if Global.quit_confirmation:
|
||||||
|
quit_dialog.call_deferred("popup_centered")
|
||||||
|
else:
|
||||||
|
_on_QuitDialog_confirmed()
|
||||||
else:
|
else:
|
||||||
Global.quit_and_save_dialog.call_deferred("popup_centered")
|
Global.quit_and_save_dialog.call_deferred("popup_centered")
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,12 @@ var preferences = [
|
||||||
"pressed",
|
"pressed",
|
||||||
Global.open_last_project
|
Global.open_last_project
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
"quit_confirmation",
|
||||||
|
"Startup/StartupContainer/QuitConfirmation",
|
||||||
|
"pressed",
|
||||||
|
Global.quit_confirmation
|
||||||
|
],
|
||||||
["shrink", "Interface/ShrinkContainer/ShrinkHSlider", "value", Global.shrink],
|
["shrink", "Interface/ShrinkContainer/ShrinkHSlider", "value", Global.shrink],
|
||||||
["dim_on_popup", "Interface/DimPopup/CheckBox", "pressed", Global.dim_on_popup],
|
["dim_on_popup", "Interface/DimPopup/CheckBox", "pressed", Global.dim_on_popup],
|
||||||
[
|
[
|
||||||
|
|
|
@ -51,18 +51,19 @@ size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/ScrollContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/ScrollContainer"]
|
||||||
margin_right = 498.0
|
margin_right = 498.0
|
||||||
margin_bottom = 24.0
|
margin_bottom = 52.0
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="Startup" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
[node name="Startup" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||||
margin_right = 498.0
|
margin_right = 498.0
|
||||||
margin_bottom = 24.0
|
margin_bottom = 52.0
|
||||||
|
|
||||||
[node name="StartupContainer" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Startup"]
|
[node name="StartupContainer" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Startup"]
|
||||||
margin_right = 498.0
|
margin_right = 498.0
|
||||||
margin_bottom = 24.0
|
margin_bottom = 52.0
|
||||||
|
columns = 3
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Startup/StartupContainer"]
|
[node name="OpenLastProjectLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Startup/StartupContainer"]
|
||||||
margin_top = 5.0
|
margin_top = 5.0
|
||||||
margin_right = 180.0
|
margin_right = 180.0
|
||||||
margin_bottom = 19.0
|
margin_bottom = 19.0
|
||||||
|
@ -76,6 +77,20 @@ hint_tooltip = "Opens last opened project on startup"
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
text = "On"
|
text = "On"
|
||||||
|
|
||||||
|
[node name="QuitConfirmationLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Startup/StartupContainer"]
|
||||||
|
margin_left = 235.0
|
||||||
|
margin_top = 5.0
|
||||||
|
margin_right = 348.0
|
||||||
|
margin_bottom = 19.0
|
||||||
|
text = "Quit confirmation"
|
||||||
|
|
||||||
|
[node name="QuitConfirmation" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Startup/StartupContainer"]
|
||||||
|
margin_top = 28.0
|
||||||
|
margin_right = 180.0
|
||||||
|
margin_bottom = 52.0
|
||||||
|
mouse_default_cursor_shape = 2
|
||||||
|
text = "On"
|
||||||
|
|
||||||
[node name="PressureSentivity" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Startup"]
|
[node name="PressureSentivity" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Startup"]
|
||||||
visible = false
|
visible = false
|
||||||
margin_top = 28.0
|
margin_top = 28.0
|
||||||
|
|
Loading…
Add table
Reference in a new issue