Update() public method

public Update ( ) : void
return void
Exemplo n.º 1
0
        public override void Update(float dt)
        {
            base.Update(dt);
            float speed = dt * 120f;

            if (Input.Keyboard.IsDown(Keys.NumPad4))
            {
                Camera.Instance.PositionX -= speed;
            }

            if (Input.Keyboard.IsDown(Keys.NumPad6))
            {
                Camera.Instance.PositionX += speed;
            }

            if (Input.Keyboard.IsDown(Keys.NumPad8))
            {
                Camera.Instance.PositionY -= speed;
            }

            if (Input.Keyboard.IsDown(Keys.NumPad2))
            {
                Camera.Instance.PositionY += speed;
            }

            Physics.Update(dt);
            TopUi.Update(dt);
            Run.Update();
        }
    private bool SaveData()
    {
        if (!IsValidate())
        {
            return(false);
        }

        string Message = string.Empty;

        var objArea = new Area()
        {
            CityId   = ddlCity.zToInt(),
            AreaName = txtAreaName.Text.Trim().zFirstCharToUpper(),
            Pincode  = txtPincode.Text,
        };

        if (IsEditMode())
        {
            objArea.AreaId = lblAreaId.zToInt();
            objArea.Update();

            Message = "Area Detail Change Sucessfully.";
        }
        else
        {
            objArea.eStatus = (int)eStatus.Active;
            objArea.Insert();

            Message = "New Area Added Sucessfully.";
        }

        CU.ZMessage(eMsgType.Success, string.Empty, Message);

        return(true);
    }
Exemplo n.º 3
0
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (Name_Password.Admin == "Администратор")
     {
         {
             try
             {
                 var id = ((Area)lBox.SelectedItem).Areas_Id;
                 {
                     area = (Area)lBox.SelectedItem;
                     area.Update();
                     FillData();
                 }
             }
             catch (Exception)
             {
                 MessageBox.Show("Не выбрана строка, произведите выбор");
             }
         }
     }
     else
     {
         MessageBox.Show("Права доступа ограничены ");
     }
 }
Exemplo n.º 4
0
        public void Run()
        {
            _delta.Start();
            while (true)
            {
                if (!(_delta.Elapsed.TotalSeconds > 1f / 60))
                {
                    continue;
                }
                if (_tmpArea != null)
                {
                    _currentArea?.Unload(_clearScreenOnNextArea);
                    _currentArea = _tmpArea;
                    _tmpArea     = null;
                    _currentArea.Init();
                }
                InputManager.WaitForUp();
                _currentArea?.Update();
                _currentArea?.UpdateEntities();
                OnRenderStart();
                Render();
                OnRenderEnd();

                _delta.Restart();
            }
        }
    /// <summary>
    /// Function to make to control of movement and resizing operations also to change the selected element
    /// Should be called in Update() of Monobehavior always that menu will be displayed
    /// </summary>
    public virtual void Update()
    {
        float axis = GetAxis();

        menuArea.Update();
        innerArea.Update();

        if (axis == 0)
        {
            qtdUpdates = updateDelay;
            return;
        }

        if (qtdUpdates < updateDelay)
        {
            qtdUpdates++;
            return;
        }

        if (axis > 0)
        {
            menuIndex++;
            ChangeSelection();
            qtdUpdates = 0;
        }
        else if (axis < 0)
        {
            menuIndex--;
            ChangeSelection();
            qtdUpdates = 0;
        }
    }
Exemplo n.º 6
0
 public AreaInfo Save()
 {
     if (this.Id != null)
     {
         Area.Update(this);
         return(this);
     }
     return(Area.Insert(this));
 }
Exemplo n.º 7
0
        private void UpdateArea()
        {
            DataTable dt = controllerObj.SelectDistinctArea(City.Text);

            Area.DataSource    = dt;
            Area.DisplayMember = "AREA";
            Area.ValueMember   = "Location_ID";
            Area.Update();
        }
Exemplo n.º 8
0
        public virtual void Update(float dt)
        {
            Ui.Update(dt);             // Update ui first for screenshake compression
            Area?.Update(dt);

            if (!Paused)
            {
                Time += dt;
            }
        }
