private void DoGlobalEventsGUI() { // TODO: // Context menu to find usages // Usages count DoSectionTitle(Strings.Label_Global_Events); foreach (var eventName in globals.Events) { var rect = GUILayoutUtility.GetRect(GUIContent.none, FsmEditorStyles.EventGlobalButton); sendIcon.Set(rect.x + 4, rect.y + 3, 12, rect.height - 4); FsmEditorContent.EventSendGlobalButton.text = eventName; if (GUI.Button(rect, FsmEditorContent.EventSendGlobalButton, FsmEditorStyles.EventGlobalButton)) { PlayMakerFSM.BroadcastEvent(eventName); } if (Event.current.type == EventType.Repaint) { GUIStyle.none.Draw(sendIcon, FsmEditorStyles.BroadcastIcon); } } GUILayout.Space(10); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Refresh")) { Init(); } if (GUILayout.Button("Open Events Browser", GUILayout.Width(EditButtonWidth))) { if (FsmEditor.Instance == null) { FsmEditor.Open(); } FsmEditor.OpenGlobalEventsWindow(); } GUILayout.EndHorizontal(); }
public static void OpenGlobalEventsWindow() { FsmEditor.OpenGlobalEventsWindow(); }