

Definition at line 11 of file RadioBox.h.
Public Member Functions | |
| RadioBox (const std::string ¶m, const std::string &value, const Path &picture) | |
| virtual void | drawOn (SDL_Surface *screen) |
| Draw border for selected button. | |
Protected Member Functions | |
| virtual void | own_mouseButton (const MouseStroke &stroke) |
| Select button and set param=value. | |
|
||||||||||||||||
|
Definition at line 16 of file RadioBox.cpp. 00018 : WiContainer(new WiPicture(picture), BORDER), m_param(param), m_value(value) 00019 { 00020 }
|
|
|
Draw border for selected button.
Reimplemented from WiContainer. Definition at line 26 of file RadioBox.cpp. 00027 {
00028 if (OptionAgent::agent()->getParam(m_param) == m_value) {
00029 SDL_Rect rect;
00030 rect.x = m_shift.getX();
00031 rect.y = m_shift.getY();
00032 rect.w = getW();
00033 rect.h = getH();
00034
00035 Uint32 green = SDL_MapRGB(screen->format, 0x00, 0xff, 0x00);
00036 SDL_FillRect(screen, &rect, green);
00037 }
00038 WiContainer::drawOn(screen);
00039 }
|
|
|
Select button and set param=value.
Reimplemented from WiContainer. Definition at line 45 of file RadioBox.cpp. 00046 {
00047 if (stroke.isLeft()) {
00048 OptionAgent::agent()->setPersistent(m_param, m_value);
00049 }
00050 }
|
1.4.2