8#ifndef MALENA_PORTFOLIO_POSITIONABLE_H
9#define MALENA_PORTFOLIO_POSITIONABLE_H
14#include <SFML/Graphics.hpp>
213#include "../../../../src/Traits/Spatial/Positionable.tpp"
Fluent animation controller bound to one object.
Trait that provides position, bounds, and animated movement.
Animate & animate()
Access this object's animation controller.
virtual void setPosition(const sf::Vector2f &position)
Set the world-space position immediately (no animation).
void anchorTopInWindow(float margin=0.f)
void setBelow(T &obj, float spacing=0)
Position this object immediately below obj.
void center(T &obj)
Center this object within obj (both axes).
void centerXInWindow(float offset=0.f)
Center this object horizontally within the window, plus offset px (retained).
void unanchored()
Drop every retained anchor on this object, freezing its current place.
virtual sf::Vector2f getPosition() const
Return the current world-space position.
void setAbove(T &obj, float spacing=0)
Position this object immediately above obj.
void centerVertically(T &obj)
Center this object vertically within obj.
void anchorRightInWindow(float margin=0.f)
void anchorLeftInWindow(float margin=0.f)
void centerHorizonally(T &obj)
Center this object horizontally within obj.
void centerInWindow()
Center this object within the window (retained; re-solves on resize).
void setRightOf(T &obj, float spacing=0)
Position this object immediately to the right of obj.
virtual sf::FloatRect getGlobalBounds() const
Return the axis-aligned bounding box in world space.
void setLeftOf(T &obj, float spacing=0)
Position this object immediately to the left of obj.
void anchorBottomInWindow(float margin=0.f)
void centerText(sf::Text &obj)
Center an sf::Text object within this object's bounds.
void centerYInWindow(float offset=0.f)
Center this object vertically within the window, plus offset px (retained).
Empty marker base class for all Malena traits.
Vector2< float > Vector2f