diff --git a/docs/api/ESCInventoryButton.md b/docs/api/ESCInventoryButton.md new file mode 100644 index 00000000..d6c560db --- /dev/null +++ b/docs/api/ESCInventoryButton.md @@ -0,0 +1,52 @@ + + +# ESCInventoryButton + +**Extends:** [TextureButton](../TextureButton) + +## Description + +The inventory representation of an ESC item if pickable (only used by +the inventory components) + +## Property Descriptions + +### global\_id + +```gdscript +var global_id: String = "" +``` + +Global ID of the ESCItem that uses this ESCInventoryItem + +## Method Descriptions + +### \_init + +```gdscript +func _init(p_item: ESCInventoryItem) -> void +``` + +## Signals + +- signal mouse_left_inventory_item(item_id): Signal emitted when the item was left clicked + +#### Parameters + +- item_id: Global ID of the clicked item +- signal mouse_right_inventory_item(item_id): Signal emitted when the item was right clicked + +#### Parameters + +- item_id: Global ID of the clicked item +- signal mouse_double_left_inventory_item(item_id): Signal emitted when the item was double clicked + +#### Parameters + +- item_id: Global ID of the clicked item +- signal inventory_item_focused(item_id): Signal emitted when the item was focused + +#### Parameters + +- item_id: Global ID of the clicked item +- signal inventory_item_unfocused(): Signal emitted when the item is not focused anymore diff --git a/docs/api/ESCInventoryContainer.md b/docs/api/ESCInventoryContainer.md new file mode 100644 index 00000000..cd45118f --- /dev/null +++ b/docs/api/ESCInventoryContainer.md @@ -0,0 +1,44 @@ + + +# ESCInventoryContainer + +**Extends:** [Control](../Control) + +## Description + +Inventory container handler that acts as a base for UIs inventory containers + +## Method Descriptions + +### is\_empty + +```gdscript +func is_empty() -> bool +``` + +Get wether the inventory container currently is empty +**Returns** Wether the container is empty or not + +### add\_item + +```gdscript +func add_item(inventory_item: ESCInventoryItem) -> ESCInventoryButton +``` + +Add a new item into the container and return the control generated for it +so its events can be handled by the inputs manager + +#### Parameters +- inventory_item: Item to add +**Returns** The button generated for the item + +### remove\_item + +```gdscript +func remove_item(inventory_item: ESCInventoryItem) +``` + +Remove an item from the container + +#### Parameters +- inventory_item: Item to remove \ No newline at end of file diff --git a/docs/api/ESCInventoryItem.md b/docs/api/ESCInventoryItem.md index 1fd93b21..a12a15b1 100644 --- a/docs/api/ESCInventoryItem.md +++ b/docs/api/ESCInventoryItem.md @@ -2,43 +2,29 @@ # ESCInventoryItem -**Extends:** [TextureButton](../TextureButton) - -## Description - -The inventory representation of an ESC item if pickable - ## Property Descriptions ### global\_id ```gdscript -var global_id +var global_id: String = "" ``` Global ID of the ESCItem that uses this ESCInventoryItem -Will be set by ESCItem automatically -## Signals +### texture -- signal mouse_left_inventory_item(item_id): Signal emitted when the item was left clicked +```gdscript +var texture: Texture +``` -#### Parameters +The texture for the item -- item_id: Global ID of the clicked item -- signal mouse_right_inventory_item(item_id): Signal emitted when the item was right clicked +## Method Descriptions -#### Parameters +### \_init -- item_id: Global ID of the clicked item -- signal mouse_double_left_inventory_item(item_id): Signal emitted when the item was double clicked +```gdscript +func _init(p_item: ESCItem) -> void +``` -#### Parameters - -- item_id: Global ID of the clicked item -- signal inventory_item_focused(item_id): Signal emitted when the item was focused - -#### Parameters - -- item_id: Global ID of the clicked item -- signal inventory_item_unfocused(): Signal emitted when the item is not focused anymore diff --git a/docs/api/ESCItem.md b/docs/api/ESCItem.md index a344d363..de5a2b1b 100644 --- a/docs/api/ESCItem.md +++ b/docs/api/ESCItem.md @@ -146,14 +146,13 @@ export var use_from_inventory_only = false If true, then the object must have been picked up before using it. A false value is useful for items in the background, such as buttons. -### inventory\_item\_scene\_file +### inventory\_texture ```gdscript -export var inventory_item_scene_file: PackedScene = "[Object:null]" +export var inventory_texture: Texture = "[Object:null]" ``` -Scene based on ESCInventoryItem used in inventory for the object if it is -picked up, that displays and handles the item +The visual representation for this item when its in the inventory ### dialog\_color @@ -228,15 +227,6 @@ var collision: Node Reference to this items collision shape node -### inventory\_item - -```gdscript -var inventory_item: ESCInventoryItem -``` - -The representation of this item in the scene. Will -be loaded, if inventory_item_scene_file is set. - ## Method Descriptions ### get\_animation\_player diff --git a/docs/api/ESCLogger.md b/docs/api/ESCLogger.md index 42c31951..bc26fade 100644 --- a/docs/api/ESCLogger.md +++ b/docs/api/ESCLogger.md @@ -13,7 +13,7 @@ Logging framework for Escoria ### LOG\_DEBUG ```gdscript -const LOG_ERROR: int = 0 +const LOG_WARNING: int = 1 ``` Valid log levels @@ -21,7 +21,7 @@ Valid log levels ### LOG\_ERROR ```gdscript -const LOG_ERROR: int = 0 +const LOG_WARNING: int = 1 ``` Valid log levels @@ -29,7 +29,7 @@ Valid log levels ### LOG\_INFO ```gdscript -const LOG_ERROR: int = 0 +const LOG_WARNING: int = 1 ``` Valid log levels @@ -37,7 +37,7 @@ Valid log levels ### LOG\_WARNING ```gdscript -const LOG_ERROR: int = 0 +const LOG_WARNING: int = 1 ``` Valid log levels