public override void GameResized() { base.GameResized(); Title.SetTitle(Title.Label.Caption); ucp.Y = ScreenHeight - 210; World?.GameResized(); var oldPanel = ucp.CurrentPanel; ucp.SetPanel(-1); ucp.SetPanel(oldPanel); }
public override void GameResized() { base.GameResized(); CityRenderer.Camera.ProjectionDirty(); Title.SetTitle(Title.Label.Caption); ucp.Y = ScreenHeight - 210; gizmo.X = ScreenWidth - 430; gizmo.Y = ScreenHeight - 230; MessageTray.X = ScreenWidth - 70; World?.GameResized(); var oldPanel = ucp.CurrentPanel; ucp.SetPanel(-1); ucp.SetPanel(oldPanel); CityTooltipHitArea.SetSize(ScreenWidth, ScreenHeight); }
public override void GameResized() { base.GameResized(); Title.SetTitle(Title.Label.Caption); ucp.Y = ScreenHeight - 210; gizmo.X = ScreenWidth - 430; gizmo.Y = ScreenHeight - 230; MessageTray.X = ScreenWidth - 70; World?.GameResized(); var oldPanel = ucp.CurrentPanel; ucp.SetPanel(-1); ucp.SetPanel(oldPanel); if (MouseHitAreaEventRef != null) { MouseHitAreaEventRef.Region = new Rectangle(0, 0, ScreenWidth, ScreenHeight); } }
public void CleanupLastWorld() { if (ZoomLevel < 4) { ZoomLevel = 5; } vm.Context.Ambience.Kill(); vm.CloseNet(); GameFacade.Scenes.Remove(World); this.Remove(LotController); ucp.SetPanel(-1); ucp.SetInLot(false); }
public LotDebugScreen() { var lotInfo = XmlHouseData.Parse(GameFacade.GameFilePath("housedata/blueprints/restaurant01_00.xml")); World = new World(GameFacade.Game.GraphicsDevice); GameFacade.Scenes.Add(World); vm = new TSO.Simantics.VM(new VMContext(World)); vm.Init(); var activator = new VMWorldActivator(vm, World); var blueprint = activator.LoadFromXML(lotInfo); World.InitBlueprint(blueprint); vm.Context.Blueprint = blueprint; var sim = activator.CreateAvatar(); //sim.Position = new Vector3(31.5f, 55.5f, 0.0f); sim.Position = new Vector3(26.5f, 41.5f, 0.0f); VMDebug = new UIButton() { Caption = "Simantics", Y = 45, Width = 100, X = GlobalSettings.Default.GraphicsWidth - 110 }; VMDebug.OnButtonClick += new ButtonClickDelegate(VMDebug_OnButtonClick); this.Add(VMDebug); LotController = new UILotControl(vm, World); this.AddAt(0, LotController); ucp = new UIUCP(this); ucp.Y = ScreenHeight - 210; ucp.SetInLot(true); ucp.SetMode(UIUCP.UCPMode.LotMode); ucp.SelectedAvatar = sim; ucp.SetPanel(1); //ucp.ZoomLevel = 1; //ucp.OnZoomChanged += new UCPZoomChangeEvent(ucp_OnZoomChanged); //ucp.OnRotateChanged += new UCPRotateChangeEvent(ucp_OnRotateChanged); this.Add(ucp); }
public void CleanupLastWorld() { if (ZoomLevel < 4) { ZoomLevel = 5; } vm.Context.Ambience.Kill(); foreach (var ent in vm.Entities) //stop object sounds { var threads = ent.SoundThreads; for (int i = 0; i < threads.Count; i++) { threads[i].Sound.RemoveOwner(ent.ObjectID); } threads.Clear(); } vm.CloseNet(VMCloseNetReason.LeaveLot); GameFacade.Scenes.Remove(World); this.Remove(LotController); ucp.SetPanel(-1); ucp.SetInLot(false); }