Add example screenshots to API.md

This commit is contained in:
Jaidyn Ann 2024-01-12 03:31:41 -06:00
parent 2b3df66a7d
commit 4f0b41b61f
3 changed files with 5 additions and 2 deletions

7
API.md
View File

@ -16,6 +16,8 @@
### Tabs ### Tabs
![Screenshot of the inventory with the below example tab in focus.](res/api-tabs.png)
#### `i4.new_tab(name, def)` #### `i4.new_tab(name, def)`
- `name` is the tab name. - `name` is the tab name.
@ -26,8 +28,8 @@ Custom tabs can be added to the `i4` inventory as follow (example):
```Lua ```Lua
i4.new_tab("stuff", { i4.new_tab("stuff", {
description = "Stuff", description = "Stuff",
image = "image.png", -- Optional, add an image next to the tab description image = "speech_icon.png", -- Optional, add an image next to the tab description
slots = true -- Optional, whether the inventory slots are shown or not. Disabled by default. slots = true, -- Optional, whether the inventory slots are shown or not. Disabled by default.
-- --
-- The functions below are all optional -- The functions below are all optional
@ -90,6 +92,7 @@ A list of registered tabs.
--- ---
### Footer buttons ### Footer buttons
![Screenshot of the inventory with the below example footer-button.](res/api-footer_button.png)
`i4.new_footer_button(name, def)` `i4.new_footer_button(name, def)`

BIN
res/api-footer_button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
res/api-tabs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB