# Changes

- Remove () from vec formatter
 -Add Merge function to DrawList to Move Data into the Current DrawList
- Fix stupid bug in Rect.hpp which caused some problems in line rendering
- Remove some unused UI7 Flags
- io: Allocate FinalDrawList and add GetViewPort func
- Readd TreeNodes to Menu
- Add ABout/Style and Metrics Menu to Context
- Add some Variables for cliprects in ui7 container.hpp
- Add InputHandler functionality to DynObj
- Fix Menu Layout Render Order
- Add Better Menu Sorting to Context
# ppam
- Use stringview instead of hardcoded const char*
# Todos
- Work on the Lithium 3D System
- Fix UI7 Menu Order to Pop new Menus into the front instead of the background
- Add Scrolling support to menu (or integrate it into layout maybe)
This commit is contained in:
2025-07-01 21:43:35 +02:00
parent 01fb149e71
commit 31a0c3656f
18 changed files with 558 additions and 81 deletions

View File

@ -33,13 +33,21 @@ namespace PD {
namespace Li {
PD_LITHIUM_API void DrawList::DrawSolid() { CurrentTex = Gfx::GetSolidTex(); }
PD_LITHIUM_API void DrawList::Merge(DrawList::Ref list) {
for (size_t i = 0; i < list->pDrawList.size(); i++) {
pDrawList.push_back(std::move(list->pDrawList[i]));
}
/** Make sure The list gets cleared */
list->Clear();
}
PD_LITHIUM_API Command::Ref DrawList::PreGenerateCmd() {
Command::Ref cmd = Command::New();
cmd->Layer = Layer;
cmd->Index = pDrawList.size();
cmd->Tex = CurrentTex;
pClipCmd(cmd.get());
return std::move(cmd);
return cmd;
}
PD_LITHIUM_API void DrawList::pClipCmd(Command *cmd) {
@ -193,7 +201,7 @@ PD_LITHIUM_API void DrawList::DrawCircle(const fvec2 &center, float rad,
float am = (M_PI * 2.0f) * ((float)num_segments) / (float)num_segments;
PathArcToN(center, rad, 0.f, am, num_segments);
}
DrawSolid(); // Only Solid Color Supported
DrawSolid(); // Only Solid Color Supported
PathStroke(color, thickness, (1 << 0));
}
@ -234,7 +242,7 @@ PD_LITHIUM_API void DrawList::DrawPolyLine(const Vec<fvec2> &points, u32 clr,
PD_LITHIUM_API void DrawList::DrawConvexPolyFilled(const Vec<fvec2> &points,
u32 clr) {
if (points.Size() < 3) {
return; // Need at least three points
return; // Need at least three points
}
auto cmd = PreGenerateCmd();
Renderer::CmdConvexPolyFilled(cmd.get(), points, clr, CurrentTex);
@ -276,5 +284,5 @@ PD_LITHIUM_API void DrawList::DrawLine(const fvec2 &a, const fvec2 &b,
PathAdd(b);
PathStroke(color, t);
}
} // namespace Li
} // namespace PD
} // namespace Li
} // namespace PD