- Add point InSpace check to PD::Li::Math - Add Universal AlignmentCenter flag for Horizontal and and Vertical Alignment - Add Fallbackfont to Layout (if you dont want to set font per object) - Add Button Object WIP - Rename OnHover to OnFocus and add OnUnfocus - Move font and FontScale to ElementBase (for fallback logic etc) - Add UpdateInput func to ElementBase - Corectly Set fontScale in Text Rendering - Update ecample
19 lines
554 B
C++
19 lines
554 B
C++
#include <pd/lithium/formatters.hpp>
|
|
#include <pd/ultra/layout.hpp>
|
|
|
|
namespace PD {
|
|
namespace Ultra {
|
|
PD_API void Layout::Render(PD::Li::Drawlist& list) {
|
|
float fc = list.GetFontScale();
|
|
list.SetFontscale(GetCanvas().VTranslateFontscale(fc));
|
|
for (auto& it : GetElements()) {
|
|
it->SetFontIfNull(*pFont);
|
|
it->Update();
|
|
it->Draw(list);
|
|
}
|
|
list.DrawText(PD::fvec2(5, GetBotLeft().y - 40),
|
|
std::format("Lyt: [{}]", GetRenderspace()).c_str(), 0xffff00ff);
|
|
list.SetFontscale(fc);
|
|
}
|
|
} // namespace Ultra
|
|
} // namespace PD
|