Exemplo n.º 9
0
 public ActionResult Edit(Area area)
 {
     if (ModelState.IsValid)
     {
         //db.Entry(area).State = EntityState.Modified;
         area.Update();
         return(RedirectToAction("Index"));
     }
     return(View(area));
 }
Exemplo n.º 10
0
        private void btnUpdate_Click(object sender, RoutedEventArgs e)
        {
            var result = _area.Update();

            if (!result.Success)
            {
                MessageWindow.ShowAlertMessage(result.Message);
                return;
            }
            DialogResult = true;
            Close();
        }
Exemplo n.º 11
0
 public void Update(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(_currentArea.AreaName))
     {
         MessageWindow.ShowAlertMessage("Area of Operation must not be empty!");
         return;
     }
     if (_currentArea.AreaId == 0)
     {
         _currentArea.Create();
         return;
     }
     _currentArea.Update();
 }
Exemplo n.º 12
0
        public virtual void Update(GameTime time)
        {
            //if (Goal != null)
            //{
            //Goal.Check(this);


            //}
            if (Area != null)
            {
                Area.Update(time);
                Win |= Area.CityCount >= 23;
            }
        }
Exemplo n.º 13
0
        public void Update(GameTime gameTime)
        {
            if (m_isUpdateFieldData)
            {
                return;
            }

            if (!Visible)
            {
                return;
            }

            FieldManager.Update(gameTime);

            m_area.Update(gameTime);
        }
Exemplo n.º 14
0
        /// <summary>
        /// What happens when wandering around the area
        /// </summary>
        /// <param name="gameTime"></param>
        private void PlayerStateUpdate(GameTime gameTime)
        {
            if (GameKeyboard.IsKeyPressed(Microsoft.Xna.Framework.Input.Keys.G))
            {
                _showGrid = !_showGrid;
            }

            _player.Update(gameTime);

            _currentArea.Update(gameTime);

            switch (_player.CollisionResult)
            {
            case Map.CollisionResults.OffRight:
                LoadArea(_currentArea.RightArea);
                _player.X = -_player.CurrentRectangle.Width;
                break;

            case Map.CollisionResults.OffLeft:
                LoadArea(_currentArea.LeftArea);
                _player.X = _gameModel.ScreenWidth;
                break;

            case Map.CollisionResults.OffTop:
                LoadArea(_currentArea.TopArea);
                _player.Y = -_player.CurrentRectangle.Height;
                break;

            case Map.CollisionResults.OffBottom:
                LoadArea(_currentArea.BottomArea);
                _player.Y = _gameModel.ScreenHeight;
                break;

            case Map.CollisionResults.Battle:
                _nextState   = States.Battle;
                _battleState = new BattleState(_gameModel, _players);
                _battleState.LoadContent();
                break;

            default:
                break;
            }
        }
Exemplo n.º 15
0
        public APIReturn _Edit([FromQuery] uint Id, [FromForm] uint?Parent_id, [FromForm] string Name, [FromForm] uint[] mn_Category)
        {
            AreaInfo item = Area.GetItem(Id);

            if (item == null)
            {
                return(APIReturn.记录不存在_或者没有权限);
            }
            item.Parent_id = Parent_id;
            item.Name      = Name;
            int affrows = Area.Update(item);

            //关联 Category
            if (mn_Category.Length == 0)
            {
                item.UnflagCategoryALL();
            }
            else
            {
                List <uint> mn_Category_list = mn_Category.ToList();
                foreach (var Obj_category in item.Obj_categorys)
                {
                    int idx = mn_Category_list.FindIndex(a => a == Obj_category.Id);
                    if (idx == -1)
                    {
                        item.UnflagCategory(Obj_category.Id);
                    }
                    else
                    {
                        mn_Category_list.RemoveAt(idx);
                    }
                }
                mn_Category_list.ForEach(a => item.FlagCategory(a));
            }
            if (affrows > 0)
            {
                return(APIReturn.成功.SetMessage($"更新成功,影响行数:{affrows}"));
            }
            return(APIReturn.失败);
        }
