Exemplo n.º 1
0
        protected ActionStatus ClearTextCmd(IGameAction gameAction, ClearArgs args, out string error)
        {
            error = null;
            if (!UIManager.views.ContainsKey(UINames.k_UITextPanel))
            {
                return(ActionStatus.NextFrame);
            }

            string position = args.arg0;

            if (string.IsNullOrEmpty(position))
            {
                UIManager.views.CloseView(UINames.k_UITextPanel);
                return(ActionStatus.NextFrame);
            }

            UITextPanel panel = UIManager.views.GetView <UITextPanel>(UINames.k_UITextPanel);

            panel.CloseWindow(position);

            if (!panel.hasWindowDisplay)
            {
                UIManager.views.CloseView(UINames.k_UITextPanel);
            }

            return(ActionStatus.NextFrame);
        }