- Renderer now vould use more screen Objects - Register default Top and Bottom Screens (for Overlays and UI7) - Make ToHex an Inline header func - Add GetCompilerVersion - Add Library Compile And Version Info to common - Remove z of vertex object and shader in position - Add Container base and SubContainers to UI7 - Add abillity to Join Multiple Objects in Same Line and Center them - Fix LayerOrder Bug for updating texts in DrawList
32 lines
709 B
C++
32 lines
709 B
C++
#pragma once
|
|
|
|
#include <pd/ui7/container/container.hpp>
|
|
|
|
namespace PD {
|
|
namespace UI7 {
|
|
class Checkbox : public Container {
|
|
public:
|
|
Checkbox(const std::string& label, vec2 pos, bool& usr_ref,
|
|
LI::Renderer::Ref lr)
|
|
: usr_ref(usr_ref) {
|
|
this->screen = lr->CurrentScreen();
|
|
this->label = label;
|
|
this->SetPos(pos);
|
|
this->tdim = lr->GetTextDimensions(label);
|
|
color = UI7Color_FrameBackground;
|
|
this->SetSize(cbs + vec2(tdim.x() + 5, 0));
|
|
}
|
|
~Checkbox() {}
|
|
|
|
void HandleInput(Hid::Ref inp) override;
|
|
void Draw() override;
|
|
|
|
private:
|
|
vec2 tdim;
|
|
vec2 cbs = vec2(18);
|
|
UI7Color color;
|
|
std::string label;
|
|
bool& usr_ref;
|
|
};
|
|
} // namespace UI7
|
|
} // namespace PD
|