mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-03-14 23:35:17 +00:00
Allow users to hide the notification labels from the Preferences
This commit is contained in:
parent
54cd89c92f
commit
f9a8b985dc
4 changed files with 26 additions and 0 deletions
|
@ -923,6 +923,10 @@ msgstr ""
|
||||||
msgid "Dim interface on dialog popup"
|
msgid "Dim interface on dialog popup"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. Found in the preferences, under the interface section. If enabled, the notification labels appear in the canvas when performing an action, such as when undoing/redoing.
|
||||||
|
msgid "Show notification labels"
|
||||||
|
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.
|
#. 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"
|
msgid "Use native file dialogs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -232,6 +232,8 @@ var theme_font_index := 1:
|
||||||
var font_size := 16
|
var font_size := 16
|
||||||
## 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 dim_on_popup := true
|
||||||
|
## Found in Preferences. If [code]true[/code], notification labels appear.
|
||||||
|
var show_notification_label := true
|
||||||
## Found in Preferences. If [code]true[/code], the native file dialogs of the
|
## Found in Preferences. If [code]true[/code], the native file dialogs of the
|
||||||
## operating system are being used, instead of Godot's FileDialog node.
|
## operating system are being used, instead of Godot's FileDialog node.
|
||||||
var use_native_file_dialogs := false:
|
var use_native_file_dialogs := false:
|
||||||
|
@ -947,6 +949,8 @@ func _initialize_keychain() -> void:
|
||||||
|
|
||||||
## Generates an animated notification label showing [param text].
|
## Generates an animated notification label showing [param text].
|
||||||
func notification_label(text: String) -> void:
|
func notification_label(text: String) -> void:
|
||||||
|
if not show_notification_label:
|
||||||
|
return
|
||||||
var notif := NotificationLabel.new()
|
var notif := NotificationLabel.new()
|
||||||
notif.text = tr(text)
|
notif.text = tr(text)
|
||||||
notif.position = main_viewport.global_position
|
notif.position = main_viewport.global_position
|
||||||
|
|
|
@ -14,6 +14,12 @@ var preferences: Array[Preference] = [
|
||||||
Preference.new(
|
Preference.new(
|
||||||
"dim_on_popup", "Interface/InterfaceOptions/DimCheckBox", "button_pressed", true
|
"dim_on_popup", "Interface/InterfaceOptions/DimCheckBox", "button_pressed", true
|
||||||
),
|
),
|
||||||
|
Preference.new(
|
||||||
|
"show_notification_label",
|
||||||
|
"Interface/InterfaceOptions/ShowNotificationCheckBox",
|
||||||
|
"button_pressed",
|
||||||
|
true
|
||||||
|
),
|
||||||
Preference.new(
|
Preference.new(
|
||||||
"use_native_file_dialogs",
|
"use_native_file_dialogs",
|
||||||
"Interface/InterfaceOptions/NativeFileDialogs",
|
"Interface/InterfaceOptions/NativeFileDialogs",
|
||||||
|
|
|
@ -228,6 +228,18 @@ mouse_default_cursor_shape = 2
|
||||||
button_pressed = true
|
button_pressed = true
|
||||||
text = "On"
|
text = "On"
|
||||||
|
|
||||||
|
[node name="ShowNotificationLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Show notification labels"
|
||||||
|
|
||||||
|
[node name="ShowNotificationCheckBox" 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="NativeFileDialogsLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly", "NoSandbox"]]
|
[node name="NativeFileDialogsLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly", "NoSandbox"]]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
|
Loading…
Add table
Reference in a new issue