예제 #1
0
        public override void OnInitialize()
        {
            AddElement(_presenter = new SCCMListPresenter
            {
                Alignment        = HUDAlignment.CENTERLEFT,
                RelativePosition = new FPoint(16, 0),
                Size             = new FSize(Width - 16 - 16 - 48 - 16, Height - 16 - 16),
            });

            AddElement(_scrollbar = new SCCMListScrollbar
            {
                Alignment        = HUDAlignment.CENTERRIGHT,
                RelativePosition = new FPoint(16, 0),
                Size             = new FSize(48, Height - 16 - 16),
            });

            AddElement(_waitingCog = new HUDImage
            {
                Alignment        = HUDAlignment.CENTER,
                RelativePosition = FPoint.Zero,
                Image            = Textures.CannonCogBig,
                RotationSpeed    = 0.35f,
                Color            = FlatColors.Clouds,
                Size             = new FSize(192, 192)
            });

            _presenter.Load(QueryData, _scrollbar, _waitingCog, false);
        }
예제 #2
0
        public override void OnInitialize()
        {
            AddElement(_textbox = new HUDSimpleTextBox
            {
                Alignment        = HUDAlignment.TOPLEFT,
                RelativePosition = new FPoint(16, 16),
                Size             = new FSize(Width - 16 - 16 - 64, 64),

                ColorText = Color.Black,
                Font      = Textures.HUDFontRegular,
                FontSize  = 48,

                MaxLength = SCCMLevelData.MaxNameLength,

                BackgroundNormal  = HUDBackgroundDefinition.CreateSimpleOutline(FlatColors.Clouds, Color.Black, HUD.PixelWidth),
                BackgroundFocused = HUDBackgroundDefinition.CreateSimpleOutline(FlatColors.Clouds, Color.Black, HUD.PixelWidth),

                EnterKey = (s, e) => StartSearch(),

                CloseKeyboard = (s, e) => StartSearch(),
            });

            AddElement(new HUDImageButton
            {
                Alignment        = HUDAlignment.TOPRIGHT,
                RelativePosition = new FPoint(16 + HUD.PixelWidth, 16),
                Size             = new FSize(64, 64),

                Image        = Textures.TexHUDButtonIconMagnifier,
                ImagePadding = 8,
                ImageColor   = FlatColors.Asbestos,

                BackgroundNormal  = HUDBackgroundDefinition.CreateSimpleOutline(FlatColors.Clouds, Color.Black, HUD.PixelWidth),
                BackgroundPressed = HUDBackgroundDefinition.CreateSimpleOutline(FlatColors.Concrete, Color.Black, HUD.PixelWidth),

                Click = (s, e) => StartSearch(),
            });

            AddElement(_presenter = new SCCMListPresenter
            {
                Alignment        = HUDAlignment.BOTTOMLEFT,
                RelativePosition = new FPoint(16, 16),
                Size             = new FSize(Width - 16 - 16 - 48 - 16, Height - 16 - 16 - 16 - 64),

                IsVisible = true,
            });

            AddElement(_scrollbar = new SCCMListScrollbar
            {
                Alignment        = HUDAlignment.BOTTOMRIGHT,
                RelativePosition = new FPoint(16, 16),
                Size             = new FSize(48, Height - 16 - 16 - 16 - 64),

                IsVisible = true,
            });

            AddElement(_waitingCog = new HUDImage
            {
                Alignment        = HUDAlignment.CENTER,
                RelativePosition = new FPoint(0, 16 + 32),
                Image            = Textures.CannonCogBig,
                RotationSpeed    = 0.35f,
                Color            = FlatColors.Clouds,
                Size             = new FSize(192, 192),

                IsVisible = false,
            });

            _presenter.Load(QueryData, _scrollbar, _waitingCog);
        }