Skip to content
Snippets Groups Projects
Select Git revision
2 results Searching

checkbox.hpp

Blame
  • checkbox.hpp 677 B
    #ifndef CHECKBOX_HPP_INCLUDED
    #define CHECKBOX_HPP_INCLUDED
    
    #include "widgets.hpp"
    #include "application.hpp"
    
    class CheckBox : public Widget {
    private:
        bool _checked;
        int _value;
        int playerValue;
    
    public:
        CheckBox(Application *parent, int x, int y, int sx, int sy);
    
        void draw() override;
        void handle(genv::event ev) override;
        bool is_checked() override;
        void value(int) override;
        int value_sz() override;
        int getPlayerValue() const override;
    private:
        void drawCross(int x, int y, int width, int height, int r, int g, int b);
        void drawCircle(int x, int y, int radius, int r, int g, int b);
    
    };
    
    #endif // CHECKBOX_HPP_INCLUDED