Exemplo n.º 16
0
        public bool Run(System.IO.DirectoryInfo workingDirectory, object options)
        {
            UpdateVerbOptions localOptions = options as UpdateVerbOptions;

            Printer.EnableDiagnostics = localOptions.Verbose;
            Area ws = Area.Load(workingDirectory);

            if (ws == null)
            {
                return(false);
            }
            Area.MergeSpecialOptions opt = new Area.MergeSpecialOptions()
            {
                AllowRecursiveMerge = !localOptions.Simple,
                IgnoreMergeParents  = false,
                Reintegrate         = false,
                MetadataOnly        = localOptions.Metadata,
                ResolutionStrategy  = localOptions.Mine ? Area.MergeSpecialOptions.ResolutionSystem.Mine : (localOptions.Theirs ? Area.MergeSpecialOptions.ResolutionSystem.Theirs : Area.MergeSpecialOptions.ResolutionSystem.Normal)
            };
            ws.Update(opt);
            return(true);
        }
Exemplo n.º 17
0
        private void btnModificar_Click(object sender, RoutedEventArgs e)
        {
            List <Area> areas = col.ReadAllAreas();

            try
            {
                Area us = new Area();
                us.id_area = int.Parse(txtIdArea.Text);
                if (us.Read())
                {
                    if (txtNombre.Text.Length > 0 && txtAbreviacion.Text.Length > 0 && txtObsoleta.Text.Length > 0)
                    {
                        us.area        = txtNombre.Text;
                        us.abreviacion = txtAbreviacion.Text;
                        us.obsoleta    = int.Parse(txtObsoleta.Text);
                        us.Update();
                        MessageBox.Show("Actualizado correctamente", "Éxito!");
                        NavigationService navService = NavigationService.GetNavigationService(this);
                        MantenedorArea    nextPage   = new MantenedorArea();
                        navService.Navigate(nextPage);
                    }
                    else
                    {
                        MessageBox.Show("Debe completar los campos antes de continuar", "Aviso");
                    }
                }
                else
                {
                    txtIdArea.Text = txtIdArea.Text + " - El area no existe";
                }
            }
            catch (Exception)
            {
                MessageBox.Show("No se ha podido modificar el area, verifique que la información esté correcta", "Error");
            }
        }
    public void UpdateOnPlay()
    {
        if (Time.timeScale == 0 || !UIManager.GetInstance().GetPlayer().CanInteract())
        {
            return;
        }

        selectionDisplay.Update();
        selectionSecondDisplay.Update();

        if (elements.Count > 1)
        {
            if (ButtonManager.GetDown(ButtonManager.ButtonID.TRIANGLE, this))
            {
                if (selectionDisplay.GetPercentMove() != 1)
                {
                    return;
                }

                Area.Position sup = new Area.Position(selectionDisplay.centerPosition.x - (selectionSecondDisplay.centerPosition.x - selectionDisplay.centerPosition.x) / 2, selectionDisplay.centerPosition.y - (selectionSecondDisplay.centerPosition.y - selectionDisplay.centerPosition.y) / 2);
                Area.Position inf = new Area.Position(selectionSecondDisplay.centerPosition.x - (selectionDisplay.centerPosition.x - selectionSecondDisplay.centerPosition.x) / 2, selectionSecondDisplay.centerPosition.y - (selectionDisplay.centerPosition.y - selectionSecondDisplay.centerPosition.y) / 2);
                selectionDisplay.GoTo(sup, () =>
                {
                    elements.Add(elements[0]);
                    elements.RemoveAt(0);
                    secondDisplayIndex         = elements.Count - 1;
                    selectionDisplay.moveStep /= 2;
                    selectionDisplay.ComeFrom(inf, () => {
                        secondDisplayIndex         = 1;
                        selectionDisplay.moveStep *= 2;
                    });
                });
                selectionSecondDisplay.GoTo(inf, () =>
                {
                    selectionSecondDisplay.moveStep /= 2;
                    selectionSecondDisplay.ComeFrom(sup, () => {
                        selectionSecondDisplay.moveStep *= 2;
                    });
                });
            }
        }
        middleCenter.fontSize         = fontSize;
        middleCenter.normal.textColor = color;

        if (elements.Count >= 1)
        {
            while (elements[0].source == null)
            {
                elements.RemoveAt(0);
                if (elements.Count <= 0)
                {
                    return;
                }
            }
            if (elements[0].source.GetComponent <Interactable>() != null)
            {
                if (Input.GetButtonDown(elements[0].source.GetComponent <Interactable>().button.ToString()))
                {
                    elements[0].source.GetComponent <Interactable>().ActivateInteraction();
                }
            }
        }
    }
