* Sets a function to be called every time the surface is mouse clicked. * @param handler Action handler. * @param button Mouse button to check for. Set to 0 for any button. */
| 408 | * @param button Mouse button to check for. Set to 0 for any button. |
| 409 | */ |
| 410 | void InteractiveSurface::onMouseClick(ActionHandler handler, Uint8 button) |
| 411 | { |
| 412 | if (handler != 0) |
| 413 | { |
| 414 | _click[button] = handler; |
| 415 | } |
| 416 | else |
| 417 | { |
| 418 | _click.erase(button); |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | /** |
| 423 | * Sets a function to be called every time the surface is mouse pressed. |
no outgoing calls