A different kind of state class that would update and render over the top of the main state. Good for pause screens, menus, battle screens and even GUI.
More...
#include <VState.h>
|
|
typedef VGroup | VSUPERCLASS |
| | Used to call parent class functions when they are overrided in class.
|
| |
|
typedef VBase | VSUPERCLASS |
| | Used to call parent class functions when they are overrided in class.
|
| |
|
| | VSubState (sf::Color colour=sf::Color::Transparent) |
| |
|
void | Close () |
| | Closes the substate.
|
| |
| void | SetFillColour (const sf::Color &color) |
| |
|
virtual void | Initialise () |
| | Initialise the substate and its contents.
|
| |
|
virtual void | Cleanup () |
| | Destroys all content in the substate before cleaning it up.
|
| |
| virtual void | HandleEvents (const sf::Event &event) |
| |
| virtual void | Update (float dt) |
| |
| virtual void | Draw (sf::RenderTarget &RenderTarget) |
| |
| virtual void | PostDraw (sf::RenderTarget &RenderTarget) |
| |
| | VGroup (unsigned int maxSize=0) |
| |
| int | Length () |
| |
| VBase * | Add (VBase *object) |
| |
| VBase * | Remove (VBase *object, bool splice=false) |
| |
| VBase * | FirstAvailable () |
| |
| int | FirstNULL () |
| |
| VBase * | FirstExisting () |
| |
| VBase * | FirstAlive () |
| |
| VBase * | FirstDead () |
| |
| int | CountAlive (bool Recursive=false) |
| |
| int | CountDead (bool Recursive=false) |
| |
| VBase * | GetRandom (int min=0, int max=0) |
| |
| void | ForEach (std::function< void(VBase *)> function, bool recursive=false) |
| |
| void | ForEachAlive (std::function< void(VBase *)> function, bool recursive=false) |
| |
| void | ForEachDead (std::function< void(VBase *)> function, bool recursive=false) |
| |
| void | ForEachExists (std::function< void(VBase *)> function, bool recursive=false) |
| |
| VBase * | GetGroupItem (int index) |
| |
| template<class T > |
| T * | GetGroupItemAsType (int index) |
| |
| int | GetIndexOfItem (VBase *object) |
| |
|
void | OrganiseNULLS () |
| | Sort nullptr members to the bottom of the group.
|
| |
| void | Swap (int a, int b) |
| |
| void | Sort (std::function< bool(VBase *, VBase *)> func) |
| |
|
void | Reverse () |
| | Reverse order of group.
|
| |
|
void | Clear () |
| | Clears the whole group (does not destroy any of the members, that must be done using the Destroy method).
|
| |
|
virtual void | Destroy () override |
| | Removes and/or destroys all objects inside the group before destroying extra data. (If an object is referenced in another VGroup, the object won't be destroyed)
|
| |
|
virtual void | Kill () override |
| | Kills all living objects before killing the group itself.
|
| |
|
virtual void | Revive () override |
| | Revives all dead objects before reviving the group itself.
|
| |
|
|
std::function< void()> | OnClose = nullptr |
| | Callback function that can be called when VState::CloseSubState is called.
|
| |
|
VState * | ParentState = nullptr |
| | The VState object that the substate has been opened from.
|
| |
|
bool | UseParentCamera = false |
| | If true, the substate's transform is based on the parent state's camera.
|
| |
|
VTimeManager * | TimeManager = nullptr |
| | Local TimeManager of the substate.
|
| |
|
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.
|
| |
|
|
sf::VertexArray | vertices |
| | The vertex data to render the colour fade.
|
| |
|
std::vector< VBase * > | members |
| | VBase List.
|
| |
|
int | length = 0 |
| | Current amount of members in the list.
|
| |
|
unsigned int | MaxSize = 0 |
| | Maximum Size of the list, used if VGroup is set to have a fixed size.
|
| |
|
| static const wchar_t * | VString (const char *fmt,...) |
| |
| static void | VLog (const char *fmt,...) |
| |
| static void | VLogError (const char *fmt,...) |
| |
| static void | VClearLog () |
| |
A different kind of state class that would update and render over the top of the main state. Good for pause screens, menus, battle screens and even GUI.
◆ VSubState()
| VSubState::VSubState |
( |
sf::Color |
colour = sf::Color::Transparent | ) |
|
- Parameters
-
| colour | The background colour of the substate. |
◆ Draw()
| virtual void VSubState::Draw |
( |
sf::RenderTarget & |
RenderTarget | ) |
|
|
virtual |
Draws the substate's background and the content of the substate.
- Parameters
-
| RenderTarget | The game's sf::RenderTarget object to render data onto. |
Reimplemented from VGroup.
◆ HandleEvents()
| virtual void VSubState::HandleEvents |
( |
const sf::Event & |
event | ) |
|
|
inlinevirtual |
- Parameters
-
| event | The current event that can be processed. |
◆ PostDraw()
| virtual void VSubState::PostDraw |
( |
sf::RenderTarget & |
RenderTarget | ) |
|
|
inlinevirtual |
If overridden, allows the opportunity to render objects directly to the window, instead of the scene itself.
- Parameters
-
| RenderTarget | The game's sf::RenderWindow, after the scene had been rendered and post-processed effects had been applied. |
◆ SetFillColour()
| void VSubState::SetFillColour |
( |
const sf::Color & |
color | ) |
|
- Parameters
-
| color | The tint colour of the substate's background. |
◆ Update()
| virtual void VSubState::Update |
( |
float |
dt | ) |
|
|
virtual |
Update the substate.
- Parameters
-
Reimplemented from VGroup.
The documentation for this class was generated from the following file:
- D:/Development/Libs/Vigilante-Game-Framework/VFrame/VState.h