Exemplo n.º 19
0
    /// <summary>
    /// 执行操作的方法
    /// </summary>
    private void Action()
    {
        string cmd = Request["cmd"];

        if (String.IsNullOrEmpty(cmd))
        {
            return;
        }
        string ids = Request.QueryString["ids"];

        if (cmd == "moveup")
        {
            bll_area.MoveUp(ids);
        }
        else if (cmd == "movedown")
        {
            bll_area.MoveDown(ids);
        }
        else if (cmd == "onoff")
        {
            bll_area.UpdateStatus(ids, "onoff");
        }
        else if (cmd == "hot")
        {
            bll_area.UpdateStatus(ids, "hot");
        }
        else if (cmd == "enab")
        {
            bll_area.UpdateStatus(ids, "enab");
        }
        else if (cmd == "del")
        {
            bll_area.Delete(ids);
        }
        else if (cmd == "updateall")
        {
            foreach (string key in Request.Form.AllKeys)
            {
                if (key.StartsWith("title"))
                {
                    string title = Request.Form[key];
                    if (String.IsNullOrEmpty(title))
                    {
                        continue;
                    }

                    if (key.IndexOf("#") > 0)
                    {
                        string fid = Request.Form[key.Replace("title", "fid")];
                        if (!StringHelper.IsNumber(fid))
                        {
                            continue;
                        }

                        AreaModel area = new AreaModel();
                        area.Title    = title;
                        area.FatherId = Convert.ToInt32(fid);
                        bll_area.Insert(area);
                    }
                    else
                    {
                        string    id   = key.Replace("title", "");
                        AreaModel area = bll_area.GetModel(id);
                        if (area == null)
                        {
                            continue;
                        }
                        area.Title = title;
                        bll_area.Update(area);
                    }
                }
            }

            WebUtility.ShowAlertMessage("全部保存成功!", Request.RawUrl);
        }

        Response.Redirect(Request.Url.AbsolutePath + WebUtility.GetUrlParams("?", true));
    }
Exemplo n.º 20
0
        public bool ActualizarArea(string xml)
        {
            Area ar = new Area(xml);

            return(ar.Update());
        }
Exemplo n.º 21
0
 public void Update(GameTime gameTime)
 {
     m_area.Update(gameTime);
 }
