Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions src/TopbarIcon.client.luau
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,26 @@
local BackpackScript = require(script.Parent)
local Icon = require(script.Parent.Parent.topbarplus)

local ICON_SELECTED_IMAGE = "rbxasset://textures/ui/TopBar/inventoryOn.png"
local ICON_DESELECTED_IMAGE = "rbxasset://textures/ui/TopBar/inventoryOff.png"

local icon = Icon.new()
icon:setCaption("Inventory")
icon:setImage(ICON_SELECTED_IMAGE, "Selected")
icon:setImage(ICON_DESELECTED_IMAGE, "Deselected")
icon:setImageScale(1)
icon:autoDeselect(false)
icon:modifyTheme({ "IconLabelContainer", "TargetWidth", 0 }) -- Force minimum width
icon:setLabel("backpack")
icon:setOrder(-1)
icon:setTextSize(24)
icon:setTextFont(
"rbxasset://LuaPackages/Packages/_Index/BuilderIcons/BuilderIcons/BuilderIcons.json",
Enum.FontWeight.Bold,
Enum.FontStyle.Normal,
"Selected"
)
icon:setTextFont(
"rbxasset://LuaPackages/Packages/_Index/BuilderIcons/BuilderIcons/BuilderIcons.json",
Enum.FontWeight.Regular,
Enum.FontStyle.Normal,
"Deselected"
)
icon:bindToggleKey(Enum.KeyCode.Backquote)
icon:autoDeselect(false)
icon:setCaption("Inventory")

BackpackScript.StateChanged.Event:Connect(function(isNowOpen)
if isNowOpen then
Expand Down