示例#1
0
        public TextInputPanel(string labelText, int x, int y, int w, int h) : base(x, y, w, h)
        {
            Bounds = new System.Drawing.Rectangle(x, y, w, h);

            lblTitle           = new FluidLabel(labelText, 10, 5, w - 20, 30);
            lblTitle.ForeColor = Color.White;
            lblTitle.Anchor    = AnchorBL;
            lblTitle.Font      = Theme.Current.ModalFont;
            Controls.Add(lblTitle);

            txtData           = new FluidTextBox("", 10, 25, w - 20, 30);
            txtData.ForeColor = Color.Black;
            txtData.Anchor    = AnchorBL;
            txtData.Font      = Theme.Current.ModalFont;
            Controls.Add(txtData);

            btnOK              = new FluidButton("OK", 10, 65, 80, 32);
            btnOK.BackColor    = Color.Green;
            btnOK.GradientFill = Theme.Current.ButtonsGradianted;
            btnOK.Font         = Theme.Current.ButtonFont;
            btnOK.Anchor       = AnchorBL;
            btnOK.Click       += new EventHandler(btnOK_click);
            Controls.Add(btnOK);

            btnKeyboard           = new FluidButton("", 100, 65, 40, 32);
            btnKeyboard.Image     = Resources.keyboard;
            btnKeyboard.BackColor = Color.White;
            btnKeyboard.Click    += new EventHandler(btnKeyboard_Click);
            btnKeyboard.Anchor    = AnchorBL;
            Controls.Add(btnKeyboard);

            btnCancel              = new FluidButton("Cancel", 150, 65, 80, 32);
            btnCancel.BackColor    = Color.Red;
            btnCancel.GradientFill = Theme.Current.ButtonsGradianted;
            btnCancel.Anchor       = AnchorBL;
            btnCancel.Click       += new EventHandler(btnCancel_click);
            Controls.Add(btnCancel);

            modalBackground = new ModalBackground();
            modalBackground.ShowMaximized();
            Anchor = AnchorAll;

            Show();
        }
        private void Start()
        {
            Service.Get <ICPSwrveService>().Funnel(Service.Get <MembershipService>().AccountFunnelName, "16", "restore_membership_success");
            ModalBackground component = GetComponent <ModalBackground>();

            component.enabled = true;
            PenguinName.text  = string.Format(PenguinName.text, Service.Get <SessionManager>().LocalUser.RegistrationProfile.DisplayName);
            if (!(SceneManager.GetActiveScene().name == "Boot"))
            {
                avatarRenderer = GetComponentInChildren <AvatarRenderTextureComponent>();
                CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();
                DataEntityHandle       localPlayerHandle      = cPDataEntityCollection.LocalPlayerHandle;
                AvatarAnimationFrame   avatarFrame            = new AvatarAnimationFrame("Base Layer.Interactions.PassPortPoses_CelebrateAnimation", 0f);
                if (cPDataEntityCollection.TryGetComponent <AvatarDetailsData>(localPlayerHandle, out var component2))
                {
                    avatarRenderer.RenderAvatar(component2, avatarFrame);
                }
                else
                {
                    avatarRenderer.RenderAvatar(new DCustomEquipment[0], avatarFrame);
                }
            }
        }