actually sensible classes
This commit is contained in:
parent
9bbefbc021
commit
c3b8761102
13 changed files with 128 additions and 152 deletions
|
|
@ -25,9 +25,9 @@ import :Transform;
|
|||
|
||||
export namespace Crafter {
|
||||
class Window;
|
||||
class MouseElement {
|
||||
class WindowMouse;
|
||||
class MouseElement : public Transform {
|
||||
public:
|
||||
Transform transform;
|
||||
Event<MouseMoveEvent> onMouseMove;
|
||||
Event<MouseMoveEvent> onMouseEnter;
|
||||
Event<MouseMoveEvent> onMouseLeave;
|
||||
|
|
@ -38,11 +38,11 @@ export namespace Crafter {
|
|||
Event<MousePoint> onMouseRightRelease;
|
||||
Event<MousePoint> onMouseLeftRelease;
|
||||
|
||||
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 = FractionalToMapped(0.5), std::int_fast32_t anchorOffsetY = FractionalToMapped(0.5), std::int_fast32_t z = 0, bool ignoreScaling = false);
|
||||
MouseElement(Transform transform);
|
||||
MouseElement(WindowMouse& window, std::int_fast32_t anchorX = FractionalToMapped(0.5), std::int_fast32_t anchorY = FractionalToMapped(0.5), std::uint_fast32_t relativeWidth = FractionalToMapped(1), std::uint_fast32_t relativeHeight = FractionalToMapped(1), std::int_fast32_t anchorOffsetX = FractionalToMapped(0.5), std::int_fast32_t anchorOffsetY = FractionalToMapped(0.5), std::int_fast32_t z = 0, bool ignoreScaling = false);
|
||||
MouseElement(std::int_fast32_t anchorX = FractionalToMapped(0.5), std::int_fast32_t anchorY = FractionalToMapped(0.5), std::uint_fast32_t relativeWidth = FractionalToMapped(1), std::uint_fast32_t relativeHeight = FractionalToMapped(1), std::int_fast32_t anchorOffsetX = FractionalToMapped(0.5), std::int_fast32_t anchorOffsetY = FractionalToMapped(0.5), std::int_fast32_t z = 0, bool ignoreScaling = false);
|
||||
MouseElement(MouseElement&) = delete;
|
||||
MouseElement& operator=(MouseElement&) = delete;
|
||||
void UpdatePosition(Window& window);
|
||||
void UpdatePosition(Window& window, Transform& parent);
|
||||
void UpdatePosition(Window& window) override;
|
||||
void UpdatePosition(Window& window, Transform& parent) override;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue