public LoginScreen() { /** * Scale the whole screen to 1024 */ BackgroundCtnr = new UIContainer(); BackgroundCtnr.ScaleX = BackgroundCtnr.ScaleY = ScreenWidth / 800.0f; /** Background image **/ Background = new UIImage(GetTexture((ulong)FileIDs.UIFileIDs.setup)); Background.ID = "Background"; BackgroundCtnr.Add(Background); var lbl = new UILabel(); lbl.Caption = "Version 1.1097.1.0"; lbl.X = 20; lbl.Y = 558; BackgroundCtnr.Add(lbl); this.Add(BackgroundCtnr); LoginProgress = new UILoginProgress(); LoginProgress.X = (ScreenWidth - (LoginProgress.Width + 20)); LoginProgress.Y = (ScreenHeight - (LoginProgress.Height + 20)); LoginProgress.Opacity = 0.9f; this.Add(LoginProgress); LoginDialog = new UILoginDialog(this); LoginDialog.Opacity = 0.9f; //Center LoginDialog.X = (ScreenWidth - LoginDialog.Width) / 2; LoginDialog.Y = (ScreenHeight - LoginDialog.Height) / 2; this.Add(LoginDialog); }
public LoginScreen() { /** * Scale the whole screen to 1024 */ BackgroundCtnr = new UIContainer(); BackgroundCtnr.ScaleX = BackgroundCtnr.ScaleY = ScreenWidth / 800.0f; /** Background image **/ Background = new UIImage(GetTexture((ulong)FileIDs.UIFileIDs.setup)); Background.ID = "Background"; BackgroundCtnr.Add(Background); var lbl = new UILabel(); lbl.Caption = "Version " + GlobalSettings.Default.ClientVersion; lbl.X = 20; lbl.Y = 558; BackgroundCtnr.Add(lbl); this.Add(BackgroundCtnr); LoginProgress = new UILoginProgress(); LoginProgress.X = (ScreenWidth - (LoginProgress.Width + 20)); LoginProgress.Y = (ScreenHeight - (LoginProgress.Height + 20)); LoginProgress.Opacity = 0.9f; this.Add(LoginProgress); LoginDialog = new UILoginDialog(this); LoginDialog.Opacity = 0.9f; //Center LoginDialog.X = (ScreenWidth - LoginDialog.Width) / 2; LoginDialog.Y = (ScreenHeight - LoginDialog.Height) / 2; this.Add(LoginDialog); NetworkFacade.Controller.OnNetworkError += new NetworkErrorDelegate(Controller_OnNetworkError); NetworkFacade.Controller.OnLoginProgress += new OnProgressDelegate(Controller_OnLoginProgress); NetworkFacade.Controller.OnLoginStatus += new OnLoginStatusDelegate(Controller_OnLoginStatus); }