예제 #1
0
        public void SetupButton(eButtonType buttonType, ConversationNode node, TMPro.TMP_FontAsset continueFont = null, TMPro.TMP_FontAsset endFont = null)
        {
            m_buttonType = buttonType;
            m_node       = node;

            switch (m_buttonType)
            {
            case eButtonType.Option:
            {
                TextMesh.text = node.Text;
                TextMesh.font = node.TMPFont;
            }
            break;

            case eButtonType.Speech:
            {
                TextMesh.text = "Continue.";
                TextMesh.font = continueFont;
            }
            break;

            case eButtonType.End:
            {
                TextMesh.text = "End.";
                TextMesh.font = endFont;
            }
            break;
            }
        }
    private void HandleButtonPressed(eButtonType buttonType)
    {
        switch (buttonType)
        {
        case eButtonType.NewGame:
            break;

        case eButtonType.LoadGame:
            break;

        case eButtonType.Options:
            break;

        case eButtonType.Credits:
            break;

        case eButtonType.ExitGame:
            HandleApplicationExit();
            break;

        case eButtonType.Back:
            backgroundPanel.GetComponent <Animator>().ResetTrigger("OptionsOpen");
            backgroundPanel.GetComponent <Animator>().SetTrigger("OptionsClose");
            break;

        default:
            break;
        }
    }
예제 #3
0
        public static ePanelType GetPanelType(this eButtonType value)
        {
            switch (value)
            {
            case eButtonType.MinipanelAutomap:
                return(ePanelType.Automap);

            case eButtonType.MinipanelCharacter:
                return(ePanelType.Character);

            case eButtonType.MinipanelInventory:
                return(ePanelType.Inventory);

            case eButtonType.MinipanelMenu:
                return(ePanelType.Menu);

            case eButtonType.MinipanelMessage:
                return(ePanelType.Message);

            case eButtonType.MinipanelQuest:
                return(ePanelType.Quest);

            case eButtonType.MinipanelSkill:
                return(ePanelType.Skill);

            default:
                return(ePanelType.None);
            }
        }
예제 #4
0
 public void AddButtonAction(eButtonType buttonType, Action <int> action)
 {
     if (buttonActionDic.ContainsKey(buttonType))
     {
         Debug.Log("This Type is Allready Exist");
         return;
     }
     buttonActionDic.Add(buttonType, action);
 }
예제 #5
0
파일: ButtonType.cs 프로젝트: xuanvu/Fluqi
#pragma warning restore 1591


		/// <summary>
		/// Converts the given button type into a string (used for rendering the button).
		/// </summary>
		/// <param name="buttonType">Type of button</param>
		/// <returns></returns>
		public static string ButtonTypeToString(eButtonType buttonType) {
			switch (buttonType) {
				case eButtonType.Button: return "button";
				case eButtonType.Hyperlink: return "a";
				case eButtonType.Reset: return "reset";
				case eButtonType.Submit: return "submit";				
			}

			throw new ArgumentException(string.Format("ButtonType has an invalid value ({0}).", buttonType.ToString()));
		}
예제 #6
0
        private void ChangeButtonType(eButtonType buttonType)
        {
            if (m_buttonType == buttonType)
            {
                return;
            }

            m_buttonType = buttonType;

            CheckPointerOverUI();

            ResetRotate();
        }
        public void SetupButton(eButtonType buttonType, ConversationNode node)
        {
            m_buttonType = buttonType;
            m_node       = node;

            switch (m_buttonType)
            {
            case eButtonType.Option:
                TextMesh.text = node.Text;
                break;

            case eButtonType.Speech:
                TextMesh.text = "Continue.";
                break;

            case eButtonType.None:
                TextMesh.text = "End.";
                break;
            }
        }
예제 #8
0
파일: ButtonType.cs 프로젝트: xuanvu/Fluqi
		/// <summary>
		/// Queries if the provided ButtonType will be rendered using an "input" tag.
		/// </summary>
		/// <param name="buttonType">ButtonType to query</param>
		/// <returns></returns>
		public static bool IsInputButton(eButtonType buttonType) {
			return (buttonType == eButtonType.Reset || buttonType == eButtonType.Submit);
		}
예제 #9
0
 public InputData_PC(AutoCamera camera)
     : base(camera)
 {
     m_buttonType = eButtonType.None;
 }
예제 #10
0
    //public

    public void SetButtonType(eButtonType _eButtonType)
    {
        buttonType = _eButtonType;
    }
예제 #11
0
    public void ActionPlay(eButtonType buttonType, int pos)
    {
        Action <int> playedAction = buttonActionDic[buttonType];

        playedAction(pos);
    }