Example #1
0
    InputPopupHandler GetPopupHandler(Vector2 position)
    {
        InputPopupHandler handler;

        if (handlers.TryGetValue(position, out handler))
        {
            return(handler);
        }

        handler            = new InputPopupHandler();
        handlers[position] = handler;
        return(handler);;
    }
Example #2
0
    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;
    }