2026-04-02 23:29:53 +02:00
|
|
|
#include <pd/lithium/formatters.hpp>
|
2026-03-26 21:02:10 +01:00
|
|
|
#include <pd/ultra/layout.hpp>
|
|
|
|
|
|
|
|
|
|
namespace PD {
|
|
|
|
|
namespace Ultra {
|
2026-04-03 12:43:49 +02:00
|
|
|
PD_API void Layout::Render(PD::Li::Drawlist& list) {
|
|
|
|
|
float fc = list.GetFontScale();
|
|
|
|
|
list.SetFontscale(GetCanvas().VTranslateFontscale(fc));
|
2026-03-29 04:28:45 +02:00
|
|
|
for (auto& it : GetElements()) {
|
2026-04-03 15:17:43 +02:00
|
|
|
it->SetFontIfNull(*pFont);
|
2026-04-02 23:29:53 +02:00
|
|
|
it->Update();
|
2026-04-03 12:43:49 +02:00
|
|
|
it->Draw(list);
|
2026-03-26 21:02:10 +01:00
|
|
|
}
|
2026-04-03 12:43:49 +02:00
|
|
|
list.DrawText(PD::fvec2(5, GetBotLeft().y - 40),
|
|
|
|
|
std::format("Lyt: [{}]", GetRenderspace()).c_str(), 0xffff00ff);
|
|
|
|
|
list.SetFontscale(fc);
|
2026-03-26 21:02:10 +01:00
|
|
|
}
|
|
|
|
|
} // namespace Ultra
|
|
|
|
|
} // namespace PD
|