mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Hide some preferences in non-desktop versions
Properties such as FFMPEG, native file dialog & single window don't make sense to exist in Web & potentially mobile platforms.
This commit is contained in:
parent
a3a77d5b93
commit
489344866b
|
@ -188,7 +188,7 @@ var preferences: Array[Preference] = [
|
||||||
Preference.new("tablet_driver", "Drivers/DriversContainer/TabletDriver", "selected", 0, true)
|
Preference.new("tablet_driver", "Drivers/DriversContainer/TabletDriver", "selected", 0, true)
|
||||||
]
|
]
|
||||||
|
|
||||||
var content_list := []
|
var content_list := PackedStringArray([])
|
||||||
var selected_item := 0
|
var selected_item := 0
|
||||||
|
|
||||||
@onready var list: ItemList = $HSplitContainer/List
|
@onready var list: ItemList = $HSplitContainer/List
|
||||||
|
@ -242,12 +242,10 @@ func _ready() -> void:
|
||||||
continue
|
continue
|
||||||
child.confirmed.connect(Tools.update_hint_tooltips)
|
child.confirmed.connect(Tools.update_hint_tooltips)
|
||||||
|
|
||||||
for child in right_side.get_children():
|
|
||||||
content_list.append(child.name)
|
|
||||||
|
|
||||||
if OS.get_name() == "Web":
|
if OS.get_name() == "Web":
|
||||||
content_list.erase("Startup")
|
var startup := right_side.get_node("Startup")
|
||||||
right_side.get_node("Startup").queue_free()
|
right_side.remove_child(startup)
|
||||||
|
startup.queue_free()
|
||||||
right_side.get_node("Language").visible = true
|
right_side.get_node("Language").visible = true
|
||||||
Global.open_last_project = false
|
Global.open_last_project = false
|
||||||
elif OS.get_name() == "Windows":
|
elif OS.get_name() == "Windows":
|
||||||
|
@ -256,6 +254,11 @@ func _ready() -> void:
|
||||||
for driver in DisplayServer.tablet_get_driver_count():
|
for driver in DisplayServer.tablet_get_driver_count():
|
||||||
var driver_name := DisplayServer.tablet_get_driver_name(driver)
|
var driver_name := DisplayServer.tablet_get_driver_name(driver)
|
||||||
tablet_driver.add_item(driver_name, driver)
|
tablet_driver.add_item(driver_name, driver)
|
||||||
|
if not OS.has_feature("pc"):
|
||||||
|
get_tree().call_group(&"DesktopOnly", &"queue_free")
|
||||||
|
|
||||||
|
for child in right_side.get_children():
|
||||||
|
content_list.append(child.name)
|
||||||
|
|
||||||
# Create buttons for each language
|
# Create buttons for each language
|
||||||
var system_language := language.get_node(^"System Language") as Button
|
var system_language := language.get_node(^"System Language") as Button
|
||||||
|
@ -273,6 +276,8 @@ func _ready() -> void:
|
||||||
button.pressed.connect(_on_language_pressed.bind(button.get_index()))
|
button.pressed.connect(_on_language_pressed.bind(button.get_index()))
|
||||||
|
|
||||||
for pref in preferences:
|
for pref in preferences:
|
||||||
|
if not right_side.has_node(pref.node_path):
|
||||||
|
continue
|
||||||
var node := right_side.get_node(pref.node_path)
|
var node := right_side.get_node(pref.node_path)
|
||||||
var restore_default_button := RestoreDefaultButton.new()
|
var restore_default_button := RestoreDefaultButton.new()
|
||||||
restore_default_button.setting_name = pref.prop_name
|
restore_default_button.setting_name = pref.prop_name
|
||||||
|
|
|
@ -91,11 +91,11 @@ layout_mode = 2
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
text = "On"
|
text = "On"
|
||||||
|
|
||||||
[node name="FFMPEGPathLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Startup/StartupContainer"]
|
[node name="FFMPEGPathLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Startup/StartupContainer" groups=["DesktopOnly"]]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "FFMPEG path"
|
text = "FFMPEG path"
|
||||||
|
|
||||||
[node name="FFMPEGPath" type="LineEdit" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Startup/StartupContainer"]
|
[node name="FFMPEGPath" type="LineEdit" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Startup/StartupContainer" groups=["DesktopOnly"]]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Language" type="VBoxContainer" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide"]
|
[node name="Language" type="VBoxContainer" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide"]
|
||||||
|
@ -219,12 +219,12 @@ mouse_default_cursor_shape = 2
|
||||||
button_pressed = true
|
button_pressed = true
|
||||||
text = "On"
|
text = "On"
|
||||||
|
|
||||||
[node name="NativeFileDialogsLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
|
[node name="NativeFileDialogsLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly"]]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
text = "Use native file dialogs"
|
text = "Use native file dialogs"
|
||||||
|
|
||||||
[node name="NativeFileDialogs" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
|
[node name="NativeFileDialogs" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly"]]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
tooltip_text = "When this setting is enabled, the native file dialogs of the operating system are being used, instead of Pixelorama's custom ones."
|
tooltip_text = "When this setting is enabled, the native file dialogs of the operating system are being used, instead of Pixelorama's custom ones."
|
||||||
|
@ -232,12 +232,12 @@ mouse_default_cursor_shape = 2
|
||||||
button_pressed = true
|
button_pressed = true
|
||||||
text = "On"
|
text = "On"
|
||||||
|
|
||||||
[node name="SingleWindowModeLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
|
[node name="SingleWindowModeLabel" type="Label" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly"]]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
text = "Single window mode"
|
text = "Single window mode"
|
||||||
|
|
||||||
[node name="SingleWindowMode" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions"]
|
[node name="SingleWindowMode" type="CheckBox" parent="HSplitContainer/VBoxContainer/ScrollContainer/RightSide/Interface/InterfaceOptions" groups=["DesktopOnly"]]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
tooltip_text = "When this setting is enabled, Pixelorama's subwindows will be embedded in the main window, otherwise each dialog will be its own separate window."
|
tooltip_text = "When this setting is enabled, Pixelorama's subwindows will be embedded in the main window, otherwise each dialog will be its own separate window."
|
||||||
|
|
Loading…
Reference in a new issue