mirror of
https://github.com/litruv/PNGTuber-Plus.git
synced 2026-07-24 02:26:02 +10:00
Re-Enabled streamdeck plugin
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
extends Node2D
|
||||
|
||||
var awaitingCostumeInput = -1
|
||||
## Settings Menu Controller
|
||||
##
|
||||
## Manages the settings UI and user preferences for the PNGTuber application.
|
||||
## Handles various settings including background color, FPS, bounce physics,
|
||||
## costume keys, and StreamDeck integration.
|
||||
|
||||
var awaitingCostumeInput = -1
|
||||
var hasMouse = false
|
||||
|
||||
## Initialize all setting values to match current configuration
|
||||
func setvalues():
|
||||
|
||||
$Background/ColorPickerButton.color = Global.backgroundColor
|
||||
@@ -32,6 +38,8 @@ func setvalues():
|
||||
|
||||
$bounceOnCostume/costumeCheck.button_pressed = Global.main.bounceOnCostumeChange
|
||||
|
||||
$StreamDeck/streamDeckCheck.button_pressed = Saving.settings["useStreamDeck"]
|
||||
|
||||
var costumeLabels = [$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton1/Label,$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton2/Label,$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton3/Label,$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton4/Label,$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton5/Label,$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton6/Label,$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton7/Label,$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton8/Label,$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton9/Label,$CostumeInputs/ScrollContainer/VBoxContainer/costumeButton10/Label,]
|
||||
var tag = 1
|
||||
for label in costumeLabels:
|
||||
@@ -190,6 +198,14 @@ func _on_costume_check_toggled(button_pressed):
|
||||
Global.main.bounceOnCostumeChange = button_pressed
|
||||
Saving.settings["bounceOnCostumeChange"] = button_pressed
|
||||
|
||||
## Handle StreamDeck integration toggle
|
||||
## @param button_pressed: bool - Whether StreamDeck should be enabled
|
||||
func _on_stream_deck_check_toggled(button_pressed):
|
||||
Saving.settings["useStreamDeck"] = button_pressed
|
||||
if ElgatoStreamDeck:
|
||||
ElgatoStreamDeck.refresh_connection()
|
||||
Global.pushUpdate("StreamDeck integration " + ("enabled" if button_pressed else "disabled") + ".")
|
||||
|
||||
|
||||
func _process(delta):
|
||||
var g = to_local(get_global_mouse_position())
|
||||
|
||||
Reference in New Issue
Block a user