1
0
Fork 0
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:
Emmanouil Papadeas 2025-03-13 17:34:32 +02:00
parent 54cd89c92f
commit f9a8b985dc
4 changed files with 26 additions and 0 deletions

View file

@ -923,6 +923,10 @@ msgstr ""
msgid "Dim interface on dialog popup"
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.
msgid "Use native file dialogs"
msgstr ""

View file

@ -232,6 +232,8 @@ var theme_font_index := 1:
var font_size := 16
## Found in Preferences. If [code]true[/code], the interface dims on popups.
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
## operating system are being used, instead of Godot's FileDialog node.
var use_native_file_dialogs := false:
@ -947,6 +949,8 @@ func _initialize_keychain() -> void:
## Generates an animated notification label showing [param text].
func notification_label(text: String) -> void:
if not show_notification_label:
return
var notif := NotificationLabel.new()
notif.text = tr(text)
notif.position = main_viewport.global_position

View file

@ -14,6 +14,12 @@ var preferences: Array[Preference] = [
Preference.new(
"dim_on_popup", "Interface/InterfaceOptions/DimCheckBox", "button_pressed", true
),
Preference.new(
"show_notification_label",
"Interface/InterfaceOptions/ShowNotificationCheckBox",
"button_pressed",
true
),
Preference.new(
"use_native_file_dialogs",
"Interface/InterfaceOptions/NativeFileDialogs",

View file

@ -228,6 +228,18 @@ mouse_default_cursor_shape = 2
button_pressed = true
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"]]
layout_mode = 2
size_flags_horizontal = 3