@@ -10,6 +10,8 @@ public sealed class HandsContainer : ItemSlotUIContainer<HandButton>
|
|||||||
public int ColumnLimit { get => _grid.Columns; set => _grid.Columns = value; }
|
public int ColumnLimit { get => _grid.Columns; set => _grid.Columns = value; }
|
||||||
public int MaxButtonCount { get; set; } = 0;
|
public int MaxButtonCount { get; set; } = 0;
|
||||||
|
|
||||||
|
public int MaxButtonsPerRow { get; set; }= 6;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indexer. This is used to reference a HandsContainer from the
|
/// Indexer. This is used to reference a HandsContainer from the
|
||||||
/// controller.
|
/// controller.
|
||||||
@@ -36,6 +38,7 @@ public sealed class HandsContainer : ItemSlotUIContainer<HandButton>
|
|||||||
_grid.AddChild(newButton);
|
_grid.AddChild(newButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_grid.Columns = Math.Min(_grid.ChildCount, MaxButtonsPerRow);
|
||||||
return base.AddButton(newButton);
|
return base.AddButton(newButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,39 +24,46 @@
|
|||||||
Visible="False"/>
|
Visible="False"/>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</Control>
|
</Control>
|
||||||
<inventory:ItemSlotButtonContainer
|
<BoxContainer Orientation="Vertical">
|
||||||
Name="InventoryHotbar"
|
|
||||||
Access="Public"
|
|
||||||
Visible="False"
|
|
||||||
Columns="10"
|
|
||||||
SlotGroup="Default"
|
|
||||||
ExpandBackwards="True"
|
|
||||||
VerticalExpand="True"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
/>
|
|
||||||
<BoxContainer Orientation="Horizontal" Name="Hotbar">
|
|
||||||
<inventory:ItemSlotButtonContainer
|
<inventory:ItemSlotButtonContainer
|
||||||
Name="SecondHotbar"
|
Name="InventoryHotbar"
|
||||||
SlotGroup="SecondHotbar"
|
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalExpand="False"
|
|
||||||
Columns="6"
|
|
||||||
HorizontalExpand="True"/>
|
|
||||||
<hands:HandsContainer
|
|
||||||
Name="HandContainer"
|
|
||||||
Access="Public"
|
Access="Public"
|
||||||
|
Visible="False"
|
||||||
|
Columns="10"
|
||||||
|
SlotGroup="Default"
|
||||||
|
ExpandBackwards="True"
|
||||||
|
VerticalExpand="True"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
ColumnLimit="6" />
|
|
||||||
<inventory:ItemSlotButtonContainer
|
|
||||||
Name="MainHotbar"
|
|
||||||
SlotGroup="MainHotbar"
|
|
||||||
VerticalExpand="False"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Bottom"
|
VerticalAlignment="Bottom"
|
||||||
HorizontalExpand="True"
|
Margin="0 0 0 4"
|
||||||
Columns="6"
|
/>
|
||||||
/>
|
<BoxContainer Orientation="Horizontal" Name="Hotbar" HorizontalAlignment="Center">
|
||||||
|
<inventory:ItemSlotButtonContainer
|
||||||
|
Name="SecondHotbar"
|
||||||
|
SlotGroup="SecondHotbar"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalExpand="False"
|
||||||
|
ExpandBackwards="True"
|
||||||
|
Columns="6"
|
||||||
|
HorizontalExpand="False"/>
|
||||||
|
<hands:HandsContainer
|
||||||
|
Name="HandContainer"
|
||||||
|
Access="Public"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
HorizontalExpand="False"
|
||||||
|
ColumnLimit="6"
|
||||||
|
Margin="4 0 4 0"/>
|
||||||
|
<inventory:ItemSlotButtonContainer
|
||||||
|
Name="MainHotbar"
|
||||||
|
SlotGroup="MainHotbar"
|
||||||
|
VerticalExpand="False"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
HorizontalExpand="False"
|
||||||
|
ExpandBackwards="True"
|
||||||
|
Columns="6"
|
||||||
|
/>
|
||||||
|
</BoxContainer>
|
||||||
</BoxContainer>
|
</BoxContainer>
|
||||||
</widgets:HotbarGui>
|
</widgets:HotbarGui>
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ public abstract class ItemSlotUIContainer<T> : GridContainer, IItemslotUIContain
|
|||||||
{
|
{
|
||||||
if (!Children.Contains(newButton) && newButton.Parent == null && newButton.SlotName != "")
|
if (!Children.Contains(newButton) && newButton.Parent == null && newButton.SlotName != "")
|
||||||
AddChild(newButton);
|
AddChild(newButton);
|
||||||
|
Columns = ChildCount;
|
||||||
return AddButtonToDict(newButton);
|
return AddButtonToDict(newButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,14 +53,6 @@
|
|||||||
uiWindowPos: 1,0
|
uiWindowPos: 1,0
|
||||||
strippingWindowPos: 1,0
|
strippingWindowPos: 1,0
|
||||||
displayName: Head
|
displayName: Head
|
||||||
- name: suitstorage
|
|
||||||
slotTexture: suit_storage
|
|
||||||
slotFlags: SUITSTORAGE
|
|
||||||
stripTime: 3
|
|
||||||
uiWindowPos: 2,0
|
|
||||||
strippingWindowPos: 2,5
|
|
||||||
dependsOn: outerClothing
|
|
||||||
displayName: Suit Storage
|
|
||||||
- name: id
|
- name: id
|
||||||
slotTexture: id
|
slotTexture: id
|
||||||
slotFlags: IDCARD
|
slotFlags: IDCARD
|
||||||
@@ -103,11 +95,9 @@
|
|||||||
uiWindowPos: 0,4
|
uiWindowPos: 0,4
|
||||||
strippingWindowPos: 0,5
|
strippingWindowPos: 0,5
|
||||||
displayName: Pocket 3
|
displayName: Pocket 3
|
||||||
|
|
||||||
- name: outerClothing
|
- name: outerClothing
|
||||||
slotTexture: suit
|
slotTexture: suit
|
||||||
slotFlags: OUTERCLOTHING
|
slotFlags: OUTERCLOTHING
|
||||||
slotGroup: SecondHotbar
|
|
||||||
stripTime: 6
|
stripTime: 6
|
||||||
uiWindowPos: 1,2
|
uiWindowPos: 1,2
|
||||||
strippingWindowPos: 1,2
|
strippingWindowPos: 1,2
|
||||||
@@ -132,3 +122,12 @@
|
|||||||
dependsOn: jumpsuit
|
dependsOn: jumpsuit
|
||||||
displayName: Pocket 2
|
displayName: Pocket 2
|
||||||
stripHidden: true
|
stripHidden: true
|
||||||
|
- name: suitstorage
|
||||||
|
slotTexture: suit_storage
|
||||||
|
slotFlags: SUITSTORAGE
|
||||||
|
slotGroup: MainHotbar
|
||||||
|
stripTime: 3
|
||||||
|
uiWindowPos: 2,0
|
||||||
|
strippingWindowPos: 2,5
|
||||||
|
dependsOn: outerClothing
|
||||||
|
displayName: Suit Storage
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
- name: outerClothing
|
- name: outerClothing
|
||||||
slotTexture: suit
|
slotTexture: suit
|
||||||
slotFlags: OUTERCLOTHING
|
slotFlags: OUTERCLOTHING
|
||||||
slotGroup: MainHotbar
|
|
||||||
stripTime: 6
|
stripTime: 6
|
||||||
uiWindowPos: 1,2
|
uiWindowPos: 1,2
|
||||||
strippingWindowPos: 1,2
|
strippingWindowPos: 1,2
|
||||||
@@ -77,6 +76,7 @@
|
|||||||
- name: suitstorage
|
- name: suitstorage
|
||||||
slotTexture: suit_storage
|
slotTexture: suit_storage
|
||||||
slotFlags: SUITSTORAGE
|
slotFlags: SUITSTORAGE
|
||||||
|
slotGroup: MainHotbar
|
||||||
stripTime: 3
|
stripTime: 3
|
||||||
uiWindowPos: 2,0
|
uiWindowPos: 2,0
|
||||||
strippingWindowPos: 2,5
|
strippingWindowPos: 2,5
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
- name: outerClothing
|
- name: outerClothing
|
||||||
slotTexture: suit
|
slotTexture: suit
|
||||||
slotFlags: OUTERCLOTHING
|
slotFlags: OUTERCLOTHING
|
||||||
slotGroup: MainHotbar
|
|
||||||
stripTime: 6
|
stripTime: 6
|
||||||
uiWindowPos: 1,2
|
uiWindowPos: 1,2
|
||||||
strippingWindowPos: 1,2
|
strippingWindowPos: 1,2
|
||||||
@@ -78,6 +77,7 @@
|
|||||||
- name: suitstorage
|
- name: suitstorage
|
||||||
slotTexture: suit_storage
|
slotTexture: suit_storage
|
||||||
slotFlags: SUITSTORAGE
|
slotFlags: SUITSTORAGE
|
||||||
|
slotGroup: MainHotbar
|
||||||
stripTime: 3
|
stripTime: 3
|
||||||
uiWindowPos: 2,0
|
uiWindowPos: 2,0
|
||||||
strippingWindowPos: 2,5
|
strippingWindowPos: 2,5
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
- name: outerClothing
|
- name: outerClothing
|
||||||
slotTexture: suit
|
slotTexture: suit
|
||||||
slotFlags: OUTERCLOTHING
|
slotFlags: OUTERCLOTHING
|
||||||
slotGroup: MainHotbar
|
|
||||||
stripTime: 6
|
stripTime: 6
|
||||||
uiWindowPos: 1,2
|
uiWindowPos: 1,2
|
||||||
strippingWindowPos: 1,2
|
strippingWindowPos: 1,2
|
||||||
@@ -84,6 +83,7 @@
|
|||||||
- name: suitstorage
|
- name: suitstorage
|
||||||
slotTexture: suit_storage
|
slotTexture: suit_storage
|
||||||
slotFlags: SUITSTORAGE
|
slotFlags: SUITSTORAGE
|
||||||
|
slotGroup: MainHotbar
|
||||||
stripTime: 3
|
stripTime: 3
|
||||||
uiWindowPos: 2,0
|
uiWindowPos: 2,0
|
||||||
strippingWindowPos: 2,5
|
strippingWindowPos: 2,5
|
||||||
|
|||||||
@@ -4,14 +4,12 @@
|
|||||||
- name: head
|
- name: head
|
||||||
slotTexture: head
|
slotTexture: head
|
||||||
slotFlags: HEAD
|
slotFlags: HEAD
|
||||||
slotGroup: MainHotbar
|
|
||||||
uiWindowPos: 0,0
|
uiWindowPos: 0,0
|
||||||
strippingWindowPos: 0,0
|
strippingWindowPos: 0,0
|
||||||
displayName: Head
|
displayName: Head
|
||||||
- name: ears
|
- name: ears
|
||||||
slotTexture: ears
|
slotTexture: ears
|
||||||
slotFlags: EARS
|
slotFlags: EARS
|
||||||
slotGroup: MainHotbar
|
|
||||||
stripTime: 3
|
stripTime: 3
|
||||||
uiWindowPos: 1,2
|
uiWindowPos: 1,2
|
||||||
strippingWindowPos: 1,2
|
strippingWindowPos: 1,2
|
||||||
@@ -47,6 +45,7 @@
|
|||||||
- name: suitstorage
|
- name: suitstorage
|
||||||
slotTexture: suit_storage
|
slotTexture: suit_storage
|
||||||
slotFlags: SUITSTORAGE
|
slotFlags: SUITSTORAGE
|
||||||
|
slotGroup: MainHotbar
|
||||||
stripTime: 3
|
stripTime: 3
|
||||||
uiWindowPos: 2,0
|
uiWindowPos: 2,0
|
||||||
strippingWindowPos: 2,5
|
strippingWindowPos: 2,5
|
||||||
@@ -55,7 +54,6 @@
|
|||||||
- name: outerClothing
|
- name: outerClothing
|
||||||
slotTexture: suit
|
slotTexture: suit
|
||||||
slotFlags: OUTERCLOTHING
|
slotFlags: OUTERCLOTHING
|
||||||
slotGroup: MainHotbar
|
|
||||||
stripTime: 6
|
stripTime: 6
|
||||||
uiWindowPos: 1,3
|
uiWindowPos: 1,3
|
||||||
strippingWindowPos: 1,3
|
strippingWindowPos: 1,3
|
||||||
|
|||||||
Reference in New Issue
Block a user