Remove custom standard lib

Why?? cause it was russian roulette with pointer access stuff etc
This commit is contained in:
2025-12-17 10:02:05 +01:00
parent 66d3825481
commit 803fa5cdb5
27 changed files with 78 additions and 840 deletions

View File

@@ -34,9 +34,8 @@ PD_UI7_API void UI7::IO::Update() {
Time->Update();
InputHandler->Update();
Framerate = 1000.f / Delta;
DrawListRegestry.Clear();
DrawListRegestry.PushFront(
Pair<UI7::ID, Li::DrawList::Ref>("CtxBackList", Back));
DrawListRegestry.clear();
DrawListRegestry.push_front(std::make_pair("CtxBackList", Back));
// RegisterDrawList("CtxBackList", Back);
NumIndices = FDL->pNumIndices;
NumVertices = FDL->pNumVertices;

View File

@@ -66,7 +66,7 @@ PD_UI7_API void Layout::AddObject(Container::Ref obj) {
obj->Update();
CursorMove(obj->GetSize());
obj->HandleScrolling(ScrollOffset, WorkRect);
Objects.PushBack(obj);
Objects.push_back(obj);
}
PD_UI7_API void Layout::AddObjectEx(Container::Ref obj, u32 flags) {
@@ -83,9 +83,9 @@ PD_UI7_API void Layout::AddObjectEx(Container::Ref obj, u32 flags) {
obj->HandleScrolling(ScrollOffset, WorkRect);
}
if (flags & UI7LytAdd_Front) {
Objects.PushFront(obj);
Objects.push_front(obj);
} else {
Objects.PushBack(obj);
Objects.push_back(obj);
}
}
@@ -133,7 +133,7 @@ PD_UI7_API void Layout::Update() {
for (auto& it : tbr) {
IDObjects.erase(IDObjects.begin() + it);
}
Objects.Clear();
Objects.clear();
WorkRect = fvec4(fvec2(WorkRect.x, WorkRect.y), Size - IO->MenuPadding);
CursorInit();
}

View File

@@ -44,7 +44,7 @@ PD_UI7_API void Menu::Label(const std::string& label) {
PD_UI7_API bool Menu::Button(const std::string& label) {
bool ret = false;
u32 id = Strings::FastHash("btn" + label +
std::to_string(pLayout->Objects.Size()));
std::to_string(pLayout->Objects.size()));
Container::Ref r = pLayout->FindObject(id);
if (!r) {
r = Button::New(label, pIO);
@@ -59,7 +59,7 @@ PD_UI7_API bool Menu::Button(const std::string& label) {
PD_UI7_API void Menu::Checkbox(const std::string& label, bool& v) {
u32 id = Strings::FastHash("cbx" + label +
std::to_string(pLayout->Objects.Size()));
std::to_string(pLayout->Objects.size()));
Container::Ref r = pLayout->FindObject(id);
if (!r) {
r = Checkbox::New(label, v, pIO);

View File

@@ -272,7 +272,7 @@ PD_UI7_API void Context::MetricsMenu(bool *show) {
}
// Well this are Li Drawlists now and they do not count their stats (yet)
/*if (m->BeginTreeNode("DrawLists (" +
std::to_string(pIO->DrawListRegestry.Size()) + ")")) {
std::to_string(pIO->DrawListRegestry.size()) + ")")) {
for (auto &it : pIO->DrawListRegestry) {
if (m->BeginTreeNode(it.First.GetName())) {
m->Label("Vertices: " + std::to_string(it.Second->NumVertices));