| 10 | { |
| 11 | |
| 12 | int ColourWindow::getRand(int _min, int _max) |
| 13 | { |
| 14 | if (_max < _min) |
| 15 | std::swap(_max, _min); |
| 16 | int range = _max - _min; |
| 17 | if (range == 0) |
| 18 | return 0; |
| 19 | int result = ::rand() % range; |
| 20 | if (result < 0) |
| 21 | result = -result; |
| 22 | return _min + result; |
| 23 | } |
| 24 | |
| 25 | ColourWindow::ColourWindow(MyGUI::Widget* _parent) : |
| 26 | BaseLayout("ColourWindow.layout", _parent) |