Exemplo n.º 22
0
        protected override void Update(GameTime gameTime)
        {
            UIElement.ScreenWidth  = Window.ClientBounds.Width;
            UIElement.ScreenHeight = Window.ClientBounds.Height;

            Input.ks           = Keyboard.GetState();
            Input.ms           = Mouse.GetState();
            Input.MouseBlocked = Input.calcMouseBlocked();
            Input.KeysBlocked  = Input.calcKeysBlocked();

            #region toggle fullscreen
            if (Input.ks.IsKeyDown(Keys.LeftAlt) && Input.KeyPressed(Keys.Enter) && !Input.KeysBlocked)
            {
                if (form.FormBorderStyle != System.Windows.Forms.FormBorderStyle.None)
                {
                    form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    form.WindowState     = System.Windows.Forms.FormWindowState.Maximized;
                }
                else
                {
                    form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
                    form.WindowState     = System.Windows.Forms.FormWindowState.Normal;
                }
            }
            if (form.FormBorderStyle == System.Windows.Forms.FormBorderStyle.None)
            {
                form.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            }
            #endregion

            if (Input.KeyPressed(Keys.OemTilde))
            {
                CommandWindow.Visible = !CommandWindow.Visible;
                if (CommandWindow.Visible)
                {
                    (CommandWindow["cmd"] as TextBox).Focused = true;
                }
            }
            Debug.Update();

            switch (GameState)
            {
            case GameState.Loading:
                if (Area.LoadProgress >= 2)
                {
                    GameState = GameState.InGame;
                    MainFrame["Load"].Visible = false;
                    Player.Position           = new Vector3(Area.RealWidth * .5f, Area.HeightAt(Area.RealWidth * .5f, Area.RealLength * .5f), Area.RealLength * .5f);
                }
                try {
                    (MainFrame["Load"]["text"] as TextLabel).Text = Area.LoadMessage;
                    MainFrame["Load"]["bar"]["bar"].Size.Scale.X  = Area.LoadProgress;
                } catch { }
                break;

            case GameState.InGame:
                Area.Update(gameTime);
                break;
            }

            MainFrame.Update(gameTime);

            Input.lastks = Input.ks;
            Input.lastms = Input.ms;
            base.Update(gameTime);
        }
Exemplo n.º 23
0
    protected void SubmitButton_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            if (!String.IsNullOrEmpty(MyCode.Value) && area.Code != MyCode.Value)
            {
                if (bll_area.CodeExist(MyCode.Value))
                {
                    WebUtility.ShowAlertMessage("代码已存在,请重新选择!", null);
                }
                area.Code = MyCode.Value;
            }

            if (!StringHelper.IsNumber(FatherId.Value))
            {
                WebUtility.ShowAlertMessage("请填写父级地区ID!", null);
            }

            area.Title = MyTitle.Value;
            area.Code  = MyCode.Value;
            area.IsHot = IsHot.Checked;

            if (area.Pkid > 0)
            {
                //更改
                int result = bll_area.Update(area, FatherId.Value, Request.Form["sort"]);

                if (result == 101)
                {
                    WebUtility.ShowAlertMessage("没有找到相关父类!", null);
                }
                else if (result == 102)
                {
                    WebUtility.ShowAlertMessage("所选父类为最终类,无法添加子类别,请重新选择父类!", null);
                }
                else if (result == 103)
                {
                    WebUtility.ShowAlertMessage("没有找到显示位置!", null);
                }

                WebUtility.ShowAlertMessage("保存成功!", "areaManage.aspx");
            }
            else
            {
                //增加
                area.FatherId = Convert.ToInt32(FatherId.Value);
                int result = bll_area.Insert(area);

                if (result == 101)
                {
                    WebUtility.ShowAlertMessage("没有找到相关父类!", null);
                }
                else if (result == 102)
                {
                    WebUtility.ShowAlertMessage("所选父类为最终类,无法添加子类别,请重新选择父类!", null);
                }

                result = bll_area.Update(area, FatherId.Value, Request.Form["sort"]);
                if (result == 103)
                {
                    WebUtility.ShowAlertMessage("没有找到显示位置!", null);
                }

                WebUtility.ShowAlertMessage("新增成功!", Request.RawUrl);
            }
        }
    }
