diff --git a/Gift.gd b/Gift.gd index 36ab56c..07f9528 100644 --- a/Gift.gd +++ b/Gift.gd @@ -9,7 +9,7 @@ func _ready() -> void: # # var authfile := File.new() - authfile.open("./auth", File.READ) + authfile.open("./secrets/auth", File.READ) var botname := authfile.get_line() var token := authfile.get_line() var initial_channel = authfile.get_line() diff --git a/Node.tscn b/Node.tscn index f7cf884..a821827 100644 --- a/Node.tscn +++ b/Node.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://Gift.gd" type="Script" id=1] [ext_resource path="res://addons/gift/icon.png" type="Texture" id=2] -[ext_resource path="res://Button.gd" type="Script" id=3] [ext_resource path="res://ChatContainer.gd" type="Script" id=5] [ext_resource path="res://Node.gd" type="Script" id=6] @@ -10,9 +9,6 @@ anchor_right = 1.0 anchor_bottom = 1.0 script = ExtResource( 6 ) -__meta__ = { -"_edit_use_anchors_": false -} [node name="Gift" type="Node" parent="."] script = ExtResource( 1 ) @@ -25,14 +21,11 @@ get_images = true anchor_right = 1.0 anchor_bottom = 1.0 script = ExtResource( 5 ) -__meta__ = { -"_edit_use_anchors_": false -} [node name="Chat" type="Panel" parent="ChatContainer"] show_behind_parent = true -margin_right = 400.0 -margin_bottom = 572.0 +margin_right = 1920.0 +margin_bottom = 1080.0 size_flags_horizontal = 3 size_flags_vertical = 3 __meta__ = { @@ -53,38 +46,11 @@ __meta__ = { } [node name="ChatMessagesContainer" type="VBoxContainer" parent="ChatContainer/Chat/ScrollContainer"] -margin_right = 380.0 -margin_bottom = 552.0 +margin_right = 1900.0 +margin_bottom = 1060.0 size_flags_horizontal = 3 size_flags_vertical = 3 custom_constants/separation = 6 __meta__ = { "_edit_use_anchors_": false } - -[node name="HBoxContainer" type="HBoxContainer" parent="ChatContainer"] -margin_top = 576.0 -margin_right = 400.0 -margin_bottom = 600.0 - -[node name="LineEdit" type="LineEdit" parent="ChatContainer/HBoxContainer"] -margin_right = 296.0 -margin_bottom = 24.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -caret_blink = true -caret_blink_speed = 0.5 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Button" type="Button" parent="ChatContainer/HBoxContainer"] -margin_left = 300.0 -margin_right = 400.0 -margin_bottom = 24.0 -rect_min_size = Vector2( 100, 0 ) -text = "Send" -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/addons/gift/icon.png.import b/addons/gift/icon.png.import index d29b8a4..ecd1a3a 100644 --- a/addons/gift/icon.png.import +++ b/addons/gift/icon.png.import @@ -28,7 +28,6 @@ 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 diff --git a/project.godot b/project.godot index b30d032..7971e64 100644 --- a/project.godot +++ b/project.godot @@ -45,7 +45,7 @@ _global_script_class_icons={ [application] config/name="Stream Overlay" -run/main_scene="res://scenes/3DOverlay.tscn" +run/main_scene="res://scenes/2DOverlay.tscn" config/icon="res://icon.png" [display] @@ -57,6 +57,10 @@ window/dpi/allow_hidpi=true window/per_pixel_transparency/allowed=true window/per_pixel_transparency/enabled=true +[editor_plugins] + +enabled=PoolStringArray( "res://addons/gift/plugin.cfg" ) + [gui] common/drop_mouse_on_gui_input_disabled=true diff --git a/scenes/2DOverlay.tscn b/scenes/2DOverlay.tscn index d0396f9..dab4bf6 100644 --- a/scenes/2DOverlay.tscn +++ b/scenes/2DOverlay.tscn @@ -1,8 +1,24 @@ -[gd_scene format=2] +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Node.tscn" type="PackedScene" id=1] +[ext_resource path="res://addons/gift/gift_node.gd" type="Script" id=2] [node name="Overlay" type="Node2D"] +script = ExtResource( 2 ) [node name="Bluescreen" type="ColorRect" parent="."] margin_right = 1920.0 margin_bottom = 1080.0 color = Color( 0, 0, 1, 1 ) + +[node name="Node" parent="." instance=ExtResource( 1 )] +margin_left = 1284.0 +margin_right = 1601.0 +margin_bottom = 259.0 +rect_scale = Vector2( 2, 2 ) + +[node name="Screen" type="ColorRect" parent="."] +margin_right = 1280.0 +margin_bottom = 720.0 +rect_min_size = Vector2( 720, 0 ) +color = Color( 1, 0, 0, 1 ) diff --git a/scenes/ChatContainer.tscn b/scenes/ChatContainer.tscn new file mode 100644 index 0000000..6fa92cc --- /dev/null +++ b/scenes/ChatContainer.tscn @@ -0,0 +1,69 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://ChatContainer.gd" type="Script" id=1] +[ext_resource path="res://Button.gd" type="Script" id=2] + +[node name="ChatContainer" type="VBoxContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 1 ) + +[node name="Chat" type="Panel" parent="."] +show_behind_parent = true +margin_right = 1920.0 +margin_bottom = 1052.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ScrollContainer" type="ScrollContainer" parent="Chat"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 10.0 +margin_top = 10.0 +margin_right = -10.0 +margin_bottom = -10.0 +follow_focus = true +scroll_horizontal_enabled = false +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ChatMessagesContainer" type="VBoxContainer" parent="Chat/ScrollContainer"] +margin_right = 1900.0 +margin_bottom = 1032.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_constants/separation = 6 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +margin_top = 1056.0 +margin_right = 1920.0 +margin_bottom = 1080.0 + +[node name="LineEdit" type="LineEdit" parent="HBoxContainer"] +margin_right = 1816.0 +margin_bottom = 24.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +caret_blink = true +caret_blink_speed = 0.5 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Button" type="Button" parent="HBoxContainer"] +margin_left = 1820.0 +margin_right = 1920.0 +margin_bottom = 24.0 +rect_min_size = Vector2( 100, 0 ) +text = "Send" +script = ExtResource( 2 ) +__meta__ = { +"_edit_use_anchors_": false +}