| 28 | TextButton::~TextButton() = default; |
| 29 | |
| 30 | void TextButton::eventOccured(Event *e) |
| 31 | { |
| 32 | Control::eventOccured(e); |
| 33 | |
| 34 | if (e->type() == EVENT_FORM_INTERACTION && e->forms().RaisedBy == shared_from_this() && |
| 35 | e->forms().EventFlag == FormEventType::MouseDown) |
| 36 | { |
| 37 | fw().soundBackend->playSample(buttonclick); |
| 38 | } |
| 39 | |
| 40 | if (e->type() == EVENT_FORM_INTERACTION && e->forms().RaisedBy == shared_from_this() && |
| 41 | e->forms().EventFlag == FormEventType::MouseClick) |
| 42 | { |
| 43 | this->pushFormEvent(FormEventType::ButtonClick, e); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | void TextButton::onRender() |
| 48 | { |
nothing calls this directly
no test coverage detected