Add addons

This commit is contained in:
Joey Yakimowich-Payne 2023-01-03 16:53:53 -07:00
commit 3367bad24f
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
527 changed files with 36197 additions and 0 deletions

View file

@ -0,0 +1,29 @@
@tool
extends Control
var property_name : String
var placeholder :String= "":
set(value):
placeholder = value
$TextEdit.placeholder_text = placeholder
signal value_changed
func _ready():
$TextEdit.text_changed.connect(text_changed)
$TextEdit.add_theme_stylebox_override('normal', get_theme_stylebox('normal', 'LineEdit'))
$TextEdit.add_theme_stylebox_override('focus', get_theme_stylebox('focus', 'LineEdit'))
func text_changed(value = ""):
emit_signal("value_changed", property_name, $TextEdit.text)
func set_left_text(value):
$LeftText.text = str(value)
$LeftText.visible = !value.is_empty()
func set_right_text(value):
$RightText.text = str(value)
$RightText.visible = !value.is_empty()
func set_value(value):
$TextEdit.text = str(value)