-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,6 +173,17 @@ Determines the transparency of the text stroke of text in default chat window an | |
|
||
Returns whether the inventory is opened or not. | ||
|
||
#### Code Samples | ||
|
||
This code sample will return whether the inventory is opened or not. | ||
|
||
```lua title="Is Opened" linenums="1" | ||
local ReplicatedStorage = game:GetService("ReplicatedStorage") | ||
local Satchel = require(ReplicatedStorage:WaitForChild("Satchel")) | ||
|
||
local isOpened = Satchel.IsOpened() | ||
``` | ||
|
||
#### Returns | ||
|
||
<table> | ||
|
@@ -185,6 +196,17 @@ Returns whether the inventory is opened or not. | |
|
||
Sets whether the backpack gui is enabled or disabled. | ||
|
||
#### Code Samples | ||
|
||
This code sample will disable the backpack gui. | ||
|
||
```lua title="Disable Backpack" linenums="1" | ||
local ReplicatedStorage = game:GetService("ReplicatedStorage") | ||
local Satchel = require(ReplicatedStorage:WaitForChild("Satchel")) | ||
|
||
Satchel.SetBackpackEnabled(false) | ||
``` | ||
|
||
#### Parameters | ||
|
||
<table> | ||
|
@@ -206,6 +228,17 @@ Sets whether the backpack gui is enabled or disabled. | |
|
||
Returns whether the backpack gui is enabled or disabled. | ||
|
||
#### Code Samples | ||
|
||
This code sample will return whether the backpack gui is enabled or disabled. | ||
|
||
```lua title="Get Backpack Enabled" linenums="1" | ||
local ReplicatedStorage = game:GetService("ReplicatedStorage") | ||
local Satchel = require(ReplicatedStorage:WaitForChild("Satchel")) | ||
|
||
local isEnabled = Satchel.GetBackpackEnabled() | ||
``` | ||
|
||
#### Returns | ||
|
||
<table> | ||
|
@@ -218,6 +251,24 @@ Returns whether the backpack gui is enabled or disabled. | |
|
||
Returns a signal that fires when the inventory is opened or closed. | ||
|
||
#### Code Samples | ||
|
||
This code sample detects when the inventory is opened or closed. | ||
|
||
```lua title="Detect Inventory State" linenums="1" | ||
local ReplicatedStorage = game:GetService("ReplicatedStorage") | ||
local Satchel = require(ReplicatedStorage:WaitForChild("Satchel")) | ||
|
||
Satchel.GetStateChangedEvent():Connect(function(isOpened: boolean) | ||
if isOpened then | ||
print("Inventory opened") | ||
else | ||
print("Inventory closed") | ||
end | ||
end) | ||
``` | ||
|
||
|
||
Check failure on line 271 in docs/api-reference.md
|
||
#### Returns | ||
|
||
<table> | ||
|