Exemple #1
0
void BriefingScreen::mouse_down(const MouseDownEvent& event) {
    Point off   = offset();
    Point where = event.where();
    where.offset(-off.h, -off.v);
    for (const auto& pict : _inline_pict) {
        if (pict.bounds.contains(where) && pict.object) {
            stack()->push(new ObjectDataScreen(
                    event.where(), *pict.object, ObjectDataScreen::MOUSE, event.button(),
                    Key::NONE, Gamepad::Button::NONE));
            return;
        }
    }
    InterfaceScreen::mouse_down(event);
}
Exemple #2
0
void EventTracker::mouse_down(const MouseDownEvent& event) {
    if (_strict && _button) {
        throw Exception("Received MouseDownEvent when mouse already down.");
    }
    _button = true;
    _mouse = event.where();
}
Exemple #3
0
void GameCursor::mouse_down(const MouseDownEvent& event) {
    if (event.where().h >= viewport().left) {
        wake();
    }
}