InputPopupHandler GetPopupHandler(Vector2 position) { InputPopupHandler handler; if (handlers.TryGetValue(position, out handler)) { return(handler); } handler = new InputPopupHandler(); handlers[position] = handler; return(handler);; }
void CheckPosition(Vector2 position) { InputPopupHandler handler; handlers.TryGetValue(position, out handler); if (activeHandler == handler) { return; } if (activeHandler != null) { activeHandler.Hide(); } if (handler != null) { handler.Show(); } activeHandler = handler; }