Files
BABA_YAGA/Assets/UI/Documents/MainGameHUD.uxml
2026-04-26 04:39:59 +07:00

57 lines
4.3 KiB
Plaintext

<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd">
<Style src="project:/Assets/UI/Styles/Global.uss" />
<!-- Root is fully transparent and ignores picking for gameplay -->
<ui:VisualElement style="flex-grow: 1; padding: 40px;" picking-mode="Ignore">
<!-- Area 2: Player Stats (Top Left) -->
<ui:VisualElement name="hud-stats" style="position: absolute; top: 40px; left: 40px; width: 300px;">
<ui:Label name="health-text" text="HEALTH" style="color: #ff4d4d; -unity-font-style: bold; margin-bottom: 5px;" />
<ui:VisualElement class="hud-bar-container" style="height: 20px;">
<ui:VisualElement name="health-fill" class="hud-bar-fill" style="width: 100%; background-color: #ff4d4d;" />
</ui:VisualElement>
<ui:Label text="STAMINA" style="color: #4da6ff; -unity-font-style: bold; margin-top: 10px; margin-bottom: 5px;" />
<ui:VisualElement class="hud-bar-container" style="height: 12px;">
<ui:VisualElement name="stamina-fill" class="hud-bar-fill" style="width: 100%; background-color: #4da6ff;" />
</ui:VisualElement>
</ui:VisualElement>
<!-- Area 3: Minimap (Top Right) -->
<ui:VisualElement name="hud-minimap" style="position: absolute; top: 40px; right: 40px; width: 200px; height: 200px; border-radius: 50%; background-color: rgba(0,0,0,0.4); border-width: 2px; border-color: white; overflow: hidden;">
<!-- Placeholder for map render texture -->
<ui:Label text="MAP" style="align-self: center; margin-top: 80px; opacity: 0.5;" />
</ui:VisualElement>
<!-- Area 4: Inventory (Bottom Left) -->
<ui:VisualElement name="hud-inventory" style="position: absolute; bottom: 40px; left: 40px; flex-direction: row; align-items: flex-end;">
<ui:VisualElement name="slot-holding" style="width: 100px; height: 100px; background-color: rgba(255,255,255,0.1); border-width: 2px; border-color: white; margin-right: 15px; justify-content: center; align-items: center;">
<ui:Label text="HAND" style="font-size: 10px;" />
</ui:VisualElement>
<ui:VisualElement style="flex-direction: row;">
<ui:VisualElement class="inv-slot" name="slot-1" style="width: 50px; height: 50px; background-color: rgba(0,0,0,0.5); border-width: 1px; border-color: #888; margin-right: 5px; justify-content: center; align-items: center;">
<ui:Label text="1" style="font-size: 8px; opacity: 0.5;" />
</ui:VisualElement>
<ui:VisualElement class="inv-slot" name="slot-2" style="width: 50px; height: 50px; background-color: rgba(0,0,0,0.5); border-width: 1px; border-color: #888; margin-right: 5px; justify-content: center; align-items: center;">
<ui:Label text="2" style="font-size: 8px; opacity: 0.5;" />
</ui:VisualElement>
<ui:VisualElement class="inv-slot" name="slot-3" style="width: 50px; height: 50px; background-color: rgba(0,0,0,0.5); border-width: 1px; border-color: #888; justify-content: center; align-items: center;">
<ui:Label text="3" style="font-size: 8px; opacity: 0.5;" />
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
<!-- Area 5: Game Info (Bottom Center) -->
<ui:VisualElement name="hud-info" style="position: absolute; bottom: 20px; align-self: center; flex-direction: row;">
<ui:Label name="ping-label" text="PING: 20ms" style="color: #888; font-size: 12px; margin-right: 20px;" />
<ui:Label name="fps-label" text="FPS: 60" style="color: #888; font-size: 12px;" />
</ui:VisualElement>
<!-- Interaction Prompt (Center) -->
<ui:VisualElement name="interaction-prompt" style="align-self: center; margin-top: 600px; background-color: rgba(0,0,0,0.6); padding: 10px 20px; border-radius: 20px; border-width: 1px; border-color: white;" display="None">
<ui:Label name="interaction-text" text="Press [E] to Interact" style="color: white; font-size: 20px; -unity-text-align: middle-center;" />
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>