in-world ui textboxes

This commit is contained in:
2026-06-12 09:08:13 -05:00
parent a4d47d7f00
commit b364fae1c7
16 changed files with 265 additions and 27 deletions
+12 -2
View File
@@ -33,15 +33,19 @@ func isInteractable() -> bool:
if entity.interactType == Entity.InteractType.BATTLE_TEST:
return true
if entity.interactType == Entity.InteractType.CHATBOX:
return entity.chatboxMessage != ""
return false
func _onConversationInteract(_other:Entity) -> void:
func _onConversationInteract(other:Entity) -> void:
assert(entity.dialogueResource != null)
var cutscene:Cutscene = Cutscene.new()
cutscene.addCallable(DialogueAction.getDialogueCallable(
entity.dialogueResource,
entity.dialogueTitle,
[entity]
[entity],
{"npc": entity, "player": other}
))
cutscene.start()
@@ -83,5 +87,11 @@ func onInteract(other:Entity) -> void:
cutscene.start()
return
Entity.InteractType.CHATBOX:
assert(entity.chatboxMessage != "")
var chatbox:WorldChatBox = UI.spawnWorldChatBox(entity)
chatbox.showAdvanceable(entity.chatboxMessage)
return
_:
pass