Exemplo n.º 1
0
Arquivo: tool.cpp Projeto: JRevel/src
void Tool::update(const PlayerController &event)
{
    updateTool(event);
    if(event.pressed(SELECT) && isInside(event.mousePos()))
    {
        if(m_selected)
            m_player = (m_player+1)%m_players.size();
        else
        {
            select();
        }
    }
}
Exemplo n.º 2
0
void GuiCommandButton::actionPerformed(const PlayerController &event, Vec pos, Vec dim, Gui* gui)
{
    if(event.pressed(0))
        m_commands++;
}