Clean up example into its own directory #30

Merged
JoelCreatesGames merged 1 commits from master into master 2023-09-25 16:45:21 +02:00
15 changed files with 25 additions and 46 deletions

View File

View File

@ -3,6 +3,8 @@ Godot IRC For Twitch addon
To use this plugin, you need to create a new application on dev.twitch.tv to get a client ID and a client secret. The redirect URL of your App has to be http://localhost:18297.
The example expects an `auth.txt` file in the example folder with 3 lines (client id, client secret, channel to join)
If you require help, feel free to join my >[Discord Server](https://discord.gg/28DQbuwMM2)< and ask your questions <3
- [Examples](https://github.com/MennoMax/gift#Examples)
@ -20,7 +22,7 @@ Below is a working example of this plugin, which is included in this project. A
### Examples
The following code is also [included](https://github.com/MennoMax/gift/blob/master/Gift.gd) in this repository.
The following code is also [included](https://github.com/MennoMax/gift/blob/master/example/Gift.gd) in this repository.
```gdscript
extends Gift

View File

@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/icon.png-b5cf707f4ba91fefa5df60a746e02900.cte
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false

View File

@ -1,7 +1,7 @@
extends VBoxContainer
func put_chat(senderdata : SenderData, msg : String):
var msgnode : Control = preload("res://ChatMessage.tscn").instantiate()
var msgnode : Control = preload("res://example/ChatMessage.tscn").instantiate()
var time = Time.get_time_dict_from_system()
var badges : String = ""
for badge in senderdata.tags["badges"].split(",", false):

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://g4ajgul65cwi"]
[ext_resource type="Script" path="res://ChatMessage.gd" id="1"]
[ext_resource type="Script" path="res://example/ChatMessage.gd" id="1"]
[node name="ChatMessage" type="HBoxContainer"]
size_flags_horizontal = 3

View File

@ -1,11 +1,11 @@
[gd_scene load_steps=5 format=3 uid="uid://bculs28gstcxk"]
[ext_resource type="Script" path="res://Gift.gd" id="1"]
[ext_resource type="Script" path="res://Button.gd" id="3"]
[ext_resource type="Script" path="res://LineEdit.gd" id="3_6ey00"]
[ext_resource type="Script" path="res://ChatContainer.gd" id="5"]
[ext_resource type="Script" path="res://example/Gift.gd" id="1_yfglq"]
[ext_resource type="Script" path="res://example/ChatContainer.gd" id="2_knohk"]
[ext_resource type="Script" path="res://example/LineEdit.gd" id="3_oafvo"]
[ext_resource type="Script" path="res://example/Button.gd" id="4_wrvcq"]
[node name="Node" type="Control"]
[node name="Example" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@ -14,14 +14,15 @@ grow_horizontal = 2
grow_vertical = 2
[node name="Gift" type="Node" parent="."]
script = ExtResource("1")
script = ExtResource("1_yfglq")
scopes = Array[String](["chat:edit", "chat:read", "moderator:read:followers"])
[node name="ChatContainer" type="VBoxContainer" parent="."]
unique_name_in_owner = true
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource("5")
script = ExtResource("2_knohk")
[node name="Chat" type="Panel" parent="ChatContainer"]
show_behind_parent = true
@ -48,10 +49,10 @@ layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
caret_blink = true
script = ExtResource("3_6ey00")
script = ExtResource("3_oafvo")
[node name="Button" type="Button" parent="ChatContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
text = "Send"
script = ExtResource("3")
script = ExtResource("4_wrvcq")

View File

@ -12,7 +12,7 @@ func _ready() -> void:
# <client_id>
# <client_secret>
# <initial channel>
var authfile := FileAccess.open("./auth", FileAccess.READ)
var authfile := FileAccess.open("./example/auth.txt", FileAccess.READ)
client_id = authfile.get_line()
client_secret = authfile.get_line()
var initial_channel = authfile.get_line()

View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

View File

@ -3,22 +3,22 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ck2181giqo3ep"
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
path="res://.godot/imported/icon.png-5ad2e6e2e39e89ee29d5171fb300a340.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
source_file="res://example/icon.png"
dest_files=["res://.godot/imported/icon.png-5ad2e6e2e39e89ee29d5171fb300a340.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false

View File

@ -1,24 +0,0 @@
[preset.0]
name="Linux/X11"
platform="Linux/X11"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="/home/mennomax/Documents/godot/GIFT.x86_64"
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.0.options]
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true
custom_template/release=""
custom_template/debug=""

View File

@ -11,9 +11,9 @@ config_version=5
[application]
config/name="GIFT"
run/main_scene="res://Node.tscn"
config/features=PackedStringArray("4.0")
config/icon="res://icon.png"
run/main_scene="res://example/Example.tscn"
config/features=PackedStringArray("4.1")
config/icon="res://example/icon.png"
[debug]
@ -26,7 +26,7 @@ window/size/width=400
[editor_plugins]
enabled=PackedStringArray("gift")
enabled=PackedStringArray("res://addons/gift/plugin.cfg")
[rendering]