Exemplo n.º 1
0
void Stage::OnLeftDown(wxMouseEvent &inEvent) {
    // Restore focus to the stage (or our game engine, if it's on top).
    if (GameEngineIsDisplayed())
        GameEngineSetFocus();
    else
        SetFocus();

    // Dispatch the event.
    if (ShouldSendEvents()) {
        EventDispatcher *disp = FindEventDispatcher(inEvent.GetPosition());
        disp->DoEventLeftDown(inEvent, false);
    }
}
Exemplo n.º 2
0
void Stage::OnLeftDClick(wxMouseEvent &inEvent) {
    if (ShouldSendEvents()) {
        EventDispatcher *disp = FindEventDispatcher(inEvent.GetPosition());
        disp->DoEventLeftDown(inEvent, true);   
    }
}