//Init public ForgotPasswordWindow(Canvas parent, MainMenu mainMenu, ImagePanel parentPanel) { //Assign References mMainMenu = mainMenu; //Main Menu Window mResetWindow = new ImagePanel(parent, "ForgotPasswordWindow"); mResetWindow.IsHidden = true; //Menu Header mWindowHeader = new Label(mResetWindow, "Header"); mWindowHeader.SetText(Strings.ForgotPass.title); mInputBackground = new ImagePanel(mResetWindow, "InputPanel"); //Login Username Label mInputLabel = new Label(mInputBackground, "InputLabel"); mInputLabel.SetText(Strings.ForgotPass.label); //Login Username Textbox mInputTextbox = new TextBox(mInputBackground, "InputField"); mInputTextbox.SubmitPressed += Textbox_SubmitPressed; mInputTextbox.Clicked += Textbox_Clicked; mHintLabelTemplate = new Label(mResetWindow, "HintLabel"); mHintLabelTemplate.IsHidden = true; //Login - Send Login Button mSubmitBtn = new Button(mResetWindow, "SubmitButton"); mSubmitBtn.SetText(Strings.ForgotPass.submit); mSubmitBtn.Clicked += SubmitBtn_Clicked; //Login - Back Button mBackBtn = new Button(mResetWindow, "BackButton"); mBackBtn.SetText(Strings.ForgotPass.back); mBackBtn.Clicked += BackBtn_Clicked; mResetWindow.LoadJsonUi(GameContentManager.UI.Menu, Graphics.Renderer.GetResolutionString()); mHintLabel = new RichLabel(mResetWindow); mHintLabel.SetBounds(mHintLabelTemplate.Bounds); mHintLabelTemplate.IsHidden = false; mHintLabel.AddText( Strings.ForgotPass.hint, mHintLabelTemplate.TextColor, mHintLabelTemplate.CurAlignments.Count > 0 ? mHintLabelTemplate.CurAlignments[0] : Alignments.Left, mHintLabelTemplate.Font ); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); RichLabel label = new RichLabel(this); label.SetBounds(10, 10, 400, 200); f1 = new Font("Arial", 15); label.AddText("This test uses Arial 15, White. Padding. ", Color.White, f1); f2 = new Font("Times New Roman Bold", 20); label.AddText("This text uses Times New Roman Bold 20, Pink. Padding. ", Color.Pink, f2); f3 = new Font("Courier New Italic", 15); label.AddText("This text uses Courier New Italic 15, Yellow. Padding. ", Color.Yellow, f3); label.AddLineBreak(); label.AddText("This test uses Arial 15, Cyan. Padding. ", Color.Cyan * 1.2, f1); }