Beispiel #1
0
 // In order for tests to run without an EditorWindow but still be able to send
 // events, we sometimes need to force the event type. IMGUI::GetEventType() (native) will
 // return the event type as Ignore if the proper views haven't yet been
 // initialized. This (falsely) breaks tests that rely on the event type. So for tests, we
 // just ensure the event type is what we originally set it to when we sent it.
 // This original type can be retrieved via Event.rawType.
 static EventBase MakeEvent(Event evt)
 {
     return(UIElementsUtility.CreateEvent(evt, evt.rawType));
 }