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; } }
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); } }
public void AddButtonAction(eButtonType buttonType, Action <int> action) { if (buttonActionDic.ContainsKey(buttonType)) { Debug.Log("This Type is Allready Exist"); return; } buttonActionDic.Add(buttonType, action); }
#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())); }
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; } }
/// <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); }
public InputData_PC(AutoCamera camera) : base(camera) { m_buttonType = eButtonType.None; }
//public public void SetButtonType(eButtonType _eButtonType) { buttonType = _eButtonType; }
public void ActionPlay(eButtonType buttonType, int pos) { Action <int> playedAction = buttonActionDic[buttonType]; playedAction(pos); }