rendering element rewrite

This commit is contained in:
Jorijn van der Graaf 2025-12-28 00:05:03 +01:00
commit 3d40256bde
22 changed files with 799 additions and 795 deletions

View file

@ -27,14 +27,15 @@ import std;
using namespace Crafter;
MouseElement::MouseElement(WindowMouse& window, std::int_fast32_t anchorX, std::int_fast32_t anchorY, std::uint_fast32_t relativeWidth, std::uint_fast32_t relativeHeight, std::int_fast32_t anchorOffsetX, std::int_fast32_t anchorOffsetY, std::int_fast32_t z) : Transform(anchorX, anchorY, relativeWidth, relativeHeight, anchorOffsetX, anchorOffsetY, z) {
MouseElement::MouseElement(Anchor anchor, WindowMouse& window) : Transform(anchor) {
window.mouseElements.push_back(this);
}
MouseElement::MouseElement(std::int_fast32_t anchorX, std::int_fast32_t anchorY, std::uint_fast32_t relativeWidth, std::uint_fast32_t relativeHeight, std::int_fast32_t anchorOffsetX, std::int_fast32_t anchorOffsetY, std::int_fast32_t z) : Transform(anchorX, anchorY, relativeWidth, relativeHeight, anchorOffsetX, anchorOffsetY, z) {
MouseElement::MouseElement(Anchor anchor) : Transform(anchor) {
}
void MouseElement::UpdatePosition(Window& window) {
window.ScaleMouse(*this);
for(Transform* child : children) {