Exemplo n.º 24
0
    private void InsertData(DataTable dt)
    {
        int UpdateCount = 0, InsertCount = 0;

        try
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                #region Value Initialization

                CountryName = dt.Rows[i][CountryNameColumn].ToString().Trim();
                StateName   = dt.Rows[i][StateNameColumn].ToString().Trim();
                CityName    = dt.Rows[i][CityNameColumn].ToString().Trim();
                AreaName    = dt.Rows[i][AreaNameColumn].ToString().Trim();
                Pincode     = dt.Rows[i][PincodeColumn].ToString().Trim();

                #endregion

                int CountryId = new Country()
                {
                    eStatus = (int)eStatus.Active, CountryName = CountryName.ToLower()
                }.SelectList <Country>()[0].CountryId.Value;
                int StateId = new State()
                {
                    CountryId = CountryId, StateName = StateName, eStatus = (int)eStatus.Active
                }.SelectList <State>()[0].StateId.Value;
                int CityId = new City()
                {
                    StateId = StateId, CityName = CityName, eStatus = (int)eStatus.Active
                }.SelectList <City>()[0].CityId.Value;

                DataTable dtArea = new Query()
                {
                    StateId    = StateId,
                    AreaName   = AreaName.zFirstCharToUpper(),
                    eStatusNot = (int)eStatus.Delete
                }.Select(eSP.qry_Area);

                var objArea = new Area()
                {
                    AreaId   = dtArea.Rows.Count > 0 ? dtArea.Rows[0][CS.AreaId].zToInt() : (int?)null,
                    CityId   = CityId,
                    AreaName = AreaName.zFirstCharToUpper(),
                    Pincode  = Pincode,
                };

                if (objArea.AreaId.HasValue)
                {
                    objArea.Update();
                    UpdateCount++;
                }
                else
                {
                    objArea.eStatus = (int)eStatus.Active;
                    objArea.Insert();
                    InsertCount++;
                }
            }

            CU.SetSuccessExcelMessage(InsertCount, UpdateCount, "Area");
        }
        catch (Exception ex)
        {
            CU.ZMessage(eMsgType.Error, string.Empty, ex.Message, 0);
        }

        LoadAreaGrid(ePageIndex.Custom);
    }
Exemplo n.º 25
0
 public Area Put(int id, Area area)
 {
     return(Area.Update(id, area.Name));
 }
