|
enum | Style : uint8_t {
Regular = 0
, Bold = 1 << 0
, Italic = 1 << 1
, Underlined = 1 << 2
,
StrikeThrough = 1 << 3
} |
|
enum class | DrawModes : uint8_t { DRAW_IF_ON_TARGET
, DRAW_ALWAYS_HIDDEN
, DRAW_ALWAYS_DRAWN
, DRAW_DEFAULT = DRAW_IF_ON_TARGET
} |
|
enum class | CallbackContextModes : uint8_t { CONTEXT_MANUAL
, CONTEXT_AUTO
, CONTEXT_DEFAULT = CONTEXT_AUTO
} |
|
enum | ChildrenControlFlags : uint8_t { CHILDREN_AUTO_CLEAR_ON_REMOVE = 1 << 0
, CHILDREN_AUTO_UPDATE = 1 << 1
, CHILDREN_AUTO_DRAW = 1 << 2
, CHILDREN_DEFAULT = CHILDREN_AUTO_CLEAR_ON_REMOVE
} |
|
using | ChildrenControlFlags_t = std::underlying_type_t<ChildrenControlFlags> |
|
enum class | Types : uint8_t {
ANCHOR_NONE
, ANCHOR_UPLEFT_CORNER
, ANCHOR_UPRIGHT_CORNER
, ANCHOR_DOWNLEFT_CORNER
,
ANCHOR_DOWNRIGHT_CORNER
} |
|
enum class | Shifts : uint8_t { SHIFT_NONE
, SHIFT_POSITIVE_BOUNDS
, SHIFT_NEGATIVE_BOUNDS
} |
|
|
| ObjText (tiny_utf8::string string, fge::Font font, fge::Vector2f const &position={}, fge::CharacterSize characterSize=30) |
|
| ObjText (fge::Font font, fge::Vector2f const &position={}, fge::CharacterSize characterSize=30) |
|
fge::Object * | copy () override |
| Duplicate the object.
|
|
void | setFont (fge::Font font) |
|
fge::Font const & | getFont () const |
|
void | setString (tiny_utf8::string string) |
|
void | setCharacterSize (fge::CharacterSize size) |
|
void | setLineSpacingFactor (float spacingFactor) |
|
void | setLetterSpacingFactor (float spacingFactor) |
|
void | setStyle (std::underlying_type< Style >::type style) |
|
void | setFillColor (fge::Color const &color) |
|
void | setOutlineColor (fge::Color const &color) |
|
void | setOutlineThickness (float thickness) |
|
tiny_utf8::string const & | getString () const |
|
fge::CharacterSize | getCharacterSize () const |
|
float | getLetterSpacingFactor () const |
|
float | getLineSpacingFactor () const |
|
float | getLineSpacing () const |
|
float | getGlyphAdvance (uint32_t c) const |
|
std::underlying_type< Style >::type | getStyle () const |
|
fge::Color const & | getFillColor () const |
|
fge::Color const & | getOutlineColor () const |
|
float | getOutlineThickness () const |
|
fge::Vector2f | findCharacterPos (std::size_t index) const |
|
std::vector< fge::Character > & | getCharacters () |
|
std::vector< fge::Character > const & | getCharacters () const |
|
void | draw (fge::RenderTarget &target, const fge::RenderStates &states) const override |
| Method called every frame to draw the object.
|
|
void | save (nlohmann::json &jsonObject, fge::Scene *scene) override |
| Save the object to a json object.
|
|
void | load (nlohmann::json &jsonObject, fge::Scene *scene) override |
| Load the object from a json object.
|
|
void | pack (fge::net::Packet &pck) override |
| Pack the object into a packet.
|
|
void | unpack (fge::net::Packet const &pck) override |
| Unpack the object from a packet.
|
|
char const * | getClassName () const override |
| Get the unique class name of the object.
|
|
char const * | getReadableClassName () const override |
| Get a readable version of the class name.
|
|
fge::RectFloat | getGlobalBounds () const override |
| Get the global bounds of the object.
|
|
fge::RectFloat | getLocalBounds () const override |
| Get the local bounds of the object (without any transformations)
|
|
virtual void | first (fge::Scene &scene) |
| Method called when the object is added to a scene for initialization purposes.
|
|
virtual void | transfered (fge::Scene &oldScene, fge::Scene &newScene) |
| Method called when the object is transferred from a scene to another.
|
|
virtual void | callbackRegister (fge::Event &event, fge::GuiElementHandler *guiElementHandlerPtr) |
| Ask the object to register all callbacks it needs to receive events.
|
|
virtual void | update (fge::RenderWindow &screen, fge::Event &event, std::chrono::microseconds const &deltaTime, fge::Scene &scene) |
| Main method called every frame.
|
|
void | update (fge::RenderWindow &screen, fge::Event &event, std::chrono::microseconds const &deltaTime) |
|
virtual void | networkRegister () |
| Register all network types needed by the object.
|
|
virtual void | netSignaled (int8_t signal) |
| Method called when the object is signaled by the network.
|
|
virtual void | removed (fge::Scene &scene) |
| Method called when the object is removed from a scene.
|
|
virtual fge::Quad | getGlobalQuad () const |
|
virtual fge::Quad | getLocalQuad () const |
|
bool | saveInFile (std::string const &path) |
| Save the object in a file.
|
|
bool | loadFromFile (std::string const &path) |
| Load the object from a file.
|
|
virtual fge::GuiElement * | getGuiElement () |
| Get the GuiElement attached to this object if there is one.
|
|
glm::mat4 | getParentsTransform () const |
| Retrieve recursively all parents transform by combining them.
|
|
fge::Vector2f | getParentsScale () const |
| Retrieve recursively all parents scale by combining them.
|
|
void | setPosition (Vector2f const &position) |
|
Vector2f const & | getPosition () const |
|
void | move (Vector2f const &offset) |
|
void | setRotation (float angle) |
|
float | getRotation () const |
|
void | rotate (float angle) |
|
void | setScale (Vector2f const &factors) |
|
void | setScale (float factor) |
|
Vector2f const & | getScale () const |
|
void | scale (Vector2f const &factor) |
|
void | scale (float factor) |
|
void | setOrigin (Vector2f const &origin) |
|
Vector2f const & | getOrigin () const |
|
glm::mat4 const & | getTransform () const |
|
glm::mat4 const & | getInverseTransform () const |
|
void | updateAnchor (fge::Vector2f const &customTargetSize={0.0f, 0.0f}) |
|
void | setAnchor (Types type, fge::Vector2< Shifts > const &shift, fge::ObjectSid target=std::numeric_limits< fge::ObjectSid >::max()) |
|
void | setAnchorType (Types type) |
|
void | setAnchorShift (fge::Vector2< Shifts > const &shift) |
|
void | setAnchorTarget (fge::ObjectSid target) |
|
Types | getAnchorType () const |
|
fge::Vector2< Shifts > const & | getAnchorShift () const |
|
fge::ObjectSid | getAnchorTarget () const |
|
fge::Object * | getAnchorOwner () const |
|
void | setAnchorSuccessor (fge::ObjectDataWeak successor) |
|
fge::ObjectDataWeak | getAnchorSuccessor () const |
|
void | needAnchorUpdate (bool flag) |
|
bool | isNeedingAnchorUpdate () const |
|