aboutsummaryrefslogtreecommitdiff
path: root/option_set/option_set.gd
diff options
context:
space:
mode:
Diffstat (limited to 'option_set/option_set.gd')
-rw-r--r--option_set/option_set.gd6
1 files changed, 4 insertions, 2 deletions
diff --git a/option_set/option_set.gd b/option_set/option_set.gd
index 040566a..2ac1475 100644
--- a/option_set/option_set.gd
+++ b/option_set/option_set.gd
@@ -1,6 +1,8 @@
extends Control
class_name OptionSet
+export var placeholder: String
+
var text: String setget set_text, get_text
func set_text(var value: String):
@@ -19,7 +21,7 @@ onready var options := get_node("/root/main/option_set_list") as OptionSetList
func _ready():
assert(popup != null, "OptionSet failed to get 'popup' node.")
-
+ input.placeholder_text = placeholder
input.connect("focus_entered", input, "set", ["caret_position", input.max_length])
input.connect("focus_exited", input, "deselect")
@@ -34,7 +36,7 @@ func show_options(options_array: Array):
else:
options.unselect()
options.connect("item_selected", self, "option_selected", [], CONNECT_ONESHOT)
- popup.popup_control(options)
+ popup.popup_control(input.placeholder_text, options)
# popup.connect("item_selected", self, "option_selected", [], CONNECT_ONESHOT)
# popup.clear_items()
# popup_opt.visible = true