Created
January 19, 2014 19:43
-
-
Save moscoquera/8510013 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void generarUI() { | |
W8KeyboardManager.clearLayout(); //por seguridad | |
posPanelCentral = new SGUIComponent(); //el panel central, contiene todo el formulario | |
//la posicion inicial es relativa a la pantalla ya que no tiene padre | |
posPanelCentral.Position = new Rect((Screen.width - anchoPanelCentral) / 2, (Screen.height - altoPanelCentral) / 4, anchoPanelCentral, altoPanelCentral); | |
posGrupoPuntaje = new SGUIComponent(); // un grupo que contiene la información del puntaje, no era necesario, pero sirve para explicar | |
posGrupoPuntaje.Parent = posPanelCentral; //ahora posGrupoPuntaje esta dentro de posPanelCentral | |
posGrupoPuntaje.Position = new Rect(10, 10, posPanelCentral.Position.width - 20, 80); //la posicion en relativa a posPanelCentral | |
posGrupoNombre = new SGUIComponent(); //grupo que contiene el verdadero formulario | |
posGrupoNombre.Parent = posPanelCentral; | |
posGrupoNombre.Position = new Rect(10, posGrupoPuntaje.Position.yMax + 10, posPanelCentral.Position.width - 20, 100); | |
CampoNombre = new STextField(); //el unico campo del formulario | |
CampoNombre.Parent = posGrupoNombre; //el campo pertenece a grupoNombre | |
W8KeyboardManager.fields.Add(CampoNombre); //añado el campo del formulario al plugin. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment