Skip to content

Commit 9b54255

Browse files
committed
update placement of buttons
1 parent 5b33540 commit 9b54255

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

UnityHiroInventory/Assets/UnityHiroInventory/UI/Inventory.uxml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
<ui:ScrollView horizontal-scroller-visibility="Hidden" style="flex-grow: 1; align-items: stretch; align-content: center; align-self: stretch; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px;">
1313
<ui:VisualElement name="inventory-grid" style="flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-content: flex-start; padding: 10px;" />
1414
</ui:ScrollView>
15-
</ui:VisualElement>
16-
<ui:VisualElement name="action-buttons" style="flex-direction: row; justify-content: space-between; margin-bottom: 20px; height: auto; padding: 20px; background-color: rgba(132, 154, 255, 0.05); border-radius: 15px; flex-grow: 0; flex-shrink: 0;">
17-
<ui:VisualElement style="flex-direction: column; width: 40%;">
18-
<ui:Button text="Consume Item" name="item-consume" class="heroic-button" style="margin-bottom: 10px; flex-grow: 1;" />
19-
<ui:Button text="Remove Item" name="item-remove" class="heroic-button" style="flex-grow: 1;" />
20-
</ui:VisualElement>
21-
<ui:VisualElement style="flex-direction: column; width: 40%; align-items: center; align-self: center; align-content: center;">
15+
<ui:VisualElement style="flex-direction: row; width: 100%; align-items: center; align-self: center; align-content: center; padding-top: 0; padding-right: 0; padding-bottom: 0; padding-left: 10px;">
2216
<ui:Button text="Refresh" name="inventory-refresh" class="heroic-button-square" style="align-self: center; margin-top: 10px;" />
2317
</ui:VisualElement>
24-
<ui:VisualElement style="flex-direction: column; width: 40%;">
25-
<ui:DropdownField name="grant-item-dropdown" style="margin-bottom: 10px; flex-grow: 1; border-color: rgb(132, 154, 255); border-width: 2px; border-radius: 10px; padding: 10px; font-size: 50%; min-height: 50px; border-left-color: rgb(255, 255, 255); border-right-color: rgb(255, 255, 255); border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(255, 255, 255); border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
26-
<ui:Button text="Grant Item" name="item-grant" class="heroic-button" style="flex-grow: 1;" />
18+
</ui:VisualElement>
19+
<ui:VisualElement name="action-buttons" style="flex-direction: row; justify-content: space-between; margin-bottom: 20px; height: auto; padding: 20px; background-color: rgba(132, 154, 255, 0.05); border-radius: 15px; flex-grow: 0; flex-shrink: 0; width: 100%; align-items: center; padding-top: 20px; padding-right: 20px; padding-bottom: 20px; padding-left: 20px;">
20+
<ui:VisualElement style="flex-direction: row; width: 40%; align-items: flex-start;">
21+
<ui:DropdownField name="grant-item-dropdown" style="margin-bottom: 10px; flex-grow: 1; border-color: rgb(132, 154, 255); border-width: 2px; border-radius: 10px; padding: 10px; font-size: 50%; min-height: 50px; border-left-color: rgb(255, 255, 255); border-right-color: rgb(255, 255, 255); border-top-color: rgb(255, 255, 255); border-bottom-color: rgb(255, 255, 255); border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; flex-direction: row; width: 100px;" />
22+
<ui:Button text="Grant Item" name="item-grant" class="heroic-button" style="flex-grow: 1; flex-direction: row; width: 40px; padding-right: 10px; padding-left: 10px;" />
23+
</ui:VisualElement>
24+
<ui:VisualElement style="flex-direction: row; width: 40%; align-items: flex-start;">
25+
<ui:Button text="Remove Item" name="item-remove" class="heroic-button" style="flex-grow: 1; width: 40px; -unity-background-image-tint-color: rgb(85, 100, 153); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px;" />
26+
<ui:Button text="Consume Item" name="item-consume" class="heroic-button" style="margin-bottom: 10px; flex-grow: 1; width: 40px; flex-direction: row; padding-right: 10px; padding-left: 10px; margin-left: 10px;" />
2727
</ui:VisualElement>
2828
</ui:VisualElement>
2929
</ui:VisualElement>

UnityHiroInventory/Assets/UnityHiroInventory/UI/InventoryItemTemplate.uxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<ui:UXML xmlns:ui="UnityEngine.UIElements" editor-extension-mode="False">
22
<Style src="project://database/Assets/UnityHiroInventory/HeroicUI/USS/HeroicUSS.uss?fileID=7433441132597879392&amp;guid=c85112b37ef124d80aa9b1b987d1c4d8&amp;type=3#HeroicUSS" />
3-
<ui:VisualElement name="inventory-slot" class="inventory-slot" style="width: 200px; height: 200px; margin: 5px; border-width: 0; border-radius: 10px; align-items: center; justify-content: center; -unity-background-scale-mode: stretch-to-fill; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; border-top-width: 4px; border-right-width: 4px; border-bottom-width: 4px; border-left-width: 4px; border-left-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0); border-top-color: rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0); min-width: auto; min-height: auto; flex-shrink: 0; flex-grow: 0;">
3+
<ui:VisualElement name="inventory-slot" class="inventory-slot" style="width: 200px; height: 200px; margin: 5px; border-width: 0; border-radius: 10px; align-items: center; justify-content: center; -unity-background-scale-mode: stretch-to-fill; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px; border-top-width: 4px; border-right-width: 4px; border-bottom-width: 4px; border-left-width: 4px; border-left-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0); border-top-color: rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0); min-width: auto; min-height: auto; flex-shrink: 0; flex-grow: 0; border-top-left-radius: 15px; border-top-right-radius: 15px; border-bottom-right-radius: 15px; border-bottom-left-radius: 15px;">
44
<ui:VisualElement name="item-icon" style="width: 60%; height: 60%; border-radius: 0; background-color: rgba(0, 0, 0, 0); align-items: center; justify-content: center; -unity-background-scale-mode: scale-to-fit;" />
55
<ui:Label name="item-quantity" text="x0" style="position: absolute; bottom: 5px; right: 5px; font-size: 50%; color: rgb(255, 255, 255); -unity-font-style: bold; padding: 2px 6px; border-radius: 5px; text-shadow: 3px 3px 3px rgb(0, 0, 0); -unity-background-image-tint-color: rgb(0, 0, 0); -unity-text-outline-width: 0; -unity-text-outline-color: rgb(0, 0, 0);" />
66
</ui:VisualElement>

0 commit comments

Comments
 (0)