TmpMenu/src/lua/bindings/gui/checkbox.hpp

31 lines
629 B
C++
Raw Normal View History

#pragma once
#include "base_text_element.hpp"
namespace lua::gui
{
2023-07-02 00:59:02 +02:00
// Lua API: Class
// Name: checkbox
// Inherit: base_text_element
// Class representing a gui checkbox.
class checkbox : public base_text_element
{
bool m_enabled = false;
public:
checkbox(std::string text);
void draw() override;
2023-07-02 00:59:02 +02:00
// Lua API: Function
// Class: checkbox
// Name: is_enabled
// Returns: boolean: Is the checkbox checked?
bool is_enabled();
2023-07-02 00:59:02 +02:00
// Lua API: Function
// Class: checkbox
// Name: set_enabled
// Param: enabled: boolean: The desired enabled state of the checkbox.
void set_enabled(bool enabled);
};
}