private UISelectHouseView SelWallsPanel; //select view panel that is created when clicking the current walls mode #endregion Fields #region Constructors public UIUCP(UIScreen owner) { this.RenderScript("ucp.uis"); Game = (CoreGameScreen)owner; Background = new UIImage(BackgroundGameImage); this.AddAt(0, Background); Background.BlockInput(); BackgroundMatchmaker = new UIImage(BackgroundMatchmakerImage); BackgroundMatchmaker.Y = 81; this.AddAt(0, BackgroundMatchmaker); BackgroundMatchmaker.BlockInput(); TimeText.Caption = "12:00 am"; TimeText.CaptionStyle = TimeText.CaptionStyle.Clone(); TimeText.CaptionStyle.Shadow = true; MoneyText.Caption = "§0"; MoneyText.CaptionStyle = TimeText.CaptionStyle.Clone(); MoneyText.CaptionStyle.Shadow = true; CurrentPanel = -1; OptionsModeButton.OnButtonClick += new ButtonClickDelegate(OptionsModeButton_OnButtonClick); LiveModeButton.OnButtonClick += new ButtonClickDelegate(LiveModeButton_OnButtonClick); BuyModeButton.OnButtonClick += new ButtonClickDelegate(BuyModeButton_OnButtonClick); BuildModeButton.OnButtonClick += BuildModeButton_OnButtonClick; ZoomOutButton.OnButtonClick += new ButtonClickDelegate(ZoomControl); ZoomInButton.OnButtonClick += new ButtonClickDelegate(ZoomControl); PhoneButton.OnButtonClick += new ButtonClickDelegate(PhoneButton_OnButtonClick); CloseZoomButton.OnButtonClick += new ButtonClickDelegate(SetCityZoom); MediumZoomButton.OnButtonClick += new ButtonClickDelegate(SetCityZoom); FarZoomButton.OnButtonClick += new ButtonClickDelegate(SetCityZoom); NeighborhoodButton.OnButtonClick += new ButtonClickDelegate(SetCityZoom); WorldButton.OnButtonClick += new ButtonClickDelegate(SetCityZoom); HouseViewSelectButton.OnButtonClick += new ButtonClickDelegate(WallsViewPopup); WallsDownButton.OnButtonClick += new ButtonClickDelegate(WallsViewPopup); WallsUpButton.OnButtonClick += new ButtonClickDelegate(WallsViewPopup); WallsCutawayButton.OnButtonClick += new ButtonClickDelegate(WallsViewPopup); RoofButton.OnButtonClick += new ButtonClickDelegate(WallsViewPopup); RotateClockwiseButton.OnButtonClick += new ButtonClickDelegate(RotateClockwise); RotateCounterClockwiseButton.OnButtonClick += new ButtonClickDelegate(RotateCounterClockwise); FirstFloorButton.OnButtonClick += FirstFloor; SecondFloorButton.OnButtonClick += SecondFloor; SecondFloorButton.Selected = (Game.Level == Game.Stories); FirstFloorButton.Selected = (Game.Level == 1); SetInLot(false); SetMode(UCPMode.CityMode); }
public void InjectIDEInto(UIScreen screen, VM vm, BHAV targetBhav, GameObject targetObj) { EditorResource.Get().Init(GameFacade.GraphicsDevice); EditorScope.Behaviour = new Files.Formats.IFF.IffFile(Content.Content.Get().GetPath("objectdata/globals/behavior.iff")); EditorScope.Globals = FSO.Content.Content.Get().WorldObjectGlobals.Get("global"); new Thread(() => { var editor = new BHAVEditor(targetBhav, new EditorScope(targetObj, targetBhav)); Application.Run(editor); }).Start(); }
public void RemoveScreen(UIScreen Screen) { if (Screen == currentScreen) { currentScreen = null; } Screen.OnHide(); mainUI.Remove(Screen); m_Screens.Remove(Screen); /** Put the previous screen back into the UI **/ if (m_Screens.Count > 0) { currentScreen = m_Screens.Last(); mainUI.AddAt(0, currentScreen); } }
/// <summary> /// Adds a UIScreen instance to this ScreenManager's list of screens. /// This function is called from Lua. /// </summary> /// <param name="Screen">The UIScreen instance to be added.</param> public void AddScreen(UIScreen Screen) { /*if (currentScreen != null) { mainUI.Remove(currentScreen); }*/ /** Add screen on top **/ mainUI.Add(Screen); /** Bring dialogs to top **/ mainUI.Add(dialogContainer); /** Bring debug to the top **/ //mainUI.Add(debugButton); Screen.OnShow(); m_Screens.Add(Screen); currentScreen = Screen; }