// OT-MMO (22-oct): ventana de entrada con los componentes base (guía A.5). Columna única con layout vertical: // los campos de servidor/versión/puerto siguen existiendo (entergame.lua los usa por id) pero ocultos, y el // layout salta los ocultos. Todos los hijos deben ser hijos directos (entergame.lua usa getChildById). EnterGameWindow < MainWindow !text: tr('Iniciar sesión') width: 352 layout: type: verticalBox fit-children: true EnterGameButton < Button width: 64 ServerListButton < UIButton size: 17 17 image-source: /images/topbuttons/minimap image-color: #ffffffff $hover !disabled: image-color: #ffffff99 $pressed: image-color: #ffffff44 $disabled: image-color: #ffffff55 EnterGameWindow id: enterGame &authenticatorEnabled: false &authenticatorHeight: 44 &stayLoggedBoxEnabled: false &stayLoggedBoxHeight: 24 @onEnter: EnterGame.doLogin() FieldLabel id: emailLabel !text: tr('Email') GameInput id: accountNameTextEdit margin-top: 4 FieldLabel id: passwordLabel !text: tr('Contraseña') margin-top: 12 GamePasswordInput id: accountPasswordTextEdit margin-top: 4 CheckBox id: rememberEmailBox !text: tr('Recordar email') !tooltip: tr('Guarda solo el email en este navegador. La contraseña no se guarda.') height: 16 margin-top: 12 @onCheckChange: | self:getParent():getChildById('autoLoginBox'):setEnabled(self:isChecked()) UIWidget id: rememberEmailTip visible: false UIButton id: Forgot_password_email !text: tr('Olvidé mi contraseña') visible: false height: 16 margin-top: 8 ttf-font: $otmmo-font ttf-font-size: $otmmo-size-sm color: $otmmo-text-2 text-align: left @onClick: g_platform.openUrl(Services.websites) @onSetup: | self:setVisible(Services and Services.websites and true or false) CheckBox id: stayLoggedBox !text: tr('Mantener la sesión') height: 16 margin-top: 8 visible: false $on: visible: true MenuLabel id: serverLabel !text: tr('Servidor') margin-top: 12 height: 16 TextEdit id: serverHostTextEdit height: 22 margin-top: 4 ServerListButton id: serverListButton !tooltip: tr('Lista de servidores') margin-top: 4 @onClick: EnterGame.showServerList() MenuLabel id: clientLabel !text: tr('Versión del cliente') height: 16 margin-top: 8 ComboBox id: clientComboBox margin-top: 4 menu-scroll: true menu-height: 125 menu-scroll-step: 25 MenuLabel id: portLabel !text: tr('Puerto') height: 16 margin-top: 8 TextEdit id: serverPortTextEdit text: 7171 height: 22 margin-top: 4 CheckBox id: autoLoginBox enabled: false visible: false !text: tr('Entrar automáticamente') CheckBox id: httpLoginBox !text: tr('Login por HTTP') !tooltip: tr('Si falla el login por HTTPS (cifrado), prueba por HTTP (sin cifrar)') height: 16 margin-top: 8 FieldError id: serverInfoLabel visible: false margin-top: 8 color: $otmmo-text-2 PrimaryButton id: botonIngresar !text: tr('Ingresar') height: 32 margin-top: 16 ttf-font-size: $otmmo-size-md @onClick: EnterGame.doLogin() HorizontalSeparator id: sepCuenta margin-top: 16 FieldLabel id: sinCuenta !text: tr('¿Primera vez en Valdren?') margin-top: 12 @onSetup: | self:setVisible(Services and Services.createAccount and true or false) Button id: btnCreateNewAccount !text: tr('Crear cuenta') height: 28 margin-top: 8 @onClick: | self:disable() createWidgetAccount() @onSetup: | if Services and Servers_init and table.size(Servers_init) == 1 and Services.createAccount then self:setVisible(true) else self:setVisible(false) end