Reimplement list sorting and Fix UI7 Layers
This commit is contained in:
@@ -51,10 +51,10 @@ PD_UI7_API void Button::Draw() {
|
||||
// io->Ren->OnScreen(screen);
|
||||
list->PathRect(FinalPos(), FinalPos() + size, io->FrameRounding);
|
||||
list->PathFill(io->Theme->Get(color));
|
||||
list->pLayer++;
|
||||
list->LayerUp();
|
||||
list->DrawText(FinalPos() + size * 0.5 - tdim * 0.5, label,
|
||||
io->Theme->Get(UI7Color_Text));
|
||||
list->pLayer--;
|
||||
list->LayerDown();
|
||||
}
|
||||
|
||||
PD_UI7_API void Button::Update() {
|
||||
|
||||
@@ -84,11 +84,11 @@ PD_UI7_API void DragData<T>::Draw() {
|
||||
list->PathRect(FinalPos() + fvec2(off_x, 0),
|
||||
FinalPos() + td + io->FramePadding, io->FrameRounding);
|
||||
list->PathFill(io->Theme->Get(UI7Color_Button));
|
||||
list->pLayer++;
|
||||
list->LayerUp();
|
||||
list->DrawTextEx(FinalPos() + fvec2(off_x, 0), p,
|
||||
io->Theme->Get(UI7Color_Text), LiTextFlags_AlignMid,
|
||||
td + io->FramePadding);
|
||||
list->pLayer--;
|
||||
list->LayerDown();
|
||||
off_x += td.x + io->ItemSpace.x + io->FramePadding.x;
|
||||
}
|
||||
list->DrawText(FinalPos() + fvec2(off_x, io->FramePadding.y * 0.5), label,
|
||||
|
||||
@@ -29,11 +29,11 @@ PD_UI7_API void Image::Draw() {
|
||||
// Assert(io.get() && list.get(), "Did you run Container::Init correctly?");
|
||||
// Assert(img.get(), "Image is nullptr!");
|
||||
// io->Ren->OnScreen(screen);
|
||||
list->pLayer++;
|
||||
list->LayerUp();
|
||||
list->DrawTexture(img);
|
||||
list->DrawRectFilled(FinalPos(), newsize, 0xffffffff);
|
||||
list->DrawSolid();
|
||||
list->pLayer--;
|
||||
list->LayerDown();
|
||||
}
|
||||
} // namespace UI7
|
||||
} // namespace PD
|
||||
Reference in New Issue
Block a user