Example #1
0
        public UISimitoneFrontend(TS1GameScreen screen)
        {
            var ui = Content.Get().CustomUI;

            CutBtn                = new UITwoStateButton(ui.Get("cut_btn_down.png").Get(GameFacade.GraphicsDevice));
            CutBtn.X              = screen.ScreenWidth - (256 + 15);
            CutBtn.Y              = 15;
            CutBtn.OnButtonClick += CutButton;
            Add(CutBtn);

            Clock   = new UIClockPanel(screen.vm);
            Clock.X = screen.ScreenWidth - (334 + 15);
            Clock.Y = 15;
            Game    = screen;
            Add(Clock);

            Money          = new UIMoneyPanel(screen);
            Money.Position = new Vector2(15, screen.ScreenHeight - 172);
            Add(Money);

            MainPanel              = new UIMainPanel(screen);
            MainPanel.OnEndSelect += OnEndSelect;
            MainPanel.ModeChanged += ModeChanged;
            Add(MainPanel);

            ExtendPanelBtn = new UIStencilButton(ui.Get("panel_expand.png").Get(GameFacade.GraphicsDevice));
            ExtendPanelBtn.OnButtonClick += ExpandClicked;
            Add(ExtendPanelBtn);

            var mode = new UIModeSwitcher(screen);

            mode.Position     = new Vector2(64 + 15, screen.ScreenHeight - (64 + 15));
            mode.OnModeClick += LiveButtonClicked;
            Add(mode);
            ModeSwitcher = mode;

            ExtendPanelBtn.Position = new Vector2(mode.X + 54, mode.Y - 50);

            MainPanel.X       = 64 + 15;
            MainPanel.Y       = mode.Y - 64;
            MainPanel.Visible = false;

            if (Game.vm.GetGlobalValue(32) > 0)
            {
                MainPanel.SetMode(UIMainPanelMode.BUY);
                ModeSwitcher.EndSwitch(MainPanel.Mode);
                MainPanel.Open();
            }
            else
            {
                FSO.HIT.HITVM.Get().PlaySoundEvent(UIMusic.None);
            }
        }
        public UISimitoneFrontend(TS1GameScreen screen)
        {
            var ui = Content.Get().CustomUI;

            CutBtn                = new UITwoStateButton(ui.Get("cut_btn_down.png").Get(GameFacade.GraphicsDevice));
            CutBtn.X              = screen.ScreenWidth - (256 + 15);
            CutBtn.Y              = 15;
            CutBtn.OnButtonClick += CutButton;
            Add(CutBtn);

            Clock   = new UIClockPanel(screen.vm);
            Clock.X = screen.ScreenWidth - (334 + 15);
            Clock.Y = 15;
            Game    = screen;
            Add(Clock);

            Money          = new UIMoneyPanel(screen);
            Money.Position = new Vector2(15, screen.ScreenHeight - 172);
            Add(Money);

            MainPanel = new UIMainPanel(screen);
            Add(MainPanel);

            ExtendPanelBtn = new UIStencilButton(ui.Get("panel_expand.png").Get(GameFacade.GraphicsDevice));
            ExtendPanelBtn.OnButtonClick += ExpandClicked;
            Add(ExtendPanelBtn);

            var btn = new UILiveButton(screen);

            btn.MotiveLevel    = 0.5f;
            btn.Position       = new Vector2(64 + 15, screen.ScreenHeight - (64 + 15));
            btn.OnButtonClick += LiveButtonClicked;
            Add(btn);
            LiveButton = btn;

            ExtendPanelBtn.Position = new Vector2(btn.X + 54, btn.Y - 50);

            MainPanel.X       = 64 + 15;
            MainPanel.Y       = btn.Y - 64;
            MainPanel.Visible = false;
        }