Skip to content

Commit b21aec2

Browse files
committed
Rename Surface to Inventory
Signed-off-by: Ryan Luu <ryan.luu@ryanluu.dev>
1 parent 5fdd67a commit b21aec2

7 files changed

Lines changed: 47 additions & 47 deletions

File tree

‎src/Components/useSlotMetrics.luau‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const function getSlotMetrics(tenFootInterface: boolean?): SlotMetrics
9999
const slotWidth = offsetOnAxis(slot, "X") or if tenFoot then DEFAULT_TEN_FOOT_SLOT_WIDTH else DEFAULT_SLOT_WIDTH
100100
const slotHeight = offsetOnAxis(slot, "Y") or if tenFoot then DEFAULT_TEN_FOOT_SLOT_HEIGHT else DEFAULT_SLOT_HEIGHT
101101
const gap = offsetOnAxis(resolveToken(theme, "SlotGap"), "X") or DEFAULT_GAP
102-
const scrollbarGutter = offsetOnAxis(resolveToken(theme, "ScrollbarGutter"), "X") or DEFAULT_SCROLLBAR_GUTTER
102+
const scrollbarGutter = offsetOnAxis(resolveToken(theme, "InventoryScrollbarGutter"), "X") or DEFAULT_SCROLLBAR_GUTTER
103103

104104
-- Hotbar uses $SlotGap between slots and as its left and right padding.
105105
const pitchX = slotWidth + gap

‎src/Design/BaseTokens.model.json‎

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Design/BaseTokens.rsml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ $StyleCategory = "Tokens";
66
-- Layout
77
-- useSlotMetrics reads these to size the hotbar and inventory.
88
-- Hotbar padding uses the same gap, so row width is count * (slot + gap) + gap.
9-
$ScrollbarColor = #D0D8FA;
10-
$ScrollbarGutter = 13px;
119
$SlotGap = 5px;
1210
$SlotSize = udim2 (60px, 60px);
1311
$TenFootSlotSize = udim2 (100px, 100px);
@@ -55,11 +53,13 @@ $SlotTextStrokeColor = $TextStrokeColor;
5553
$SlotTextStrokeTransparency = $TextStrokeTransparency;
5654
$SlotUnlockBackgroundColor = $SlotBackgroundColor;
5755

58-
-- Surface
59-
$SurfaceBackgroundColor = $BackgroundColor;
60-
$SurfaceBackgroundTransparency = 0.3;
61-
$SurfaceCornerRadius = $CornerRadius;
62-
$SurfacePadding = 5px;
56+
-- Inventory
57+
$InventoryBackgroundColor = $BackgroundColor;
58+
$InventoryBackgroundTransparency = 0.3;
59+
$InventoryCornerRadius = $CornerRadius;
60+
$InventoryPadding = 5px;
61+
$InventoryScrollbarColor = #D0D8FA;
62+
$InventoryScrollbarGutter = 13px;
6363

6464
-- Tooltip
6565
$TooltipBackgroundColor = #262830;

‎src/Design/LegacyTheme.model.json‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Design/LegacyTheme.rsml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ $SlotEquipStrokeThickness = 5;
3434
$SlotPadding = 6px;
3535
$SlotUnlockBackgroundColor = #313131;
3636

37-
-- Surface
38-
$SurfaceBackgroundTransparency = $BackgroundTransparency;
37+
-- Inventory
38+
$InventoryBackgroundTransparency = $BackgroundTransparency;
3939

4040
-- Tooltip
4141
$TooltipBackgroundColor = #666666;

‎src/Design/SatchelStyleSheet.model.json‎

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Design/SatchelStyleSheet.rsml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@ TextBox.Searchbar {
323323
-- Width is set in Inventory from useSlotMetrics. Height follows the search row and the scrolling frame.
324324
.Inventory {
325325
AutomaticSize = :Y;
326-
BackgroundColor3 = $SurfaceBackgroundColor;
327-
BackgroundTransparency = $SurfaceBackgroundTransparency;
326+
BackgroundColor3 = $InventoryBackgroundColor;
327+
BackgroundTransparency = $InventoryBackgroundTransparency;
328328

329-
CornerRadius! ($SurfaceCornerRadius);
329+
CornerRadius! ($InventoryCornerRadius);
330330

331331
::UIListLayout {
332332
Padding = 1px;
@@ -338,7 +338,7 @@ TextBox.Searchbar {
338338
BorderSizePixel = 0;
339339
CanvasSize = udim2 (0px, 0px);
340340
ElasticBehavior = :Always;
341-
ScrollBarImageColor3 = $ScrollbarColor;
341+
ScrollBarImageColor3 = $InventoryScrollbarColor;
342342
ScrollBarThickness = 8;
343343
ScrollingDirection = :Y;
344344
Selectable = false;
@@ -350,14 +350,14 @@ TextBox.Searchbar {
350350
Wraps = true;
351351
}
352352

353-
Padding! ($SurfacePadding);
353+
Padding! ($InventoryPadding);
354354
}
355355

356356
>#SearchFrame {
357357
BackgroundTransparency = 1;
358358
Size = $SearchFrameSize;
359359

360-
Padding! ($SurfacePadding, $SurfacePadding, 0px);
360+
Padding! ($InventoryPadding, $InventoryPadding, 0px);
361361
}
362362
}
363363

0 commit comments

Comments
 (0)