fixed badge cache, added missing file
This commit is contained in:
parent
a3740fab4d
commit
b107c4901a
@ -1,5 +1,5 @@
|
||||
extends Button
|
||||
|
||||
func _pressed():
|
||||
$"../Gift".chat($"../LineEdit".text)
|
||||
$"../LineEdit".text = ""
|
||||
$"../../../Gift".chat($"../LineEdit".text)
|
||||
$"../LineEdit".text = ""
|
||||
|
2
LICENSE
Normal file → Executable file
2
LICENSE
Normal file → Executable file
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Max Kross
|
||||
Copyright (c) 2019-2021 Max Kross
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
85
Node.tscn
85
Node.tscn
@ -1,27 +1,90 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=6 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]
|
||||
|
||||
[node name="Node" type="Control"]
|
||||
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 )
|
||||
__meta__ = {
|
||||
"_editor_icon": ExtResource( 2 )
|
||||
}
|
||||
get_images = true
|
||||
|
||||
[node name="LineEdit" type="LineEdit" parent="."]
|
||||
margin_left = 403.0
|
||||
margin_top = 278.0
|
||||
margin_right = 531.0
|
||||
margin_bottom = 302.0
|
||||
[node name="ChatContainer" type="VBoxContainer" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource( 5 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
margin_left = 539.0
|
||||
margin_top = 278.0
|
||||
margin_right = 586.0
|
||||
margin_bottom = 302.0
|
||||
[node name="Chat" type="Panel" parent="ChatContainer"]
|
||||
show_behind_parent = true
|
||||
margin_right = 400.0
|
||||
margin_bottom = 572.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="ChatContainer/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="ChatContainer/Chat/ScrollContainer"]
|
||||
margin_right = 380.0
|
||||
margin_bottom = 552.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
|
||||
}
|
||||
|
@ -112,8 +112,6 @@ func get_badge(badge_name : String, channel_id : String = "_global", scale : Str
|
||||
return get_badge(badge_name, "_global", scale)
|
||||
texture.take_over_path(filename)
|
||||
caches[RequestType.BADGE][channel_id][cachename] = texture
|
||||
elif channel_id != "_global":
|
||||
return get_badge(badge_name, "_global", scale)
|
||||
return caches[RequestType.BADGE][channel_id][cachename]
|
||||
|
||||
func get_emote(emote_id : String, scale = "1.0") -> ImageTexture:
|
||||
|
@ -24,6 +24,11 @@ _global_script_classes=[ {
|
||||
"language": "GDScript",
|
||||
"path": "res://addons/gift/gift_node.gd"
|
||||
}, {
|
||||
"base": "Resource",
|
||||
"class": "ImageCache",
|
||||
"language": "GDScript",
|
||||
"path": "res://addons/gift/util/image_cache.gd"
|
||||
}, {
|
||||
"base": "Reference",
|
||||
"class": "SenderData",
|
||||
"language": "GDScript",
|
||||
@ -33,6 +38,7 @@ _global_script_class_icons={
|
||||
"CommandData": "",
|
||||
"CommandInfo": "",
|
||||
"Gift": "",
|
||||
"ImageCache": "",
|
||||
"SenderData": ""
|
||||
}
|
||||
|
||||
@ -47,6 +53,10 @@ config/icon="res://icon.png"
|
||||
gdscript/warnings/unused_argument=false
|
||||
gdscript/warnings/return_value_discarded=false
|
||||
|
||||
[display]
|
||||
|
||||
window/size/width=400
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
enabled=PoolStringArray( "gift" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user