Exemplo n.º 26
0
    public void UpdateAbilityMenu()
    {
        activeSelectMenu.CheckIndexes();
        passiveSelectMenu.CheckIndexes();
        passiveMovingArea.Update();

        if (isGoing)
        {
            return;
        }

        switch (state)
        {
        case MenuState.Active:
            activeMenu.Update();


            if (ButtonManager.GetValue(ButtonManager.ButtonID.R_DOWN) > 0.5f)
            {
                if (passiveMenu.GetNumberOfSelectedAbilities() > 0)
                {
                    ChangeInternalState(MenuState.Passive);
                }
            }
            else if ((ButtonManager.GetValue(ButtonManager.ButtonID.R_RIGHT) > 0.5f) || (ButtonManager.GetDown(ButtonManager.ButtonID.X, this)))
            {
                ChangeInternalState(MenuState.ActiveSelection);
            }

            if (ButtonManager.GetDown(ButtonManager.ButtonID.TRIANGLE, this))
            {
                activeMenu.DeselectAbility();
            }

            details.currentAbility = activeMenu.GetHoveredAbility();
            break;

        case MenuState.Passive:
            passiveMenu.Update();
            activeMenu.menuArea.Update();

            if (ButtonManager.GetValue(ButtonManager.ButtonID.R_UP) > 0.5f)
            {
                ChangeInternalState(MenuState.Active);
            }
            else if ((ButtonManager.GetValue(ButtonManager.ButtonID.R_RIGHT) > 0.5f) || (ButtonManager.GetDown(ButtonManager.ButtonID.X, this)))
            {
                ChangeInternalState(MenuState.PassiveSelection);
            }

            if (ButtonManager.GetDown(ButtonManager.ButtonID.TRIANGLE, this))
            {
                passiveMenu.DeselectAbility();
            }

            details.currentAbility = passiveMenu.GetHoveredAbility();
            break;

        case MenuState.ActiveSelection:
            activeSelectMenu.Update();

            if (ButtonManager.GetValue(ButtonManager.ButtonID.R_DOWN) > 0.5f)
            {
                ChangeInternalState(MenuState.PassiveSelection);
            }
            else if (ButtonManager.GetValue(ButtonManager.ButtonID.R_LEFT) > 0.5f)
            {
                ChangeInternalState(MenuState.Active);
            }

            bool          newSelection = true;
            Area.Position dest         = new Area.Position(0, 0);
            if (ButtonManager.GetDown(ButtonManager.ButtonID.X, this))
            {
                newSelection = activeMenu.HasSlot(ActiveAbilitiesMenu.Options.DOWN);
                activeMenu.ChangeSelected(ActiveAbilitiesMenu.Options.DOWN);
                dest = activeMenu.GetSlot(ActiveAbilitiesMenu.Options.DOWN);
            }
            else if (ButtonManager.GetDown(ButtonManager.ButtonID.TRIANGLE, this))
            {
                newSelection = activeMenu.HasSlot(ActiveAbilitiesMenu.Options.UP);
                activeMenu.ChangeSelected(ActiveAbilitiesMenu.Options.UP);
                dest = activeMenu.GetSlot(ActiveAbilitiesMenu.Options.UP);
            }
            else if (ButtonManager.GetDown(ButtonManager.ButtonID.CIRCLE, this))
            {
                newSelection = activeMenu.HasSlot(ActiveAbilitiesMenu.Options.RIGHT);
                activeMenu.ChangeSelected(ActiveAbilitiesMenu.Options.RIGHT);
                dest = activeMenu.GetSlot(ActiveAbilitiesMenu.Options.RIGHT);
            }
            else if (ButtonManager.GetDown(ButtonManager.ButtonID.SQUARE, this))
            {
                newSelection = activeMenu.HasSlot(ActiveAbilitiesMenu.Options.LEFT);
                activeMenu.ChangeSelected(ActiveAbilitiesMenu.Options.LEFT);
                dest = activeMenu.GetSlot(ActiveAbilitiesMenu.Options.LEFT);
            }
            else
            {
                newSelection = false;
            }


            if (newSelection)
            {
                if (activeSelectMenu.GetSelected().saveInfo.obtained)
                {
                    if (activeMenu.TestAbility(activeSelectMenu.GetSelected()))
                    {
                        activeMenu.ChangeSelectedAbility(activeSelectMenu.GetSelected());
                    }
                    else
                    {
                        isGoing = true;
                        passiveMovingTexture = activeSelectMenu.GetSelected().texture;
                        passiveMovingArea    = activeSelectMenu.GetSelectedArea();
                        passiveMovingArea.GoTo(dest, () =>
                        {
                            isGoing = false;
                            passiveMovingTexture = null;
                            activeMenu.ChangeSelectedAbility(activeSelectMenu.GetSelected());
                        });
                    }
                }
            }

            details.currentAbility = activeSelectMenu.GetHoveredAbility();

            break;

        case MenuState.PassiveSelection:
            passiveSelectMenu.Update();

            if (ButtonManager.GetValue(ButtonManager.ButtonID.R_UP) > 0.5f)
            {
                ChangeInternalState(MenuState.ActiveSelection);
            }
            else if (ButtonManager.GetValue(ButtonManager.ButtonID.R_LEFT) > 0.5f)
            {
                if (passiveMenu.GetNumberOfSelectedAbilities() > 0)
                {
                    ChangeInternalState(MenuState.Passive);
                }
            }

            if (ButtonManager.GetDown(ButtonManager.ButtonID.X, this))
            {
                if (passiveSelectMenu.GetSelected().saveInfo.obtained)
                {
                    if (!passiveMenu.IsSelectable(abilities[passiveSelectMenu.GetSelected().description.id]))
                    {
                        passiveMenu.SelectAbility(passiveSelectMenu.GetSelected());
                    }
                    else
                    {
                        isGoing = true;
                        passiveMovingTexture = passiveSelectMenu.GetSelected().texture;
                        passiveMovingArea    = passiveSelectMenu.GetSelectedArea();
                        //print("OIOI " +passiveMenu.GetNextSlot());
                        passiveMovingArea.GoTo(passiveMenu.GetNextSlot(), () =>
                        {
                            passiveMovingTexture = null;
                            passiveMenu.SelectAbility(passiveSelectMenu.GetSelected());
                            isGoing = false;
                        });
                    }
                }
            }

            details.currentAbility = passiveSelectMenu.GetHoveredAbility();
            break;
        }

        if (ButtonManager.GetDown(ButtonManager.ButtonID.START, this))
        {
            manager.ChangeMode(UIManager.Mode.NORMAL);
        }
    }