private Init ( Object targetObj, |
||
targetObj | Object | |
activatorRect | ||
showLabelIcons | bool | |
return | void |
// Returns true if shown internal static bool ShowAtPosition(Object targetObj, Rect activatorRect, bool showLabelIcons) { int instanceID = targetObj.GetInstanceID(); // We could not use realtimeSinceStartUp since it is resetted when entering playmode, we assume an increasing time when comparing time. long nowMilliSeconds = System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond; bool justClosed = nowMilliSeconds < s_LastClosedTime + 50; if (instanceID != s_LastInstanceID || !justClosed) { Event.current.Use(); s_LastInstanceID = instanceID; if (s_IconSelector == null) { s_IconSelector = ScriptableObject.CreateInstance <IconSelector>(); } s_IconSelector.Init(targetObj, activatorRect, showLabelIcons); return(true); } return(false); }