Example #1
0
        /// <summary>
        /// Refreshes the action panel list depending on the currently active command focus.
        /// </summary>
        private void RefreshActionPanelList()
        {
            if (!_combatStateHandler.IsPlayerTurn())
            {
                _defaultsHandler.ActionPanelList      = new List <IDisplayAction>();
                _defaultsHandler.ActionPanelItemCount = 0;
            }
            else
            {
                switch ((Commands)_defaultsHandler.CommandFocusNumber)
                {
                case Commands.Attack:
                case Commands.Spells:
                case Commands.Skills:
                case Commands.Items:
                    _defaultsHandler.ActionPanelList = _displayManager.GetActionListFromCategory(
                        (Commands)_defaultsHandler.CommandFocusNumber,
                        _defaultsHandler.ActiveCategory);
                    break;

                default:
                    _defaultsHandler.ActionPanelList = new List <IDisplayAction>();
                    break;
                }
            }
        }