public void NeighSelection(NeighSelectionMode mode) { var nbd = (ushort)((mode == NeighSelectionMode.MoveInMagic) ? 7 : 4); TS1NeighPanel = new UINeighborhoodSelectionPanel(nbd); var switcher = new UINeighbourhoodSwitcher(TS1NeighPanel, nbd, mode != NeighSelectionMode.Normal); TS1NeighPanel.OnHouseSelect += (house) => { if (MoveInFamily != null) { //move them in first //confirm it UIMobileAlert confirmDialog = null; confirmDialog = new UIMobileAlert(new UIAlertOptions() { Title = GameFacade.Strings.GetString("132", "0"), Message = GameFacade.Strings.GetString("132", "1"), Buttons = UIAlertButton.YesNo((b) => { confirmDialog.Close(); MoveInAndPlay((short)house, MoveInFamily.Value, switcher); }, (b) => confirmDialog.Close()) }); UIScreen.GlobalShowDialog(confirmDialog, true); } else { PlayHouse((short)house, switcher); } }; Add(TS1NeighPanel); Add(switcher); }
public TS1GameScreen(NeighSelectionMode mode) : base() { Bg = new UISimitoneBg(); Bg.Position = (new Vector2(ScreenWidth, ScreenHeight)) / 2; Add(Bg); WindowContainer = new UIContainer(); Add(WindowContainer); if (Content.Get().TS1) { NeighSelection(mode); } }