MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / CheckBox

Class CheckBox

extensions/olcPGEX_QuickGUI.h:246–262  ·  view source on GitHub ↗

Creates a Button Control - a clickable, labelled rectangle

Source from the content-addressed store, hash-verified

244
245 // Creates a Button Control - a clickable, labelled rectangle
246 class CheckBox : public Button
247 {
248 public:
249 CheckBox(olc::QuickGUI::Manager& manager, // Associate with a Manager
250 const std::string& text, // Text to display
251 const bool check, // Is checked or not?
252 const olc::vf2d& pos, // Location of button top-left
253 const olc::vf2d& size); // Size of button
254
255 public:
256 bool bChecked = false;
257
258 public: // BaseControl overrides
259 void Update(olc::PixelGameEngine* pge) override;
260 void Draw(olc::PixelGameEngine* pge) override;
261 void DrawDecal(olc::PixelGameEngine* pge) override;
262 };
263
264 class ImageButton : public Button
265 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected