public UIRelationshipSubpanel(TS1GameScreen game) : base(game) { var ui = Content.Get().CustomUI; ScrollView = new UITouchScroll(() => { return(Items?.Count ?? 0); }, DisplayProvider); ScrollView.X = 148; ScrollView.ItemWidth = 90; ScrollView.Size = new Vector2(582, 128); Add(ScrollView); FriendButton = new UITwoStateButton(ui.Get("rel_friend.png").Get(GameFacade.GraphicsDevice)); FriendButton.Position = new Vector2(21, 9); FriendButton.OnButtonClick += (b) => { ChangeCat(0); }; Add(FriendButton); FamButton = new UITwoStateButton(ui.Get("rel_fam.png").Get(GameFacade.GraphicsDevice)); FamButton.Position = new Vector2(81, 9); FamButton.OnButtonClick += (b) => { ChangeCat(1); }; Add(FamButton); AllButton = new UITwoStateButton(ui.Get("rel_all.png").Get(GameFacade.GraphicsDevice)); AllButton.Position = new Vector2(21, 69); AllButton.OnButtonClick += (b) => { ChangeCat(-1); }; Add(AllButton); FameButton = new UITwoStateButton(ui.Get("rel_fame.png").Get(GameFacade.GraphicsDevice)); FameButton.Position = new Vector2(81, 69); FameButton.OnButtonClick += (b) => { ChangeCat(2); }; Add(FameButton); ChangeCat(-1); }
public UISwitchAvatarPanel(TS1GameScreen screen) { Game = screen; Bg = Content.Get().CustomUI.Get("pswitch_bg.png").Get(GameFacade.GraphicsDevice); var familyMembers = Game.vm.Context.ObjectQueries.Avatars.Where(x => ((VMAvatar)x).GetPersonData(FSO.SimAntics.Model.VMPersonDataVariable.TS1FamilyNumber) == (Game.vm.CurrentFamily.ChunkID)); int i = 0; foreach (var fam in familyMembers) { var btn = new UIAvatarSelectButton(UIIconCache.GetObject(fam)); if (fam.PersistID > 0) { btn.Outlined = true; } btn.Opacity = 0f; var id = fam.ObjectID; btn.OnButtonClick += (b) => { Select(id); }; btn.Y = 64; GameFacade.Screens.Tween.To(btn, 0.3f, new Dictionary <string, float>() { { "X", 185 + (i++) * 100 }, { "Opacity", 1f } }, TweenQuad.EaseOut); Add(btn); } }
public UISwitchAvatarPanel(TS1GameScreen screen) { Game = screen; Bg = Content.Get().CustomUI.Get("pswitch_bg.png").Get(GameFacade.GraphicsDevice); var familyMembers = Game.vm.Context.ObjectQueries.Avatars.Where(x => Game.vm.TS1State.CurrentFamily.RuntimeSubset.Contains(x.Object.OBJ.GUID)); int i = 0; foreach (var fam in familyMembers) { var btn = new UIAvatarSelectButton(UIIconCache.GetObject(fam)); btn.Name = fam.Name; if (fam.PersistID > 0) { btn.Outlined = true; } btn.Opacity = 0f; var id = fam.ObjectID; btn.OnButtonClick += (b) => { Select(id); }; btn.Y = 54; GameFacade.Screens.Tween.To(btn, 0.3f, new Dictionary <string, float>() { { "X", 185 + (i++) * 100 }, { "Opacity", 1f } }, TweenQuad.EaseOut); Add(btn); } }
public UIInventorySubpanel(TS1GameScreen game) : base(game) { var ui = Content.Get().CustomUI; ScrollView = new UITouchScroll(() => { return(Items?.Count ?? 0); }, DisplayProvider); ScrollView.X = 148; ScrollView.ItemWidth = 90; ScrollView.Size = new Vector2(582, 128); Add(ScrollView); MagicButton = new UITwoStateButton(ui.Get("inv_mag_btn.png").Get(GameFacade.GraphicsDevice)); MagicButton.Position = new Vector2(21, 9); MagicButton.OnButtonClick += (b) => { ChangeCat(7); }; Add(MagicButton); IngButton = new UITwoStateButton(ui.Get("inv_ing_btn.png").Get(GameFacade.GraphicsDevice)); IngButton.Position = new Vector2(81, 9); IngButton.OnButtonClick += (b) => { ChangeCat(8); }; Add(IngButton); OtherButton = new UITwoStateButton(ui.Get("inv_other_btn.png").Get(GameFacade.GraphicsDevice)); OtherButton.Position = new Vector2(21, 69); OtherButton.OnButtonClick += (b) => { ChangeCat(-1); }; Add(OtherButton); ChangeCat(-1); }
public UILiveButton(TS1GameScreen screen) : base(Content.Get().CustomUI.Get("plumb_bg.png").Get(GameFacade.GraphicsDevice)) { var ui = Content.Get().CustomUI; PlumbPlus = ui.Get("plumb_plus.png").Get(GameFacade.GraphicsDevice); PlumbNeg = ui.Get("plumb_neg.png").Get(GameFacade.GraphicsDevice); SwitchIcon = ui.Get("mode_live.png").Get(GameFacade.GraphicsDevice); Game = screen; }
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 UISubpanel(TS1GameScreen game) : base() { Opacity = 0; var screenWidth = GameFacade.Screens.CurrentUIScreen.ScreenWidth; Size = new Vector2(screenWidth - 342, 128); GameFacade.Screens.Tween.To(this, 0.3f, new Dictionary <string, float>() { { "Opacity", 1f } }); Game = game; }
public UIPersonalitySubpanel(TS1GameScreen game) : base(game) { Skills = new UISkillDisplay[5]; for (int i = 0; i < 5; i++) { Skills[i] = new UISkillDisplay(); Skills[i].Position = new Vector2(334 + (i % 3) * 140, 35 + 60 * (i / 3)); Add(Skills[i]); var name = new UILabel(); name.Caption = SkillNames[i]; name.Position = new Vector2(332 + (i % 3) * 140, 11 + 60 * (i / 3)); InitLabel(name); } }
public UIMoneyPanel(TS1GameScreen game) : base() { Game = game; LastMoney = GetMoney(); MoneyLabel = new UILabel(); MoneyLabel.CaptionStyle = MoneyLabel.CaptionStyle.Clone(); MoneyLabel.CaptionStyle.Size = 15; MoneyLabel.CaptionStyle.Color = UIStyle.Current.Text; MoneyLabel.Alignment = FSO.Client.UI.Framework.TextAlignment.Center | FSO.Client.UI.Framework.TextAlignment.Middle; MoneyLabel.Size = new Microsoft.Xna.Framework.Vector2(128, 24); Add(MoneyLabel); Bg = Content.Get().CustomUI.Get("money_bg.png").Get(GameFacade.GraphicsDevice); UpdateMoneyDisplay(); }
public static void EnterGameMode(string lotName, bool external) { GameThread.NextUpdate((x) => { var screen = new TS1GameScreen(); var last = GameFacade.Screens.CurrentUIScreen; GameFacade.Screens.RemoveCurrent(); GameFacade.Screens.AddScreen(screen); ((LoadingScreen)last).Close(); var children = new List <UIElement>(last.GetChildren()); for (int i = 0; i < children.Count; i++) { last.Remove(children[i]); screen.Add(children[i]); } screen.Initialize(lotName, external); }); }
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; }
public UIMotiveSubpanel(TS1GameScreen game) : base(game) { MotiveDisplays = new UIMotiveBar[8]; for (int i = 0; i < 8; i++) { var d = new UIMotiveBar(); d.Position = new Vector2(17 + (i % 4) * 180, 36 + (i / 4) * 60); Add(d); MotiveDisplays[i] = d; var l = new UILabel(); l.CaptionStyle = l.CaptionStyle.Clone(); l.CaptionStyle.Size = 15; l.CaptionStyle.Color = UIStyle.Current.Text; l.Alignment = FSO.Client.UI.Framework.TextAlignment.Bottom; l.Size = new Vector2(1); l.Position = new Vector2(17 + (i % 4) * 180, 30 + (i / 4) * 60); l.Caption = GameFacade.Strings.GetString("f102", (i + 1).ToString()); Add(l); } }
public UIBuyBrowsePanel(TS1GameScreen screen, sbyte category, UICatalogMode mode) : base(screen) { CatContainer = new UITouchScroll(() => FilterCategory?.Count() ?? 0, CatalogElemProvider); CatContainer.ItemWidth = 90; CatContainer.DrawBounds = false; CatContainer.Margin = 15; CatContainer.SetScroll(-15); CatContainer.Size = new Vector2(775, 128); Category = category; Add(CatContainer); Mode = mode; GameResized(); InitCategory(category, false); screen.LotControl.ObjectHolder.OnPickup += ObjectHolder_OnPickup; screen.LotControl.ObjectHolder.OnPutDown += ObjectHolder_OnPutDown; screen.LotControl.ObjectHolder.OnDelete += ObjectHolder_OnDelete; HoldingEvents = true; }
public UIModeSwitcher(TS1GameScreen screen) { Game = screen; var ui = Content.Get().CustomUI; var btn = new UILiveButton(screen); btn.MotiveLevel = 0.5f; btn.Position = Vector2.Zero; btn.OnButtonClick += (b) => { SwitchMode(UIMainPanelMode.LIVE); }; Add(btn); LiveButton = btn; BuildButton = new UIElasticButton(ui.Get("mode_build.png").Get(GameFacade.GraphicsDevice)); BuildButton.Position = btn.Position; BuildButton.OnButtonClick += (b) => { SwitchMode(UIMainPanelMode.BUILD); }; BuildButton.Opacity = 0; Add(BuildButton); BuyButton = new UIElasticButton(ui.Get("mode_buy.png").Get(GameFacade.GraphicsDevice)); BuyButton.Position = btn.Position; BuyButton.OnButtonClick += (b) => { SwitchMode(UIMainPanelMode.BUY); }; BuyButton.Opacity = 0; Add(BuyButton); OptionButton = new UIElasticButton(ui.Get("mode_options.png").Get(GameFacade.GraphicsDevice)); OptionButton.Position = btn.Position; OptionButton.OnButtonClick += (b) => { SwitchMode(UIMainPanelMode.OPTIONS); }; OptionButton.Opacity = 0; Add(OptionButton); ButtonOrder = new UIButton[] { LiveButton, BuyButton, BuildButton, OptionButton }; UpdateBuildBuy(); }
public static void EnterGameMode(string lotName, bool external) { GameThread.NextUpdate((x) => { var mode = NeighSelectionMode.Normal; if (lotName.Length > 1 && lotName[0] == '!') { switch (lotName[1]) { case 'n': mode = NeighSelectionMode.MoveIn; break; case 'm': mode = NeighSelectionMode.MoveInMagic; break; } } var screen = new TS1GameScreen(mode); if (mode != NeighSelectionMode.Normal) { screen.StartMoveIn(int.Parse(lotName.Substring(2))); } var last = GameFacade.Screens.CurrentUIScreen; GameFacade.Screens.RemoveCurrent(); GameFacade.Screens.AddScreen(screen); var load = (last as LoadingScreen); if (load != null) { load.Close(); var children = new List <UIElement>(last.GetChildren()); for (int i = 0; i < children.Count; i++) { last.Remove(children[i]); screen.Add(children[i]); } } screen.Initialize(lotName, external); }); }
public UIJobSubpanel(TS1GameScreen game) : base(game) { PerformanceTitle = new UILabel(); PerformanceTitle.Caption = "Performance"; PerformanceTitle.Position = new Vector2(79, 16); InitLabel(PerformanceTitle); PerformanceBar = new UIMotiveBar(); PerformanceBar.Position = new Vector2(79, 41); DynamicOverlay.Add(PerformanceBar); JobTitle = new UILabel(); JobTitle.Caption = "Subway Musician"; JobTitle.Position = new Vector2(18, 71); InitLabel(JobTitle); SalaryTitle = new UILabel(); SalaryTitle.Caption = "Salary: §90"; SalaryTitle.Position = new Vector2(18, 94); InitLabel(SalaryTitle); SalaryTitle.CaptionStyle.Color = UIStyle.Current.BtnActive; CareerButton = new UITwoStateButton(Content.Get().CustomUI.Get("blank_blue.png").Get(GameFacade.GraphicsDevice)); CareerButton.Position = new Vector2(20, 15); Add(CareerButton); Skills = new UISkillDisplay[6]; for (int i = 0; i < 6; i++) { Skills[i] = new UISkillDisplay(); Skills[i].Position = new Vector2(334 + (i % 3) * 140, 35 + 60 * (i / 3)); Add(Skills[i]); var name = new UILabel(); name.Caption = SkillNames[i]; name.Position = new Vector2(332 + (i % 3) * 140, 11 + 60 * (i / 3)); InitLabel(name); } }
public UIButtonSubpanel(TS1GameScreen game, UICatFunc[] funcs) : base(game) { for (int i = 0; i < funcs.Length; i++) { var func = funcs[i]; var label = new UILabel(); label.Caption = func.Name; label.Alignment = TextAlignment.Middle | TextAlignment.Center; label.Wrapped = true; label.Position = new Vector2(-77, 106); label.Size = new Vector2(120, 1); label.CaptionStyle = label.CaptionStyle.Clone(); label.CaptionStyle.Size = 12; label.CaptionStyle.Color = UIStyle.Current.Text; Add(label); var subbutton = new UICatButton(Content.Get().CustomUI.Get(func.IconName).Get(GameFacade.GraphicsDevice)); subbutton.OnButtonClick += (btn) => { func.Func(); }; subbutton.Position = new Vector2(-50, 16); Add(subbutton); GameFacade.Screens.Tween.To(label, 0.5f, new Dictionary <string, float>() { { "X", 50 + i * 120f - 27 } }, TweenQuad.EaseOut); GameFacade.Screens.Tween.To(subbutton, 0.5f, new Dictionary <string, float>() { { "X", 50 + i * 120f } }, TweenQuad.EaseOut); GameFacade.Screens.Tween.To(this, 0.5f, new Dictionary <string, float>() { { "InitShow", 1f } }, TweenQuad.EaseOut); } InitShow = InitShow; }
public UIMainPanel(TS1GameScreen game) : base() { Game = game; Diag = new UIDiagonalStripe(new Point(0, 128), UIDiagonalStripeSide.RIGHT, UIStyle.Current.Bg); Add(Diag); WhitePx = TextureGenerator.GetPxWhite(GameFacade.GraphicsDevice); var ui = Content.Get().CustomUI; Div = ui.Get("panel_div.png").Get(GameFacade.GraphicsDevice); FloorUpBtn = new UIStencilButton(ui.Get("level_up.png").Get(GameFacade.GraphicsDevice)); FloorUpBtn.Position = new Vector2(80, 10); FloorUpBtn.OnButtonClick += (b) => { if (Game.Level < 5) { Game.Level++; } }; Add(FloorUpBtn); FloorDownBtn = new UIStencilButton(ui.Get("level_down.png").Get(GameFacade.GraphicsDevice)); FloorDownBtn.Position = new Vector2(80, 68); FloorDownBtn.OnButtonClick += (b) => { if (Game.Level > 1) { Game.Level--; } }; Add(FloorDownBtn); FloorLabel = new UILabel(); FloorLabel.CaptionStyle = FloorLabel.CaptionStyle.Clone(); FloorLabel.CaptionStyle.Size = 15; FloorLabel.CaptionStyle.Color = UIStyle.Current.Text; FloorLabel.Alignment = TextAlignment.Middle | TextAlignment.Center; FloorLabel.Position = new Vector2(80, 64); FloorLabel.Size = new Vector2(51, 18); FloorLabelShadow = new UILabel(); FloorLabelShadow.CaptionStyle = FloorLabel.CaptionStyle.Clone(); FloorLabelShadow.Alignment = TextAlignment.Middle | TextAlignment.Center; FloorLabelShadow.Position = new Vector2(83, 67); FloorLabelShadow.Size = new Vector2(51, 18); FloorLabelShadow.CaptionStyle.Color = Color.Black * 0.5f; Add(FloorLabelShadow); Add(FloorLabel); HideButton = new UIStencilButton(ui.Get("panel_hide.png").Get(GameFacade.GraphicsDevice)); HideButton.X = Game.ScreenWidth - (50 + 64 + 15); HideButton.Y = 26; HideButton.OnButtonClick += (b) => { Close(); }; Add(HideButton); Divider = new UIImage(ui.Get("divider.png").Get(GameFacade.GraphicsDevice)); Divider.Position = new Vector2(146, 29); Add(Divider); Switcher = new UICategorySwitcher(); Switcher.Position = new Vector2(164, 0); Switcher.InitCategories(LiveCategories); Switcher.OnCategorySelect += Switcher_OnCategorySelect; Switcher.OnOpen += Switcher_OnOpen; Add(Switcher); foreach (var fade in GetFadeables()) { fade.Opacity = 0; } Game.LotControl.QueryPanel.Position = new Vector2(53, -5); Add(Game.LotControl.QueryPanel); Game.LotControl.PickupPanel.Opacity = 0; Add(Game.LotControl.PickupPanel); CurWidth = 0; }
public UIDesktopUCP(TS1GameScreen screen) { Game = screen; var ui = Content.Get().CustomUI; var gd = GameFacade.GraphicsDevice; var sDir = new Vector3(0, 2, 0.5f); Background = new UIImage(ui.Get("d_live_bg.png").Get(gd)); Add(Background); FriendIcon = new UIImage(ui.Get("d_live_friend.png").Get(gd)) { Position = new Vector2(156, 186) }; Add(FriendIcon); Add(LiveButton = new UIButton(ui.Get("d_live_live.png").Get(gd)) { Position = new Vector2(15, 2) }); Add(BuyButton = new UIButton(ui.Get("d_live_buy.png").Get(gd)) { Position = new Vector2(107, 27) }); Add(BuildButton = new UIButton(ui.Get("d_live_build.png").Get(gd)) { Position = new Vector2(179, 80) }); Add(OptionsButton = new UIButton(ui.Get("d_live_opt.png").Get(gd)) { Position = new Vector2(242, 165) }); Add(FloorUpButton = new UIStencilButton(ui.Get("d_live_floorup.png").Get(gd)) { Position = new Vector2(16, 150), Shadow = true, ShadowParam = sDir }); Add(FloorDownButton = new UIStencilButton(ui.Get("d_live_floordown.png").Get(gd)) { Position = new Vector2(16, 192), Shadow = true, ShadowParam = sDir }); Add(RoofButton = new UIStencilButton(ui.Get("d_live_w1.png").Get(gd)) { Position = new Vector2(15, 111), Shadow = true, ShadowParam = sDir }); Add(WallsUpButton = new UIStencilButton(ui.Get("d_live_w2.png").Get(gd)) { Position = new Vector2(50, 107), Shadow = true, ShadowParam = sDir }); Add(WallsCutButton = new UIStencilButton(ui.Get("d_live_w3.png").Get(gd)) { Position = new Vector2(86, 112), Shadow = true, ShadowParam = sDir }); Add(WallsDownButton = new UIStencilButton(ui.Get("d_live_w4.png").Get(gd)) { Position = new Vector2(117, 122), Shadow = true, ShadowParam = sDir }); Add(ZoomInButton = new UIStencilButton(ui.Get("d_live_zoomp.png").Get(gd)) { Position = new Vector2(87, 154) }); Add(ZoomOutButton = new UIStencilButton(ui.Get("d_live_zoomm.png").Get(gd)) { Position = new Vector2(87, 196) }); Add(RotateCWButton = new UIStencilButton(ui.Get("d_live_rotcw.png").Get(gd)) { Position = new Vector2(62, 175) }); Add(RotateCCWButton = new UIStencilButton(ui.Get("d_live_rotccw.png").Get(gd)) { Position = new Vector2(114, 175) }); SpeedButtons = new UIButton[4]; for (int i = 0; i < 4; i++) { Add(SpeedButtons[i] = new UIStencilButton(ui.Get($"d_live_speed{i+1}.png").Get(gd)) { Position = new Vector2(158 + 30 * i, 246), Shadow = true, ShadowParam = sDir }); var speed = i + 1; SpeedButtons[i].OnButtonClick += (btn) => { SwitchSpeed(speed); }; } var largeStyle = TextStyle.DefaultLabel.Clone(); largeStyle.Size = 15; largeStyle.Color = UIStyle.Current.DialogTitle; var whiteStyle = TextStyle.DefaultLabel.Clone(); whiteStyle.Size = 12; whiteStyle.Color = UIStyle.Current.Text; var shadowStyle = TextStyle.DefaultLabel.Clone(); shadowStyle.Size = 12; shadowStyle.Color = Color.Black * 0.5f; var friendStyle = TextStyle.DefaultLabel.Clone(); friendStyle.Size = 12; friendStyle.Color = UIStyle.Current.SecondaryText; Add(MoneyLabel = new UILabel() { Position = new Vector2(7, 241), Size = new Vector2(138, 30), Alignment = TextAlignment.Middle | TextAlignment.Center, Caption = "$0", CaptionStyle = largeStyle }); Add(TimeLabelShadow = new UILabel() { Position = new Vector2(157, 221 + 2), Size = new Vector2(114, 16), Alignment = TextAlignment.Middle | TextAlignment.Center, Caption = "12:00AM", CaptionStyle = shadowStyle }); Add(TimeLabel = new UILabel() { Position = new Vector2(157, 221), Size = new Vector2(114, 16), Alignment = TextAlignment.Middle | TextAlignment.Center, Caption = "12:00AM", CaptionStyle = whiteStyle }); Add(FriendsLabelShadow = new UILabel() { Position = new Vector2(176, 184 + 2), Alignment = TextAlignment.Top | TextAlignment.Left, Caption = "0", CaptionStyle = shadowStyle }); Add(FriendsLabel = new UILabel() { Position = new Vector2(176, 184), Alignment = TextAlignment.Top | TextAlignment.Left, Caption = "0", CaptionStyle = friendStyle }); Add(FloorLabelShadow = new UILabel() { Position = new Vector2(22, 184 + 2), Size = new Vector2(24, 15), Alignment = TextAlignment.Center | TextAlignment.Middle, Caption = "1st", CaptionStyle = shadowStyle }); Add(FloorLabel = new UILabel() { Position = new Vector2(22, 184), Size = new Vector2(24, 15), Alignment = TextAlignment.Center | TextAlignment.Middle, Caption = "1st", CaptionStyle = whiteStyle }); RoofButton.OnButtonClick += (btn) => SetCut(3); WallsUpButton.OnButtonClick += (btn) => SetCut(2); WallsCutButton.OnButtonClick += (btn) => SetCut(1); WallsDownButton.OnButtonClick += (btn) => SetCut(0); LiveButton.OnButtonClick += (btn) => OnModeClick?.Invoke(UIMainPanelMode.LIVE); BuyButton.OnButtonClick += (btn) => OnModeClick?.Invoke(UIMainPanelMode.BUY); BuildButton.OnButtonClick += (btn) => OnModeClick?.Invoke(UIMainPanelMode.BUILD); OptionsButton.OnButtonClick += (btn) => OnModeClick?.Invoke(UIMainPanelMode.OPTIONS); ZoomInButton.OnButtonClick += ZoomControl; ZoomOutButton.OnButtonClick += ZoomControl; RotateCWButton.OnButtonClick += RotateClockwise; RotateCCWButton.OnButtonClick += RotateCounterClockwise; FloorUpButton.OnButtonClick += (b) => { if (Game.Level < 5) { Game.Level++; } }; FloorDownButton.OnButtonClick += (b) => { if (Game.Level > 1) { Game.Level--; } }; Size = new Vector2(Background.Width, Background.Height); UpdateBuildBuy(); UpdateMoneyDisplay(); UpdateZoomButton(); }