Creates a Button Control - a clickable, labelled rectangle
| 221 | |
| 222 | // Creates a Button Control - a clickable, labelled rectangle |
| 223 | class Button : public BaseControl |
| 224 | { |
| 225 | public: |
| 226 | Button(olc::QuickGUI::Manager& manager, // Associate with a Manager |
| 227 | const std::string& text, // Text to display |
| 228 | const olc::vf2d& pos, // Location of button top-left |
| 229 | const olc::vf2d& size); // Size of button |
| 230 | |
| 231 | public: |
| 232 | // Position of button |
| 233 | olc::vf2d vPos; |
| 234 | // Size of button |
| 235 | olc::vf2d vSize; |
| 236 | // Text displayed on button |
| 237 | std::string sText; |
| 238 | |
| 239 | public: // BaseControl overrides |
| 240 | void Update(olc::PixelGameEngine* pge) override; |
| 241 | void Draw(olc::PixelGameEngine* pge) override; |
| 242 | void DrawDecal(olc::PixelGameEngine* pge) override; |
| 243 | }; |
| 244 | |
| 245 | // Creates a Button Control - a clickable, labelled rectangle |
| 246 | class CheckBox : public Button |
nothing calls this directly
no outgoing calls
no test coverage detected