# 0.3.1-1

- Add Deltatime usage for Overscroll as well as a config value for ids multiplier
- Add Function to Layout to remove all ID Objects
- Add step and precision to DragData as well as setting min and max to their type limits
- Use the Address for now for the id of the DragData (cause with tree nodes opened backwars all DragData will share the same data reference)
- Add a fix to MaxPosition in Layout to be actually the max Position on X axis
This commit is contained in:
2025-03-16 20:03:08 +01:00
parent 35272687f6
commit 6738fda55c
10 changed files with 53 additions and 22 deletions

View File

@@ -260,6 +260,8 @@ void UI7::Context::StyleEditor(bool* show) {
m->DragData("FramePadding", (float*)&io->FramePadding, 2, 0.f, 100.f);
m->DragData("ItemSpace", (float*)&io->ItemSpace, 2, 0.f, 100.f);
m->DragData("MinSliderSize", (float*)&io->MinSliderDragSize, 2, 1.f, 100.f);
m->DragData("OverScroll Modifier", &io->OverScrollMod, 1, 0.01f,
std::numeric_limits<float>::max(), 0.01f, 2);
m->SeparatorText("Theme");
if (m->Button("Dark")) {
UI7::Theme::Default(*io->Theme.get());
@@ -270,8 +272,9 @@ void UI7::Context::StyleEditor(bool* show) {
}
/// Small trick to print without prefix
#define ts(x) m->ColorEdit(std::string(#x).substr(9), &io->Theme->GetRef(x));
#define ts2(x) \
m->DragData(std::string(#x).substr(9), (u8*)&io->Theme->GetRef(x), 4, (u8)0, (u8)255);
#define ts2(x) \
m->DragData(std::string(#x).substr(9), (u8*)&io->Theme->GetRef(x), 4, (u8)0, \
(u8)255);
ts2(UI7Color_Background);
ts2(UI7Color_Button);
ts2(UI7Color_ButtonDead);