Beispiel #1
0
        public OptionsStateBase(GuiPanoramaSkyBox skyBox)
        {
            _skyBox          = skyBox;
            _optionsProvider = GetService <IOptionsProvider>();

            Footer.AddChild(new GuiBackButton()
            {
                TranslationKey = "gui.done",
                Anchor         = Alignment.TopFill,
                Modern         = false
            });

            Background = new GuiTexture2D(_skyBox, TextureRepeatMode.Stretch);
        }
Beispiel #2
0
        public DisconnectedScreen()
        {
            TitleTranslationKey = "multiplayer.disconnect.generic";

            Body.ChildAnchor = Alignment.MiddleCenter;
            Body.AddChild(DisconnectedTextElement = new GuiTextElement()
            {
                Text      = Reason,
                TextColor = TextColor.Red,
                Anchor    = Alignment.MiddleCenter
            });

            Footer.AddChild(new GuiButton(MenuButtonClicked)
            {
                TranslationKey = "gui.toTitle",
                Anchor         = Alignment.MiddleCenter,
                Modern         = false
            });
        }
Beispiel #3
0
        private void Initialize()
        {
            _playerProfileService = GetService <IPlayerProfileService>();
            _playerProfileService.Authenticate += PlayerProfileServiceOnAuthenticate;

            base.HeaderTitle.Anchor    = Alignment.MiddleCenter;
            base.HeaderTitle.FontStyle = FontStyle.Bold | FontStyle.DropShadow;
            Footer.ChildAnchor         = Alignment.MiddleCenter;
            GuiTextElement t;

            Footer.AddChild(t = new GuiTextElement()
            {
                Text      = "We are NOT in anyway or form affiliated with Mojang/Minecraft or Microsoft!",
                TextColor = TextColor.Yellow,
                Scale     = 1f,
                FontStyle = FontStyle.DropShadow,

                Anchor = Alignment.MiddleCenter
            });

            GuiTextElement info;

            Footer.AddChild(info = new GuiTextElement()
            {
                Text = "We will never collect/store or do anything with your data.",

                TextColor = TextColor.Yellow,
                Scale     = 0.8f,
                FontStyle = FontStyle.DropShadow,

                Anchor  = Alignment.MiddleCenter,
                Padding = new Thickness(0, 5, 0, 0)
            });

            Body.BackgroundOverlay = new Color(Color.Black, 0.5f);
            Body.ChildAnchor       = Alignment.MiddleCenter;

            Body.AddChild(_authCodeElement);
            //ShowCode();

            if (CanUseClipboard)
            {
                AddGuiElement(new GuiTextElement()
                {
                    Text = $"If you click Sign-In, the above auth code will be copied to your clipboard!"
                });
            }

            var buttonRow = AddGuiRow(LoginButton = new GuiButton(OnLoginButtonPressed)
            {
                AccessKey = Keys.Enter,

                Text    = "Sign-In with Xbox",
                Margin  = new Thickness(5),
                Modern  = false,
                Width   = 100,
                Enabled = ConnectResponse != null
            }, new GuiButton(OnCancelButtonPressed)
            {
                AccessKey = Keys.Escape,

                TranslationKey = "gui.cancel",
                Margin         = new Thickness(5),
                Modern         = false,
                Width          = 100
            });

            buttonRow.ChildAnchor = Alignment.MiddleCenter;
        }
Beispiel #4
0
        private void Initialize()
        {
            base.HeaderTitle.Anchor    = Alignment.MiddleCenter;
            base.HeaderTitle.FontStyle = FontStyle.Bold | FontStyle.DropShadow;
            Footer.ChildAnchor         = Alignment.MiddleCenter;
            GuiTextElement t;

            Footer.AddChild(t = new GuiTextElement()
            {
                Text      = "We are NOT in anyway or form affiliated with Mojang/Minecraft or Microsoft!",
                TextColor = TextColor.Yellow,
                Scale     = 1f,
                FontStyle = FontStyle.DropShadow,

                Anchor = Alignment.MiddleCenter
            });

            GuiTextElement info;

            Footer.AddChild(info = new GuiTextElement()
            {
                Text = "We will never collect/store or do anything with your data.",

                TextColor = TextColor.Yellow,
                Scale     = 0.8f,
                FontStyle = FontStyle.DropShadow,

                Anchor  = Alignment.MiddleCenter,
                Padding = new Thickness(0, 5, 0, 0)
            });

            /*
             *  "We will never collect/store or do anything with your data.\n" +
             *                 "You can read more about the authentication method we use on here: https://wiki.vg/Authentication"
             */
            Body.BackgroundOverlay = new Color(Color.Black, 0.5f);
            Body.ChildAnchor       = Alignment.MiddleCenter;

            var usernameRow = AddGuiRow(new GuiTextElement()
            {
                Text   = "Username:"******"Username...",
                Margin      = new Thickness(5),
            });

            usernameRow.ChildAnchor = Alignment.MiddleCenter;

            var passwordRow = AddGuiRow(new GuiTextElement()
            {
                Text   = "Password:"******"Password...",
                Margin          = new Thickness(5),
                IsPasswordInput = true
            });

            passwordRow.ChildAnchor = Alignment.MiddleCenter;

            var buttonRow = AddGuiRow(LoginButton = new GuiButton(OnLoginButtonPressed)
            {
                AccessKey = Keys.Enter,

                Text   = "Login",
                Margin = new Thickness(5),
                Modern = false,
                Width  = 100
            }, new GuiButton(OnCancelButtonPressed)
            {
                AccessKey = Keys.Escape,

                TranslationKey = "gui.cancel",
                Margin         = new Thickness(5),
                Modern         = false,
                Width          = 100
            });

            buttonRow.ChildAnchor = Alignment.MiddleCenter;

            AddGuiElement(ErrorMessage = new GuiTextElement()
            {
                TextColor = TextColor.Yellow
            });

            Initialized();
        }