25 lines
903 B
GDScript
25 lines
903 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 lack of action, should not have resource in item_data
|
|
NoneAction,
|
|
## Represents when this menu should be replaced with another.
|
|
## Attach MenuMenuResource next to it in item_data
|
|
TransitAction,
|
|
## Represents scripts which should be attached to button on menu startup
|
|
## Attach ScriptMenuResource next to it in item_data
|
|
ButtonAction,
|
|
## Represents button script with transition after its execution
|
|
## Attach ComboMenuResource next to it in item_data
|
|
ComboAction
|
|
}
|
|
|
|
## 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[MenuResource]
|