feat(frontend): Fase 1 + 1.5 — ServerSelect dinamico + Lobby (chars por mundo)

ServerSelect (Fase 1):
- UIServerSelectScreen_Base: subscribe OnRawMessage + C_WORLD_LIST_REQUEST
- WBP_ServerCard instanciado dinamicamente em GridPanel CardContainer (2 cols)
- UIServerCard_Base: SetFromEntry + OnCardPressed delegate + UI_Button_Master
- Push real-time S_WORLD_STATUS_UPDATE (opcode 2062) atualiza card in-place
- FZMMOWorldEntry struct, EZMMOWorldState enum no wire (offline/online/maint)
- Sem hardcap de slots — cards usam toda largura via ColumnFill weights

Lobby/CharSelect (Fase 1.5):
- UIUserLobbyScreen_Base + WBP_UserLobby (WidgetSwitcher: lista + create)
- C_CHAR_LIST_REQUEST filtrado por SelectedWorldId do FlowSubsystem
- UICharCard_Base + WBP_CharCard com Select/Delete + Accept/Cancel quando
  delete agendado; Text_DeleteCountdown atualiza em tempo real (timer 1s)
- UICharacterCreatePage_Base + WBP_CharacterCreate (Name + ComboBox class)
- Handlers S_CHAR_SELECT_OK (handoff parse), CHAR_CREATE_OK/REJECT,
  CHAR_DELETE_ACK/ACCEPT_ACK/CANCEL_ACK (refresh lista)

Auxiliares + fixes:
- ARQUITETURA_SERVER_SELECT.md + ARQUITETURA_CHARACTER_MODEL.md
- UIFrontEndFlowSubsystem: SelectedWorldId state + transicao Lobby
- DA_FrontEndScreenSet: Lobby -> WBP_UserLobby_C
- UICheckBox_Base + UICommonText_Base (componentes auxiliares)
- BSB_Button_Transparent.Disabled DrawAs=IMAGE -> NoDraw (fix bg branco)
- WBP_ServerCard layout: HBox para chips Region/Ping/Status, SizeBox 10x10
  no Dot verde (anti-overflow); SelfHitTestInvisible em containers (hover)
This commit is contained in:
2026-05-21 20:06:23 -03:00
parent 518a346cf5
commit 166650671f
41 changed files with 4060 additions and 78 deletions

View File

@@ -7,6 +7,10 @@
Última actualização: 2026-05-11.
> **Extensões da arquitetura** (documentos normativos paralelos, escopo específico):
> - [`ARQUITETURA_SERVER_SELECT.md`](ARQUITETURA_SERVER_SELECT.md) — Server Select, lista de mundos, handoff CharServer↔WorldServer, multi-region, queue, Valkey. Roadmap em 7 fases.
> - [`ARQUITETURA_CHARACTER_MODEL.md`](ARQUITETURA_CHARACTER_MODEL.md) — Stats primários (STR/AGI/VIT/INT/DEX/LUK), classes (Aprendiz → especializações), fórmulas de stats derivados (ATK/MATK/DEF/...), `jobs.yml` data-driven, stat allocation server-side. Espelha rathena.
> **Sumário de mudanças (2026-05-11):** adicionada secção de **temas sazonais
> de UI** (`UI/Themes/`), com tutorial §4.7, regra de "no hard ref a textura
> em widget" em §5 e política de activação em §1.10.
@@ -211,7 +215,8 @@ Content/
│ │ │ Chat, Party, Guild, Trade, Quest, Map,
│ │ │ Shared, Icons
│ │ ├── Shared/ ← WBPs reutilizáveis (UI_Button_Master,
│ │ │ UI_Panel_Master, UI_Spinner_Master)
│ │ │ UI_Panel_Master, UI_Spinner_Master,
│ │ │ UI_CheckBox_Master, UI_Input_Master)
│ │ ├── FrontEnd/ ← WBP_PrimaryGameLayout, DA_FrontEndScreenSet,
│ │ │ telas refinadas (Boot/Login/… vindas do Forge)
│ │ ├── Fonts/ ← Font_*/FF_* (Cinzel, Rajdhani)
@@ -270,10 +275,15 @@ Source/ZMMO/
│ └── UI/ ← runtime de UI (não é contrato de dados)
│ ├── ZMMOThemeSubsystem.* ← resolução de tema
│ ├── Widgets/ ← UUIButton_Base, UUIPanel_Base,
│ │ UUISpinner_Base
│ │ UUISpinner_Base, UUICheckBox_Base,
│ │ UUIInput_Base (variantes Box/Outline/
│ │ Underline/Search), UUICommonText_Base
│ │ (EUITextRole → FUIStyle.Text)
│ └── FrontEnd/ ← infra de navegação CommonUI:
│ UUIActivatableScreen_Base,
│ UUIBootScreen_Base (1ª tela),
│ UUILoginScreen_Base (2ª tela),
│ CharServerOpcodes.h (faixa 2000-2099),
│ UUIPrimaryGameLayout_Base,
│ UUIManagerSubsystem (LocalPlayer),
│ UUIFrontEndFlowSubsystem (GameInstance),
@@ -634,6 +644,15 @@ CharServer: libera o botão "Iniciar" no `OnConnected`; o clique chama
`UUIFrontEndFlowSubsystem::RequestEnterLogin()` → estado Login. Tela nunca
segura hard-ref de asset de tema (cores via `FUIStyle`; §5).
**Login:** a tela `UUILoginScreen_Base` autentica pelo MESMO WebSocket do
CharServer enviando `C_CHAR_AUTH_REQUEST` (opcode 2000, ver
`CharServerOpcodes.h`) com um token. Escopo atual = **dev**: token `dev:<n>`
aceito pelo `StubTokenValidator` (senha ignorada no stub). `S_CHAR_AUTH_OK`
→ `RequestEnterServerSelect()` → estado ServerSelect; `S_CHAR_AUTH_REJECT`
→ mensagem de erro na própria tela. Auth real (HTTP `/auth/login` + JWT)
fica para tarefa dedicada. "Voltar" → `RequestBack()` (Login→Boot, CharServer
permanece conectado).
1. Prototipar a tela em HTML/CSS em `Tools/Templates/MMO_Widget/` (ou usar os
templates já existentes).
2. Rodar o Zeus UMG Forge (HTML→UMG). Saída crua: `Content/AutoCreated/<batch>/`.