diff --git a/addons/obs_websocket_gd/obs_ui.gd b/addons/obs_websocket_gd/obs_ui.gd index fc89d84..490378c 100644 --- a/addons/obs_websocket_gd/obs_ui.gd +++ b/addons/obs_websocket_gd/obs_ui.gd @@ -12,15 +12,28 @@ const STOP_RECORDING: String = "Stop Recording" var obs_websocket +var scene_data: Dictionary = {} # String: ObsScene + var current_scene: String = "changeme" -onready var scenes: VBoxContainer = $VBoxContainer/HBoxContainer/Scenes -onready var sources: VBoxContainer = $VBoxContainer/HBoxContainer/Sources +enum ButtonType { NONE = 0, SCENE, SOURCE } + +onready var source_items: HBoxContainer = $VBoxContainer/SourceItems +onready var render: CheckButton = $VBoxContainer/SourceItems/Render + +onready var scenes: VBoxContainer = $VBoxContainer/HBoxContainer/Scenes/ScenesScroll/VBoxContainer +var scene_button_group := ButtonGroup.new() + +onready var sources: VBoxContainer = $VBoxContainer/HBoxContainer/Sources/SourcesScroll/VBoxContainer +var source_button_group := ButtonGroup.new() onready var connect_button: Button = $VBoxContainer/HBoxContainer/Websocket/Connect var is_connection_established := false onready var host_value: LineEdit = $VBoxContainer/HBoxContainer/Websocket/Host/Value onready var port_value: LineEdit = $VBoxContainer/HBoxContainer/Websocket/Port/Value +onready var password_value: LineEdit = $VBoxContainer/HBoxContainer/Websocket/Password/Value + +onready var refresh_data: Button = $VBoxContainer/HBoxContainer/Websocket/RefreshData onready var stream: Button = $VBoxContainer/HBoxContainer/Controls/Stream var is_streaming := false @@ -41,9 +54,14 @@ func _ready(): # Setup connection values from script host_value.text = obs_websocket.host port_value.text = obs_websocket.port + password_value.text = obs_websocket.password + + render.connect("toggled", self, "_on_source_item_toggled", [render.text]) connect_button.connect("pressed", self, "_on_connect_pressed") + refresh_data.connect("pressed", self, "_on_refresh_data_pressed") + stream.text = START_STREAMING stream.connect("pressed", self, "_on_stream_pressed") @@ -63,6 +81,7 @@ func _on_connect_pressed() -> void: obs_websocket.host = host_value.text obs_websocket.port = port_value.text + obs_websocket.password = password_value.text match is_connection_established: true: @@ -103,22 +122,79 @@ func _on_obs_updated(obs_data: Dictionary) -> void: func _on_obs_connected() -> void: obs_websocket.get_scene_list() +func _on_refresh_data_pressed() -> void: + if obs_websocket.obs_client.get_connection_status() != WebSocketClient.CONNECTION_CONNECTED: + return + obs_websocket.get_scene_list() + func _on_obs_scene_list_returned(data) -> void: - print("asdf") current_scene = data.current_scene + scene_data.clear() + for child in scenes.get_children(): child.queue_free() + for child in sources.get_children(): + child.queue_free() + + # We clear everything, so no source item will be selected + source_items.visible = false + for i in data.scenes: - var button := Button.new() - button.text = i.obs_name - scenes.call_deferred("add_child", button) + var scene_button := CheckButton.new() + scene_button.text = i.obs_name + if scene_button.text == current_scene: + scene_button.set_pressed_no_signal(true) + scene_button.group = scene_button_group + scene_button.connect("toggled", self, "_on_button_toggled_with_name", [scene_button.text, ButtonType.SCENE]) + scenes.call_deferred("add_child", scene_button) + + if i.obs_name == current_scene: + for j in i.sources: + _create_source_button(j.obs_name) + + scene_data[i.obs_name] = i + +func _on_source_item_toggled(button_pressed: bool, button_name: String) -> void: + match button_name: + "Render": + obs_websocket.send_command("SetSceneItemRender", { + "source": source_button_group.get_pressed_button().text, + "render": button_pressed + }) + _: + print("Unhandled source item toggled") + +func _on_button_toggled_with_name(button_pressed: bool, button_name: String, button_type: int) -> void: + # Buttons cannot be unpressed with a button group I guess, so just match positives + match button_type: + ButtonType.SCENE: + source_items.visible = false + obs_websocket.send_command("SetCurrentScene", {"scene-name": button_name}) + for child in sources.get_children(): + child.free() + for i in scene_data[button_name].sources: + _create_source_button(i.obs_name) + ButtonType.SOURCE: + source_items.visible = true + # I like to live dangerously + # If you remove items in OBS without refreshing data, you might null pointer? + for i in scene_data[scene_button_group.get_pressed_button().text].sources: + if i.obs_name == button_name: + render.set_pressed_no_signal(i.render) ############################################################################### # Private functions # ############################################################################### +func _create_source_button(button_name: String) -> void: + var source_button := CheckButton.new() + source_button.text = button_name + source_button.group = source_button_group + source_button.connect("toggled", self, "_on_button_toggled_with_name", [source_button.text, ButtonType.SOURCE]) + sources.call_deferred("add_child", source_button) + ############################################################################### # Public functions # ############################################################################### diff --git a/addons/obs_websocket_gd/obs_ui.tscn b/addons/obs_websocket_gd/obs_ui.tscn index 1513c3b..70479a0 100644 --- a/addons/obs_websocket_gd/obs_ui.tscn +++ b/addons/obs_websocket_gd/obs_ui.tscn @@ -18,19 +18,28 @@ margin_right = 1017.0 margin_bottom = 593.0 [node name="SourceItems" type="HBoxContainer" parent="VBoxContainer"] +visible = false margin_right = 1010.0 -margin_bottom = 82.0 +margin_bottom = 40.0 size_flags_horizontal = 3 -size_flags_vertical = 3 + +[node name="Render" type="CheckButton" parent="VBoxContainer/SourceItems"] +margin_right = 125.0 +margin_bottom = 40.0 +text = "Render" + +[node name="VSeparator" type="VSeparator" parent="VBoxContainer/SourceItems"] +margin_left = 129.0 +margin_right = 133.0 +margin_bottom = 40.0 [node name="HSeparator" type="HSeparator" parent="VBoxContainer"] -margin_top = 86.0 margin_right = 1010.0 -margin_bottom = 90.0 +margin_bottom = 4.0 mouse_filter = 2 [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] -margin_top = 94.0 +margin_top = 8.0 margin_right = 1010.0 margin_bottom = 586.0 size_flags_horizontal = 3 @@ -38,80 +47,175 @@ size_flags_vertical = 3 size_flags_stretch_ratio = 6.0 [node name="Scenes" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] -margin_right = 249.0 -margin_bottom = 492.0 +margin_right = 243.0 +margin_bottom = 578.0 size_flags_horizontal = 3 size_flags_vertical = 3 +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/Scenes"] +margin_right = 243.0 +margin_bottom = 14.0 +text = "Scenes" +align = 1 + +[node name="ScenesScroll" type="ScrollContainer" parent="VBoxContainer/HBoxContainer/Scenes"] +margin_top = 18.0 +margin_right = 243.0 +margin_bottom = 578.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer/Scenes/ScenesScroll"] +margin_right = 243.0 +margin_bottom = 560.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VSeparator" type="VSeparator" parent="VBoxContainer/HBoxContainer"] +margin_left = 247.0 +margin_right = 251.0 +margin_bottom = 578.0 + [node name="Sources" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] -margin_left = 253.0 -margin_right = 503.0 -margin_bottom = 492.0 +margin_left = 255.0 +margin_right = 499.0 +margin_bottom = 578.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/Sources"] +margin_right = 244.0 +margin_bottom = 14.0 +text = "Sources" +align = 1 + +[node name="SourcesScroll" type="ScrollContainer" parent="VBoxContainer/HBoxContainer/Sources"] +margin_top = 18.0 +margin_right = 244.0 +margin_bottom = 578.0 size_flags_horizontal = 3 size_flags_vertical = 3 +[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/HBoxContainer/Sources/SourcesScroll"] +margin_right = 244.0 +margin_bottom = 560.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VSeparator2" type="VSeparator" parent="VBoxContainer/HBoxContainer"] +margin_left = 503.0 +margin_right = 507.0 +margin_bottom = 578.0 + [node name="Controls" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] -margin_left = 507.0 -margin_right = 756.0 -margin_bottom = 492.0 +margin_left = 511.0 +margin_right = 754.0 +margin_bottom = 578.0 size_flags_horizontal = 3 size_flags_vertical = 3 +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/Controls"] +margin_right = 243.0 +margin_bottom = 14.0 +text = "Controls" +align = 1 + [node name="Stream" type="Button" parent="VBoxContainer/HBoxContainer/Controls"] -margin_right = 249.0 -margin_bottom = 20.0 +margin_top = 18.0 +margin_right = 243.0 +margin_bottom = 38.0 text = "Start Streaming" [node name="Record" type="Button" parent="VBoxContainer/HBoxContainer/Controls"] -margin_top = 24.0 -margin_right = 249.0 -margin_bottom = 44.0 +margin_top = 42.0 +margin_right = 243.0 +margin_bottom = 62.0 text = "Start Recording" +[node name="VSeparator3" type="VSeparator" parent="VBoxContainer/HBoxContainer"] +margin_left = 758.0 +margin_right = 762.0 +margin_bottom = 578.0 + [node name="Websocket" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] -margin_left = 760.0 +margin_left = 766.0 margin_right = 1010.0 -margin_bottom = 492.0 +margin_bottom = 578.0 size_flags_horizontal = 3 size_flags_vertical = 3 +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/Websocket"] +margin_right = 244.0 +margin_bottom = 14.0 +text = "OBS Websocket" +align = 1 + [node name="Host" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/Websocket"] -margin_right = 250.0 -margin_bottom = 24.0 +margin_top = 18.0 +margin_right = 244.0 +margin_bottom = 42.0 [node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/Websocket/Host"] margin_top = 5.0 -margin_right = 123.0 +margin_right = 120.0 margin_bottom = 19.0 size_flags_horizontal = 3 text = "Host:" [node name="Value" type="LineEdit" parent="VBoxContainer/HBoxContainer/Websocket/Host"] -margin_left = 127.0 -margin_right = 250.0 +margin_left = 124.0 +margin_right = 244.0 margin_bottom = 24.0 size_flags_horizontal = 3 +text = "127.0.0.1" [node name="Port" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/Websocket"] -margin_top = 28.0 -margin_right = 250.0 -margin_bottom = 52.0 +margin_top = 46.0 +margin_right = 244.0 +margin_bottom = 70.0 [node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/Websocket/Port"] margin_top = 5.0 -margin_right = 123.0 +margin_right = 120.0 margin_bottom = 19.0 size_flags_horizontal = 3 text = "Port:" [node name="Value" type="LineEdit" parent="VBoxContainer/HBoxContainer/Websocket/Port"] -margin_left = 127.0 -margin_right = 250.0 +margin_left = 124.0 +margin_right = 244.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +text = "4444" + +[node name="Password" type="HBoxContainer" parent="VBoxContainer/HBoxContainer/Websocket"] +margin_top = 74.0 +margin_right = 244.0 +margin_bottom = 98.0 + +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer/Websocket/Password"] +margin_top = 5.0 +margin_right = 120.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Port:" + +[node name="Value" type="LineEdit" parent="VBoxContainer/HBoxContainer/Websocket/Password"] +margin_left = 124.0 +margin_right = 244.0 margin_bottom = 24.0 size_flags_horizontal = 3 +text = "password" +secret = true [node name="Connect" type="Button" parent="VBoxContainer/HBoxContainer/Websocket"] -margin_top = 56.0 -margin_right = 250.0 -margin_bottom = 76.0 +margin_top = 102.0 +margin_right = 244.0 +margin_bottom = 122.0 text = "Connect" + +[node name="RefreshData" type="Button" parent="VBoxContainer/HBoxContainer/Websocket"] +margin_top = 126.0 +margin_right = 244.0 +margin_bottom = 146.0 +text = "Refresh Data" diff --git a/addons/obs_websocket_gd/obs_websocket.gd b/addons/obs_websocket_gd/obs_websocket.gd index 5faa9d7..9769c27 100644 --- a/addons/obs_websocket_gd/obs_websocket.gd +++ b/addons/obs_websocket_gd/obs_websocket.gd @@ -7,13 +7,28 @@ signal obs_scene_list_returned(data) class ObsObject: var obs_name: String = "changeme" + + func _to_string() -> String: + return obs_name class ObsGetSceneListResponse: var current_scene: String var scenes: Array = [] # ObsScene + + func _to_string() -> String: + return str({ + "current_scene": current_scene, + "scenes": scenes + }) class ObsScene extends ObsObject: var sources: Array = [] # ObsSceneItem + + func _to_string() -> String: + return str({ + "obs_name": obs_name, + "sources": sources + }) class ObsSceneItem extends ObsObject: var cy: float @@ -25,7 +40,7 @@ class ObsSceneItem extends ObsObject: var locked: bool var source_cx: float var source_cy: float - var obs_type: ObsSourceType + var obs_type: String var volume: float var x: float var y: float @@ -44,7 +59,7 @@ class ObsSceneItem extends ObsObject: p_locked: bool, p_source_cx: float, p_source_cy: float, - p_obs_type: ObsSourceType, + p_obs_type: String, p_volume: float, p_x: float, p_y: float, @@ -67,18 +82,24 @@ class ObsSceneItem extends ObsObject: y = p_y # parent_group_name = p_parent_group_name # group_children = p_group_children - -class ObsSourceType: - const INPUT = "input" - const FILTER = "filter" - const TRANSTIION = "transition" - const SCENE = "scene" - const UNKNOWN = "unknown" - - var current_type: String = UNKNOWN - func _init(p_type: String): - current_type = p_type + func _to_string() -> String: + return str({ + "cy": cy, + "cx": cx, + "alignment": alignment, + "obs_name": obs_name, + "id": id, + "render": render, + "muted": muted, + "locked": locked, + "source_cx": source_cx, + "source_cy": source_cy, + "obs_type": obs_type, + "volume": volume, + "x": x, + "y": y + }) const URL_PATH: String = "ws://%s:%s" @@ -91,6 +112,7 @@ var request_counter: int = -1 export var host: String = "127.0.0.1" export var port: String = "4444" +export var password: String = "password" # It's plaintext lmao, you should be changing this programmatically const PreconfiguredCommands = { "GET_SCENE_LIST": "GetSceneList" @@ -146,7 +168,7 @@ func _on_data_received() -> void: return if json_response.has("authRequired"): - var secret_combined: String = "%s%s" % ["password", json_response["salt"]] + var secret_combined: String = "%s%s" % [password, json_response["salt"]] var secret_base64 = Marshalls.raw_to_base64(secret_combined.sha256_buffer()) var auth_combined: String = "%s%s" % [secret_base64, json_response["challenge"]] var auth_base64: String = Marshalls.raw_to_base64(auth_combined.sha256_buffer()) @@ -167,6 +189,7 @@ func _on_data_received() -> void: for i in json_response["scenes"]: var obs_scene := ObsScene.new() + obs_scene.obs_name = i["name"] for j in i["sources"]: var obs_scene_item := ObsSceneItem.new( j["cy"], @@ -187,6 +210,7 @@ func _on_data_received() -> void: obs_scene.sources.append(obs_scene_item) data.scenes.append(obs_scene) emit_signal("obs_scene_list_returned", data) + waiting_for_response = false return emit_signal("obs_updated", json_response) diff --git a/examples/demo.tscn b/examples/demo.tscn index 4514dd9..1cec15f 100644 --- a/examples/demo.tscn +++ b/examples/demo.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://addons/obs_websocket_gd/obs_websocket.tscn" type="PackedScene" id=1] +[ext_resource path="res://addons/obs_websocket_gd/obs_ui.gd" type="Script" id=1] [node name="Demo" type="CanvasLayer"] @@ -12,4 +12,220 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="ObsWebsocket" parent="." instance=ExtResource( 1 )] +[node name="ObsUi" type="PanelContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +mouse_filter = 2 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="ObsUi"] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 1017.0 +margin_bottom = 593.0 + +[node name="SourceItems" type="HBoxContainer" parent="ObsUi/VBoxContainer"] +visible = false +margin_right = 1010.0 +margin_bottom = 40.0 +size_flags_horizontal = 3 + +[node name="Render" type="CheckButton" parent="ObsUi/VBoxContainer/SourceItems"] +margin_right = 125.0 +margin_bottom = 40.0 +text = "Render" + +[node name="VSeparator" type="VSeparator" parent="ObsUi/VBoxContainer/SourceItems"] +margin_left = 129.0 +margin_right = 133.0 +margin_bottom = 40.0 + +[node name="HSeparator" type="HSeparator" parent="ObsUi/VBoxContainer"] +margin_right = 1010.0 +margin_bottom = 4.0 +mouse_filter = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ObsUi/VBoxContainer"] +margin_top = 8.0 +margin_right = 1010.0 +margin_bottom = 586.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +size_flags_stretch_ratio = 6.0 + +[node name="Scenes" type="VBoxContainer" parent="ObsUi/VBoxContainer/HBoxContainer"] +margin_right = 243.0 +margin_bottom = 578.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="ObsUi/VBoxContainer/HBoxContainer/Scenes"] +margin_right = 243.0 +margin_bottom = 14.0 +text = "Scenes" +align = 1 + +[node name="ScenesScroll" type="ScrollContainer" parent="ObsUi/VBoxContainer/HBoxContainer/Scenes"] +margin_top = 18.0 +margin_right = 243.0 +margin_bottom = 578.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VBoxContainer" type="VBoxContainer" parent="ObsUi/VBoxContainer/HBoxContainer/Scenes/ScenesScroll"] +margin_right = 243.0 +margin_bottom = 560.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VSeparator" type="VSeparator" parent="ObsUi/VBoxContainer/HBoxContainer"] +margin_left = 247.0 +margin_right = 251.0 +margin_bottom = 578.0 + +[node name="Sources" type="VBoxContainer" parent="ObsUi/VBoxContainer/HBoxContainer"] +margin_left = 255.0 +margin_right = 499.0 +margin_bottom = 578.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="ObsUi/VBoxContainer/HBoxContainer/Sources"] +margin_right = 244.0 +margin_bottom = 14.0 +text = "Sources" +align = 1 + +[node name="SourcesScroll" type="ScrollContainer" parent="ObsUi/VBoxContainer/HBoxContainer/Sources"] +margin_top = 18.0 +margin_right = 244.0 +margin_bottom = 578.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VBoxContainer" type="VBoxContainer" parent="ObsUi/VBoxContainer/HBoxContainer/Sources/SourcesScroll"] +margin_right = 244.0 +margin_bottom = 560.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="VSeparator2" type="VSeparator" parent="ObsUi/VBoxContainer/HBoxContainer"] +margin_left = 503.0 +margin_right = 507.0 +margin_bottom = 578.0 + +[node name="Controls" type="VBoxContainer" parent="ObsUi/VBoxContainer/HBoxContainer"] +margin_left = 511.0 +margin_right = 754.0 +margin_bottom = 578.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="ObsUi/VBoxContainer/HBoxContainer/Controls"] +margin_right = 243.0 +margin_bottom = 14.0 +text = "Controls" +align = 1 + +[node name="Stream" type="Button" parent="ObsUi/VBoxContainer/HBoxContainer/Controls"] +margin_top = 18.0 +margin_right = 243.0 +margin_bottom = 38.0 +text = "Start Streaming" + +[node name="Record" type="Button" parent="ObsUi/VBoxContainer/HBoxContainer/Controls"] +margin_top = 42.0 +margin_right = 243.0 +margin_bottom = 62.0 +text = "Start Recording" + +[node name="VSeparator3" type="VSeparator" parent="ObsUi/VBoxContainer/HBoxContainer"] +margin_left = 758.0 +margin_right = 762.0 +margin_bottom = 578.0 + +[node name="Websocket" type="VBoxContainer" parent="ObsUi/VBoxContainer/HBoxContainer"] +margin_left = 766.0 +margin_right = 1010.0 +margin_bottom = 578.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="Label" type="Label" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket"] +margin_right = 244.0 +margin_bottom = 14.0 +text = "OBS Websocket" +align = 1 + +[node name="Host" type="HBoxContainer" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket"] +margin_top = 18.0 +margin_right = 244.0 +margin_bottom = 42.0 + +[node name="Label" type="Label" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket/Host"] +margin_top = 5.0 +margin_right = 120.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Host:" + +[node name="Value" type="LineEdit" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket/Host"] +margin_left = 124.0 +margin_right = 244.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +text = "127.0.0.1" + +[node name="Port" type="HBoxContainer" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket"] +margin_top = 46.0 +margin_right = 244.0 +margin_bottom = 70.0 + +[node name="Label" type="Label" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket/Port"] +margin_top = 5.0 +margin_right = 120.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Port:" + +[node name="Value" type="LineEdit" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket/Port"] +margin_left = 124.0 +margin_right = 244.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +text = "4444" + +[node name="Password" type="HBoxContainer" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket"] +margin_top = 74.0 +margin_right = 244.0 +margin_bottom = 98.0 + +[node name="Label" type="Label" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket/Password"] +margin_top = 5.0 +margin_right = 120.0 +margin_bottom = 19.0 +size_flags_horizontal = 3 +text = "Port:" + +[node name="Value" type="LineEdit" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket/Password"] +margin_left = 124.0 +margin_right = 244.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +text = "password" +secret = true + +[node name="Connect" type="Button" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket"] +margin_top = 102.0 +margin_right = 244.0 +margin_bottom = 122.0 +text = "Connect" + +[node name="RefreshData" type="Button" parent="ObsUi/VBoxContainer/HBoxContainer/Websocket"] +margin_top = 126.0 +margin_right = 244.0 +margin_bottom = 146.0 +text = "Refresh Data" diff --git a/obs_godot_icon.png b/obs_godot_icon.png new file mode 100644 index 0000000..825b8a8 Binary files /dev/null and b/obs_godot_icon.png differ diff --git a/obs_godot_icon.png.import b/obs_godot_icon.png.import new file mode 100644 index 0000000..d6787b0 --- /dev/null +++ b/obs_godot_icon.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/obs_godot_icon.png-7cc8dea5e5c65e9732918fc9f2defcba.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://obs_godot_icon.png" +dest_files=[ "res://.import/obs_godot_icon.png-7cc8dea5e5c65e9732918fc9f2defcba.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/project.godot b/project.godot index b1e93a5..cfadb24 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=4 config/name="OBS Websocket GD" run/main_scene="res://examples/demo.tscn" -config/icon="res://icon.png" +config/icon="res://obs_godot_icon.png" [physics]