Cleaned and improved some event stuff

This commit is contained in:
2025-05-26 13:11:27 -05:00
parent c1d8dd46d8
commit d6a2f4b567
27 changed files with 296 additions and 108 deletions

View File

@@ -4,13 +4,36 @@ var QUEST_MENU:QuestMenu
var DEBUG_MENU:DebugMenu
var INVENTORY_MENU:FullInventoryMenu
var EVENT_FLAG_MENU:EventFlagMenu
var VN_TEXTBOX:VNTextbox
func _ready() -> void:
QUEST_MENU = $QuestMenu
DEBUG_MENU = $DebugMenu
INVENTORY_MENU = $FullInventory
EVENT_FLAG_MENU = $EventFlagMenu
VN_TEXTBOX = $VNTextbox
func _process(delta: float) -> void:
# This needs to always be at the end of the parent node's tree
get_parent().move_child(self, get_parent().get_child_count() - 1)
func hasInteractionFocus() -> bool:
# Returns true if the UI system has focus, basically if any UI menu or
# element is open in a way that prevents interaction with the game world.
if QUEST_MENU.isOpen():
return true
if DEBUG_MENU.isOpen():
return true
if INVENTORY_MENU.isOpen():
return true
if EVENT_FLAG_MENU.isOpen():
return true
if !VN_TEXTBOX.isClosed:
return true
return false