revamp hotbar ui
This commit is contained in:
parent
f9403100de
commit
d6af38eba1
3 changed files with 57 additions and 69 deletions
|
@ -27,38 +27,36 @@ const hotbar: Hooks.FC<hotbarProps> = (props, hooks) => {
|
|||
Enum.KeyCode.Six,
|
||||
Enum.KeyCode.Seven,
|
||||
Enum.KeyCode.Eight,
|
||||
Enum.KeyCode.Nine
|
||||
Enum.KeyCode.Nine,
|
||||
// idk if this works
|
||||
Enum.KeyCode.Zero
|
||||
]
|
||||
|
||||
return (
|
||||
<frame
|
||||
{...spreadableProps}
|
||||
AutomaticSize={Enum.AutomaticSize.X}
|
||||
AnchorPoint={new Vector2(0.5, 1)}
|
||||
AnchorPoint={new Vector2(0, 0)}
|
||||
Position={new UDim2(0, 0, 0, 0)}
|
||||
BackgroundTransparency={1}
|
||||
Key="Hotbar"
|
||||
Size={new UDim2(.25, 0, 1, 0)}
|
||||
Key={"Hotbar"}
|
||||
>
|
||||
<frame Size={new UDim2(0, 0, 0.5, 0)} Position={new UDim2(0.5, 0, 0.5, 0)} BackgroundTransparency={1}>
|
||||
<uilistlayout
|
||||
FillDirection={Enum.FillDirection.Horizontal}
|
||||
HorizontalAlignment={Enum.HorizontalAlignment.Center}
|
||||
VerticalAlignment={Enum.VerticalAlignment.Bottom}
|
||||
Padding={new UDim(0, 5)}
|
||||
/>
|
||||
<Padding
|
||||
PaddingY={new UDim(0, 5)}
|
||||
/>
|
||||
{
|
||||
clientState.backpack.GetChildren().map((tool, i) => (
|
||||
<Slot
|
||||
index={i + 1}
|
||||
Size={new UDim2(1, 0, 1, 0)}
|
||||
keycode={keycodes[i]}
|
||||
tool={tool as Tool}
|
||||
/>
|
||||
))
|
||||
}
|
||||
</frame>
|
||||
<uilistlayout
|
||||
Padding={new UDim(0, 5)}
|
||||
VerticalAlignment={Enum.VerticalAlignment.Bottom}
|
||||
/>
|
||||
<Padding
|
||||
Padding={new UDim(0, 10)}
|
||||
/>
|
||||
{
|
||||
clientState.backpack.GetChildren().map((tool, i) => (
|
||||
<Slot
|
||||
index={i + 1}
|
||||
keycode={keycodes[i]}
|
||||
tool={tool as Tool}
|
||||
/>
|
||||
))
|
||||
}
|
||||
</frame>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue