Start Implement AutoSizing into UI7

This commit is contained in:
2024-02-20 20:35:31 +01:00
parent 168614d579
commit 33bb37be06
6 changed files with 24 additions and 4 deletions

View File

@ -104,12 +104,19 @@ void Sample::Draw() const {
UI7::SameLine();
UI7::Checkbox("RD7-Debug", rd7_debugging);
UI7::InputText("Search", search__, "Tap Here");
UI7::Label("Text Control:");
if(UI7::Button("text++")) txt_size+=0.01;
UI7::SameLine();
if(UI7::Button("text--")) txt_size -= 0.01;
UI7::SameLine();
if(UI7::Button("def")) txt_size = 0.5;
}
UI7::EndMenu();
}
}
void Sample::Logic() {
RenderD7::CustomTextSize(txt_size);
for (const auto& it : shared_requests) {
if (it.first == 1U) {
if (it.second) RenderD7::LoadSettings();

View File

@ -28,5 +28,6 @@ class Sample : public RenderD7::Scene {
mutable std::vector<std::string> names;
mutable std::vector<std::string> files;
mutable int sel;
mutable float txt_size = 0.5f;
State state = State_Menu;
};