Skip to content

Commit 528d7e3

Browse files
authored
Add section on slot amount
Signed-off-by: GitHub <noreply@github.com>
1 parent 430fab6 commit 528d7e3

File tree

6 files changed

+45
-3
lines changed

6 files changed

+45
-3
lines changed
279 KB
Loading
321 KB
Loading
312 KB
Loading

docs/guide.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Through source code modifications, you can change Purse's behavior and appearanc
22

33
## Changing Equip Color
44

5-
You can make the slot's equip color which is blue, by changing the `SLOT_EQUIP_COLOR` constant in it's source.
5+
You can change the slot's equip color which is blue, by modifying the `SLOT_EQUIP_COLOR` constant in its source.
66

7-
This code sample changes the equip color to red.
7+
The following code sample changes the equip color to red.
88

99
``` lua linenums="44" hl_lines="2"
1010
--8<-- "src/init.luau:44:44"
@@ -15,3 +15,44 @@ local SLOT_EQUIP_COLOR = Color3.new(233 / 255, 90 / 255, 90 / 255) -- (1)!
1515
1. Changed from blue `#!lua Color3.new(90 / 255, 142 / 255, 233 / 255)` to red `#!lua Color3.new(90 / 255, 142 / 255, 233 / 255)`
1616

1717
![Screenshot of the hotbar with a slot equipped with a red selection outline](assets/red-slot-equip-color.png)
18+
19+
## Increasing Hotbar Slots and Inventory Rows
20+
21+
Purse shows a set number of hotbar slots and inventory rows based on the device.
22+
23+
![Screenshot of the hotbar and inventory with full size](assets/hotbar-inventory-full.png)
24+
/// caption
25+
Computer, console, and VR have 10 hotbar slots and 4 inventory rows
26+
///
27+
28+
![Screenshot of the hotbar and inventory with mini size](assets/hotbar-inventory-mini.png)
29+
/// caption
30+
Phone and tablet devices have 3 hotbar slots and 2 inventory rows
31+
///
32+
33+
It's possible to increase the number of hotbar slots and inventory rows shown by changing the constants in the source code.
34+
35+
!!! note
36+
37+
Formerly VR devices used different constants for hotbar slots and inventory rows but now use the same as computer and console devices.
38+
39+
`HOTBAR_SLOTS_VR` and `INVENTORY_ROWS_VR` are no longer used but are still included in the code. VR devices now use `INVENTORY_ROWS_FULL` and `HOTBAR_SLOTS_FULL`.
40+
41+
``` lua linenums="62"
42+
--8<-- "src/init.luau:62:72"
43+
```
44+
45+
Constants suffixed with `_FULL` are for computer, console, and VR devices while constants suffixed with `_MINI` are for phone and tablet devices.
46+
47+
The following code sample changes phone and tablet devices to have 5 hotbar slots.
48+
49+
``` lua linenums="62" hl_lines="3"
50+
--8<-- "src/init.luau:62:63"
51+
local HOTBAR_SLOTS_MINI = 5 -- (1)!
52+
--8<-- "src/init.luau:65:66"
53+
```
54+
55+
1. Changed from 3 hotbar slots to 5 hotbar slots
56+
57+
![Screenshot of the hotbar and inventory with modified mini size](assets/hotbar-inventory-sample.png)
58+

docs/philosophy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The basic rundown is that **Purse aims to be as close to the CoreGui** while **S
44

55
[Satchel]: https://satchel.luau.page
66

7-
## Design principles
7+
## Design Principles
88

99
* **As close to CoreGui as possible**: Purse aims to be as similar to Roblox's CoreGui as possible so players barely notice the difference
1010
* **Sync with upstream**: We document changes and keep track of any deviations from the [CoreGui Backpack upstream] which allows us to easily sync to the upstream.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ markdown_extensions:
5454
- attr_list
5555
- toc:
5656
permalink: true
57+
- pymdownx.blocks.caption
5758
- pymdownx.snippets
5859
- pymdownx.superfences
5960
- pymdownx.inlinehilite

0 commit comments

Comments
 (0)