|
enum | VTextAlign : unsigned char { ALIGNLEFT = 0,
ALIGNCENTER = 1,
ALIGNCENTRE = 1,
ALIGNRIGHT = 2
} |
| Propertry for aligning the text within the text box.
|
|
enum | VTextWrap : unsigned char { WRAPNONE = 0,
WRAPLETTER = 1,
WRAPWORD = 2
} |
| Property for the method of wrapping the text when it reaches the edge of the box.
|
|
typedef VObject | VSUPERCLASS |
| Used to call parent class functions when they are overrided in class.
|
|
enum | SidesTouching : unsigned char {
TOUCHNONE = 0,
TOUCHLEFT = 1 << 0,
TOUCHRIGHT = 1 << 1,
TOUCHTOP = 1 << 2,
TOUCHBOTTOM = 1 << 3,
TOUCHWALL = TOUCHLEFT | TOUCHRIGHT,
TOUCHALL = TOUCHLEFT | TOUCHRIGHT | TOUCHTOP | TOUCHBOTTOM
} |
| Flags for which sides are allowed to check if being overlapped for collision purposes.
|
|
typedef VBase | VSUPERCLASS |
| Used to call parent class functions when they are overrided in class.
|
|
|
| VText (float x=0, float y=0, float width=0, const sf::String &text="", int charSize=8) |
|
| VText (sf::Vector2f position, float width=0, const sf::String &text="", int charSize=8) |
|
VText * | SetFormat (const sf::String &filename, int charSize=8, sf::Color colour=sf::Color::White, VTextAlign alignment=VTextAlign::ALIGNLEFT, int style=sf::Text::Regular) |
|
VText * | SetFormat (sf::Font &fontData, int charSize=8, sf::Color colour=sf::Color::White, VTextAlign alignment=VTextAlign::ALIGNLEFT, int style=sf::Text::Regular) |
|
void | SetText (const sf::String &text) |
|
void | SetStyle (int style=sf::Text::Regular) |
|
void | SetFillTint (const sf::Color &colour) |
|
void | SetOutlineTint (const sf::Color &colour) |
|
void | SetFontSize (unsigned int size) |
|
void | SetWrap (const VTextWrap &wrapMode) |
|
void | SetLineSpaceModifier (int lineSpacing) |
|
void | SetAlignment (const VTextAlign &align) |
|
void | SetOutlineThickness (float thickness) |
|
void | SetOutlineOffset (const sf::Vector2f &offset) |
|
void | SetTextWidth (float width) |
|
const sf::String & | GetText () |
|
const int | GetLength () |
|
unsigned int | GetStyle () |
|
sf::Color const & | GetFillTint () |
|
sf::Color const & | GetOutlineTint () |
|
unsigned int | GetFontSize () |
|
VTextWrap const & | GetWrap () |
|
int | GetLineSpaceModifier () |
|
VTextAlign const & | GetAlignment () |
|
float | GetOutlineThickness () |
|
sf::Vector2f const & | GetOutlineOffset () |
|
float | GetTextWidth () |
|
virtual void | Destroy () override |
| Destroys the text rendering data (and font if disposable is set for true).
|
|
virtual void | Draw (sf::RenderTarget &RenderTarget) override |
|
| VObject (sf::Vector2f position, sf::Vector2f size=sf::Vector2f()) |
|
| VObject (float x=0, float y=0, float width=0, float height=0) |
|
void | SetPositionAtCentre (float x, float y) |
|
void | SetPositionAtCentre (sf::Vector2f newPos) |
|
bool | IsSolid () |
|
virtual void | Reset (sf::Vector2f newPos) |
|
virtual void | Reset (float x, float y) |
|
virtual void | Hurt (float damage) |
|
virtual void | Update (float dt) |
|
virtual void | Kill () |
|
virtual void | Revive () |
| Revives the object by setting both alive and exists back to true.
|
|
|
sf::RenderStates | RenderState = sf::RenderStates::Default |
| RenderState for the vertex data.
|
|
sf::Vector2f | Origin |
| Origin point as percentage.
|
|
sf::Vector2f | Scale = sf::Vector2f(1, 1) |
| Scale transform.
|
|
sf::Vector2f | Position |
| Position of the object.
|
|
sf::Vector2f | Size |
| Size of the object.
|
|
sf::Vector2f | Last |
| Position of the object on the previous frame.
|
|
float | Radius = 0 |
| Radius amount for Circle Collisions.
|
|
float | Angle = 0 |
| Angle of object.
|
|
float | AngleVelocity = 0 |
| Velocity of rotation.
|
|
float | AngleAcceleration = 0 |
| Acceleration of rotation.
|
|
float | AngleDrag = 0 |
| Drag of rotation.
|
|
float | AngleMax = 10000 |
| Maximum Velocity of rotation.
|
|
bool | Moves = true |
| If true, updates the objects position and angle.
|
|
sf::Vector2f | Velocity |
| Velocity of movement.
|
|
sf::Vector2f | Acceleration |
| Acceleration of movement.
|
|
sf::Vector2f | Drag |
| Drag of movement.
|
|
sf::Vector2f | MaxVelocity |
| Maximum velocity of movement.
|
|
sf::Vector2f | ScrollFactor |
| The amount the object will appear to move when the camera scrolls (1.0f = Scrolls as fast as the camera, 0.5f = Scrolls half as fast as the camera). Good for parallax scrolling.
|
|
float | RotateFactor = 1 |
| The amount the object will appear to rotate when the camera rotates (1.0f = Rotates as fast as the camera, 0.5f = Rotates half as fast as the camera). Good for parallax scrolling.
|
|
float | ZoomFactor = 1 |
| The amount the object will appear to scale when the camera zooms (1.0f = Scales as fast as the camera, 0.5f = Scales half as fast as the camera). Good for parallax scrolling.
|
|
float | Elasticity = 0 |
| Bounciness of the object (0 assumes no bounce)
|
|
float | Mass = 1 |
| Mass of object in comparison to other objects in world.
|
|
float | Health = 100 |
| Standard health value (object dies if health is <= 0 when modified in the Hurt function)
|
|
bool | Immovable = false |
| If true, the object will not change its velocity on collision.
|
|
unsigned char | Touching = SidesTouching::TOUCHNONE |
| Which sides are currently touching (is reset on each Update call!)
|
|
unsigned char | WasTouching = SidesTouching::TOUCHNONE |
| Which sides on previous frame were touching (is reset on each Update call!)
|
|
unsigned char | AllowCollisions = SidesTouching::TOUCHALL |
| Which sides are allowed to check collisions for.
|
|
bool | CollisionXDrag = true |
| Useful for moving platforms.
|
|
bool | active = true |
| Base can be updated using Update if true.
|
|
bool | visible = true |
| Base can be rendered using Draw if true.
|
|
bool | alive = true |
| Helper member that is mainly used filter out behaviours to objects which aren't alive in the scene.
|
|
bool | exists = true |
| Base can be updated and rendered if true, else it would no longer be treated as being part of the scene.
|
|
VType | type = NONE |
| Base object type, typically set in the constructor of an inherited object to specify what type it is.
|
|
uint32_t | RefCount = 0 |
| Counts the amount of times the object is referenced in groups, ensures an object is only destroyed when no longer part of a single group.
|
|
|
virtual void | updateTextRender (const sf::String &text) |
|
virtual void | updateTransform () override |
| Update the transformable object.
|
|
void | setDimensions () |
| Setup the string of text so that it fits within the text width.
|
|
void | setCharacterRender (const sf::Glyph &glyph, float x, float y, sf::Color color, bool bold, float italic, int index, sf::VertexArray &vertices, float outline=0) |
|
void | setTextLine (float x, float y, sf::Color color, float offset, float thickness, int index, sf::VertexArray &vertices, float outline=0) |
|
virtual void | updateMotion (float dt) |
|
|
sf::VertexArray | vertices |
| Vertex Data.
|
|
sf::Font * | font = nullptr |
| Font object.
|
|
sf::String | text |
| String of text that will be rendered.
|
|
int | length = 0 |
| Current length of text.
|
|
unsigned int | fontSize = 8 |
| Size of the text per character.
|
|
unsigned int | style = sf::Text::Regular |
| Flags for setting a text's display style.
|
|
VTextWrap | wrap = WRAPWORD |
| Text wrapping mode.
|
|
int | lineSpaceModifier = 0 |
| Used for adjusting the distance between lines different to the default.
|
|
VTextAlign | alignment = ALIGNLEFT |
| Text alignment property.
|
|
float | outlineThickness = 0.0f |
| The thickness of the outline.
|
|
sf::Vector2f | outlineOffset |
| The position offset of the outline. Good to modify if you want to display the outline like a shadow.
|
|
bool | dirty = false |
| If true, the text vertex data is rebuilt for all the new properties.
|
|
bool | disposible = false |
| If true, the font is disposed by the Text object (in case the font isn't loaded from VContent).
|
|
sf::Vector2f | origin |
| Origin point for rotation.
|
|
sf::Color | fillColour = sf::Color::White |
| Main colour of the font.
|
|
sf::Color | outlineColour = sf::Color::White |
| Colour of the font outline.
|
|
|
static bool | separate (VObject *a, VObject *b) |
|
static bool | separateCircle (VObject *a, VObject *b) |
|
static bool | touchFlag (VObject *a, VObject *b) |
|
static float | computeVelocity (float v, float a, float d, float max, float dt) |
|
static bool | TestInView (const sf::View &renderTargetView, sf::View *defaultView, VObject *o, const sf::FloatRect &renderBox=sf::FloatRect()) |
|
static const wchar_t * | VString (const char *fmt,...) |
|
static void | VLog (const char *fmt,...) |
|
static void | VLogError (const char *fmt,...) |
|
static void | VClearLog () |
|
static float | SeparateBias |
| Adds to the maximum overlap distance between objects.
|
|
Object that renders text.