mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-27 20:29:22 +02:00
Extend the hint system to explain GUI elements
This commit is contained in:
parent
d258f812ce
commit
e87e29a3ed
9 changed files with 83 additions and 28 deletions
scenes
|
@ -1,14 +1,20 @@
|
|||
extends PopupPanel
|
||||
extends Node2D
|
||||
|
||||
var text setget _set_text
|
||||
var button_texts = ["Got it!", "Interesting!", "Very useful!", "Cool!", "Nice!", "Thanks!", "Whatever...", "Okay!", "Yay!", "Awesome!"]
|
||||
|
||||
func _ready():
|
||||
popup()
|
||||
button_texts.shuffle()
|
||||
$Panel/CenterContainer/OK.text = button_texts[0]
|
||||
|
||||
func _gui_input(event):
|
||||
if event is InputEventMouseButton:
|
||||
queue_free()
|
||||
#func _gui_input(event):
|
||||
# if event is InputEventMouseButton:
|
||||
# queue_free()
|
||||
|
||||
func _set_text(new_text):
|
||||
text = new_text
|
||||
$Label.text = new_text
|
||||
$Panel/Label.text = new_text
|
||||
|
||||
|
||||
func confirm():
|
||||
queue_free()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue