Example #1
0
        public void SetMode(UCPMode mode)
        {
            var isLotMode  = mode == UCPMode.LotMode;
            var isCityMode = mode == UCPMode.CityMode;

            FirstFloorButton.Visible  = isLotMode;
            SecondFloorButton.Visible = isLotMode;

            LiveModeButton.Visible                = isLotMode;
            BuyModeButton.Visible                 = isLotMode;
            BuildModeButton.Visible               = isLotMode;
            HouseModeButton.Visible               = isLotMode;
            HouseViewSelectButton.Visible         = isLotMode;
            RotateClockwiseButton.Disabled        = isCityMode;
            RotateCounterClockwiseButton.Disabled = isCityMode;

            BackgroundMatchmaker.Visible = isCityMode;
            Background.Visible           = isLotMode;

            UpdateWallsMode();

            if (isCityMode && SelWallsPanel != null)
            {
                Remove(SelWallsPanel);
                SelWallsPanel = null;
            }
        }
Example #2
0
 private void UpdateWallsViewCallback(int mode)
 {
     Remove(SelWallsPanel);
     SelWallsPanel = null;
     Game.LotController.WallsMode = mode;
     UpdateWallsMode();
 }
Example #3
0
 private void WallsViewPopup(UIElement button)
 {
     if (SelWallsPanel == null)
     {
         SelWallsPanel   = new UISelectHouseView();
         SelWallsPanel.X = 31;
         SelWallsPanel.Y = 48;
         SelWallsPanel.OnModeSelection += new HouseViewSelection(UpdateWallsViewCallback);
         this.Add(SelWallsPanel);
     }
 }
Example #4
0
 private void WallsViewPopup(UIElement button)
 {
     if (SelWallsPanel == null)
     {
         SelWallsPanel = new UISelectHouseView();
         SelWallsPanel.X = 31;
         SelWallsPanel.Y = 48;
         SelWallsPanel.OnModeSelection += new HouseViewSelection(UpdateWallsViewCallback);
         this.Add(SelWallsPanel);
     }
 }
Example #5
0
 private void UpdateWallsViewCallback(int mode)
 {
     Remove(SelWallsPanel);
     SelWallsPanel = null;
     Game.LotController.WallsMode = mode;
     UpdateWallsMode();
 }
Example #6
0
        public void SetMode(UCPMode mode)
        {
            var isLotMode = mode == UCPMode.LotMode;
            var isCityMode = mode == UCPMode.CityMode;

            FirstFloorButton.Visible = isLotMode;
            SecondFloorButton.Visible = isLotMode;

            LiveModeButton.Visible = isLotMode;
            BuyModeButton.Visible = isLotMode;
            BuildModeButton.Visible = isLotMode;
            HouseModeButton.Visible = isLotMode;
            HouseViewSelectButton.Visible = isLotMode;
            RotateClockwiseButton.Disabled = isCityMode;
            RotateCounterClockwiseButton.Disabled = isCityMode;

            BackgroundMatchmaker.Visible = isCityMode;
            Background.Visible = isLotMode;

            UpdateWallsMode();

            if (isCityMode && SelWallsPanel != null)
            {
                Remove(SelWallsPanel);
                SelWallsPanel = null;
            }
        }