1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Added an option in the Preferences for interface dimming on dialog popup

This commit is contained in:
Manolis Papadeas 2021-03-17 19:28:01 +02:00
parent b26be782c1
commit cffba7edde
5 changed files with 41 additions and 14 deletions

View file

@ -25,6 +25,7 @@ Laurenz Reinthaler (Schweini07), kleonc, Fayez Akhtar (Variable), THWLF, Gamespl
- Implemented the options to import a spritesheet as a new layer and to import an image and have it replace an already existing frame. ([#453](https://github.com/Orama-Interactive/Pixelorama/pull/453))
- More templates have been added when creating a new sprite. ([#450](https://github.com/Orama-Interactive/Pixelorama/pull/450))
- Added a keyboard shortcut for clear selection, `Control-D`. ([#457](https://github.com/Orama-Interactive/Pixelorama/pull/457))
- Added an option in the Preferences for interface dimming on dialog popup. If this is enabled, the application background gets darker when a dialog window pops up.
### Changed
- Undo and redo now work when their respective keyboard shortcuts are being held. ([#405](https://github.com/Orama-Interactive/Pixelorama/pull/405))

View file

@ -446,6 +446,9 @@ msgstr ""
msgid "Display Scale"
msgstr ""
msgid "Dim interface on dialog popup"
msgstr ""
msgid "Dark"
msgstr ""

View file

@ -48,6 +48,7 @@ var default_clear_color := Color.gray
var pressure_sensitivity_mode = PressureSensitivity.NONE
var open_last_project := false
var shrink := 1.0
var dim_on_popup := true
var smooth_zoom := true
var theme_type : int = ThemeTypes.DARK
var default_image_width := 64
@ -453,7 +454,8 @@ func project_changed(value : int) -> void:
func dialog_open(open : bool) -> void:
if open:
can_draw = false
control.get_node("ModulateTween").interpolate_property(control, "modulate", control.modulate, Color(0.5, 0.5, 0.5), 0.1, Tween.TRANS_LINEAR, Tween.EASE_OUT)
if dim_on_popup:
control.get_node("ModulateTween").interpolate_property(control, "modulate", control.modulate, Color(0.5, 0.5, 0.5), 0.1, Tween.TRANS_LINEAR, Tween.EASE_OUT)
else:
can_draw = true
control.get_node("ModulateTween").interpolate_property(control, "modulate", control.modulate, Color.white, 0.1, Tween.TRANS_LINEAR, Tween.EASE_OUT)

View file

@ -4,6 +4,7 @@ extends AcceptDialog
var preferences = [
["open_last_project", "Startup/StartupContainer/OpenLastProject", "pressed", Global.open_last_project],
["shrink", "Interface/ShrinkContainer/ShrinkHSlider", "value", Global.shrink],
["dim_on_popup", "Interface/DimPopup/CheckBox", "pressed", Global.dim_on_popup],
["smooth_zoom", "Canvas/ZoomOptions/SmoothZoom", "pressed", Global.smooth_zoom],
["pressure_sensitivity_mode", "Startup/PressureSentivity/PressureSensitivityOptionButton", "selected", Global.pressure_sensitivity_mode],
["show_left_tool_icon", "Indicators/IndicatorsContainer/LeftToolIconCheckbox", "pressed", Global.show_left_tool_icon],

View file

@ -115,7 +115,7 @@ text = "System Language"
visible = false
margin_top = 28.0
margin_right = 498.0
margin_bottom = 66.0
margin_bottom = 110.0
[node name="ShrinkContainer" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface"]
margin_right = 498.0
@ -123,21 +123,21 @@ margin_bottom = 20.0
[node name="Label" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface/ShrinkContainer"]
margin_top = 3.0
margin_right = 68.0
margin_right = 84.0
margin_bottom = 17.0
text = "Display Scale"
[node name="ShrinkLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface/ShrinkContainer"]
margin_left = 72.0
margin_left = 88.0
margin_top = 3.0
margin_right = 122.0
margin_right = 138.0
margin_bottom = 17.0
rect_min_size = Vector2( 50, 0 )
text = "1"
align = 2
[node name="ShrinkHSlider" type="HSlider" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface/ShrinkContainer"]
margin_left = 126.0
margin_left = 142.0
margin_right = 446.0
margin_bottom = 16.0
mouse_default_cursor_shape = 2
@ -156,20 +156,40 @@ margin_bottom = 20.0
mouse_default_cursor_shape = 2
text = "Apply"
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface"]
margin_right = 40.0
margin_bottom = 4.0
[node name="Label" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface"]
[node name="DimPopup" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface"]
margin_top = 24.0
margin_right = 498.0
margin_bottom = 38.0
text = "Themes"
margin_bottom = 48.0
[node name="Themes" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface"]
[node name="Label" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface/DimPopup"]
margin_top = 5.0
margin_right = 207.0
margin_bottom = 19.0
text = "Dim interface on dialog popup"
[node name="CheckBox" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface/DimPopup"]
margin_left = 211.0
margin_right = 258.0
margin_bottom = 24.0
mouse_default_cursor_shape = 2
pressed = true
text = "On"
[node name="HSeparator" type="HSeparator" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface"]
margin_top = 52.0
margin_right = 498.0
margin_bottom = 56.0
[node name="Label" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface"]
margin_top = 60.0
margin_right = 498.0
margin_bottom = 74.0
text = "Themes"
[node name="Themes" type="HBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface"]
margin_top = 78.0
margin_right = 498.0
margin_bottom = 82.0
script = ExtResource( 5 )
[node name="ThemeButtons" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Interface/Themes"]