cosmic/scripts/Classes/menu.gd
2024-05-18 02:00:41 +03:00

24 lines
750 B
GDScript

extends Resource
## Represents menu with actions, each action should map to a string id and data (if needed)
class_name Menu
enum Action {
## Represents when this menu should be replaced with another.
## Attach Menu next to it in item_data
TransitAction,
## Represents scripts which should be attached to button on menu startup
## Attach Script next to it in item_data
ButtonAction,
## WIP, should represent LineEdit or some other input control
InputAction,
## WIP
OtherAction
}
## Action string IDs. Should have same size as item_actions
@export var item_ids: Array[String]
## Action type. Should have same size as item_ids
@export var item_actions: Array[Action]
## Should have same size as other arrays
@export var item_data: Array