Files
BABA_YAGA/Assets/UI/Lobby.uxml
2026-05-02 00:00:31 +07:00

119 lines
8.7 KiB
Plaintext

<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
<Style src="project:/Assets/UI/Global.uss" />
<ui:VisualElement name="LobbyRoot" class="screen-root" style="flex-direction: row;">
<!-- Left Pane: 3D Character View -->
<ui:VisualElement name="LeftPane" style="width: 60%; background-color: rgba(0, 0, 0, 0);" />
<!-- Right Pane: UI Content -->
<ui:VisualElement name="RightPane" class="panel-glass--right">
<!-- JOIN VIEW -->
<ui:VisualElement name="JoinContainer" style="flex-grow: 1;">
<ui:Label text="FIND SESSIONS" class="text-heading" />
<ui:TextField name="SearchInput" class="input-field" placeholder-text="Search room by name..." />
<ui:ScrollView name="RoomList" class="scroll-list" style="flex-grow: 1; margin-top: 15px; margin-bottom: 15px;" />
<ui:VisualElement style="flex-direction: row; justify-content: space-between;">
<ui:Button name="BackToMenuBtn" text="BACK" class="button-spring btn-exit" style="width: 48%;" />
<ui:Button name="GoToCreateBtn" text="CREATE NEW" class="button-spring btn-create" style="width: 48%;" />
</ui:VisualElement>
</ui:VisualElement>
<!-- CREATE VIEW -->
<ui:VisualElement name="CreateContainer" style="flex-grow: 1; display: none;">
<ui:Label text="CREATE SESSION" class="text-heading" />
<ui:Label text="ROOM ID (Required)" class="text-label" />
<ui:TextField name="RoomIDInput" class="input-field" placeholder-text="e.g. ROOM_123" />
<ui:Label text="ROOM NAME (Optional)" class="text-label" />
<ui:TextField name="RoomNameInput" class="input-field" placeholder-text="e.g. Pro Match Only" />
<ui:Toggle name="PassToggle" label="REQUIRE PASSWORD" class="text-body" style="margin-top: 10px; margin-bottom: 10px;" />
<ui:TextField name="RoomPassInput" password="true" class="input-field" placeholder-text="Password..." style="display: none;" />
<ui:VisualElement style="flex-grow: 1;" />
<ui:Label name="CreateErrorLabel" text="Failed to create room!" class="text-label" style="color: #ff4444; align-self: center; display: none; margin-bottom: 10px;" />
<ui:VisualElement style="flex-direction: row; justify-content: space-between; margin-top: 20px;">
<ui:Button name="CancelCreateBtn" text="CANCEL" class="button-spring btn-exit" style="width: 48%;" />
<ui:Button name="ConfirmCreateBtn" text="CREATE" class="button-spring btn-join" style="width: 48%;" />
</ui:VisualElement>
</ui:VisualElement>
<!-- LOUNGE VIEW -->
<ui:VisualElement name="LoungeContainer" style="flex-grow: 1; display: none;">
<ui:Label name="LoungeRoomName" text="SESSION NAME" class="text-heading" />
<ui:Label name="LoungeID" text="ID: 12345" class="text-label" style="margin-bottom: 30px;" />
<ui:VisualElement style="flex-direction: row; flex-grow: 1; justify-content: center; align-items: center;">
<!-- HOST SLOT -->
<ui:VisualElement name="HostSlot" class="panel-glass border-create" style="flex-grow: 1; margin: 5px; padding: 15px; align-items: center; position: relative;">
<ui:VisualElement name="HostAvatar" class="border-create" style="width: 80px; height: 80px; border-radius: 40px; background-color: #333; border-width: 2px;" />
<ui:Label name="HostName" text="HOST" class="text-body" style="-unity-font-style: bold; margin-top: 10px;" />
<ui:Label name="HostReadyStatus" text="NOT READY" class="text-label" style="color: #ff4444;" />
<!-- Host Chat Overlay -->
<ui:VisualElement name="HostChatBox" style="position: absolute; bottom: 0; left: 0; right: 0; background-color: rgba(0, 0, 0, 0.5); padding: 5px; display: none;">
<ui:Label name="HostChatMessage" text="..." style="color: white; font-size: 12px; -unity-text-align: middle-center;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:Label text="VS" style="font-size: 48px; -unity-font-style: bold; color: rgba(255, 255, 255, 0.2); margin: 0 20px;" />
<!-- GUEST SLOT -->
<ui:VisualElement name="GuestSlot" class="panel-glass" style="flex-grow: 1; margin: 5px; padding: 15px; align-items: center; position: relative;">
<ui:VisualElement name="GuestAvatar" style="width: 80px; height: 80px; border-radius: 40px; background-color: #333;" />
<ui:Label name="GuestName" text="WAITING..." class="text-body" style="margin-top: 10px; color: #555;" />
<ui:Label name="GuestReadyStatus" text="-" class="text-label" />
<!-- Guest Chat Overlay -->
<ui:VisualElement name="GuestChatBox" style="position: absolute; bottom: 0; left: 0; right: 0; background-color: rgba(0, 0, 0, 0.5); padding: 5px; display: none;">
<ui:Label name="GuestChatMessage" text="..." style="color: white; font-size: 12px; -unity-text-align: middle-center;" />
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
<!-- GLOBAL CHAT INPUT -->
<ui:TextField name="ChatInput" placeholder-text="Press Enter to chat..." style="margin-top: 10px;" />
<ui:Button name="ReadyBtn" text="READY" class="button-spring" style="height: 56px; margin-top: 20px;" />
<ui:Button name="StartBtn" text="START GAME" class="button-spring btn-join" style="height: 64px; margin-top: 10px;" />
<ui:Button name="LeaveLoungeBtn" text="LEAVE ROOM" class="button-spring btn-exit" style="margin-top: 10px;" />
</ui:VisualElement>
</ui:VisualElement>
<!-- PASSWORD OVERLAY -->
<ui:VisualElement name="PasswordOverlay" style="position: absolute; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); justify-content: center; align-items: center; display: none;">
<ui:VisualElement class="panel-glass" style="width: 400px;">
<ui:Label text="PROTECTED SESSION" class="text-subheading" style="align-self: center;" />
<ui:Label text="This room requires a password" class="text-label" style="align-self: center; margin-bottom: 20px;" />
<ui:TextField name="JoinPassInput" password="true" class="input-field" placeholder-text="Enter password..." />
<ui:Label name="JoinPassError" text="Incorrect password!" class="text-label" style="color: #ff4444; margin-bottom: 10px; display: none;" />
<ui:VisualElement style="flex-direction: row; justify-content: space-between; margin-top: 10px;">
<ui:Button name="ClosePassBtn" text="CANCEL" class="button-spring btn-exit" style="width: 48%;" />
<ui:Button name="ConfirmJoinBtn" text="JOIN" class="button-spring btn-join" style="width: 48%;" />
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
<!-- TRANSFER HOST OVERLAY -->
<ui:VisualElement name="TransferHostOverlay" style="position: absolute; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); justify-content: center; align-items: center; display: none;">
<ui:VisualElement class="panel-glass" style="width: 350px; padding: 20px;">
<ui:Label text="TRANSFER LEADERSHIP" class="text-subheading" style="align-self: center;" />
<ui:Label text="Do you want to transfer host privileges to this player?" class="text-label" style="align-self: center; -unity-text-align: middle-center; margin-bottom: 20px; white-space: normal;" />
<ui:VisualElement style="flex-direction: row; justify-content: space-between;">
<ui:Button name="CloseTransferBtn" text="CANCEL" class="button-spring btn-exit" style="width: 48%;" />
<ui:Button name="ConfirmTransferBtn" text="TRANSFER" class="button-spring btn-join" style="width: 48%;" />
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
</ui:VisualElement>
</ui:UXML>