| 1 |
/* |
| 2 |
* Copyright (C) 2004 Ivo Danihelka ([email protected]) |
| 3 |
* |
| 4 |
* This program is free software; you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU General Public License as published by |
| 6 |
* the Free Software Foundation; either version 2 of the License, or |
| 7 |
* (at your option) any later version. |
| 8 |
*/ |
| 9 |
#include "MouseStroke.h" |
| 10 |
|
| 11 |
#include "StringTool.h" |
| 12 |
|
| 13 |
//----------------------------------------------------------------- |
| 14 |
/** |
| 15 |
* Create new stroke from MouseButtonEvent. |
| 16 |
*/ |
| 17 |
MouseStroke::MouseStroke(const SDL_MouseButtonEvent &event) |
| 18 |
: m_loc(event.x, event.y) |
| 19 |
{ |
| 20 |
m_button = event.button; |
| 21 |
} |
| 22 |
//----------------------------------------------------------------- |
| 23 |
/** |
| 24 |
* Return text fashion. |
| 25 |
*/ |
| 26 |
std::string |
| 27 |
MouseStroke::toString() const |
| 28 |
{ |
| 29 |
return StringTool::toString(m_button); |
| 30 |
} |
| 31 |
|