Oficina Framework  1.3
Games Framework
OficinaFramework::ScreenSystem::Screen Class Referenceabstract

A class representing a Screen to be rendered on the screen manager. More...

#include <ScreenSystem.hpp>

Public Member Functions

virtual ~Screen ()
 Destroys the screen and disposes it. More...
 
virtual void Initialize ()=0
 Initializes the screen, with the first logical values. More...
 
virtual void ReInitialize ()
 Reinitializes the screen. Used to reposition objects when a reinitialization is needed, but content must not be unloaded. More...
 
virtual void LoadContent ()=0
 Loads screen content, such as textures and other data. More...
 
virtual void UnloadContent ()=0
 Unloads screen content, such as textures and other data. More...
 
virtual void Update ()=0
 Updates the screen logic. More...
 
virtual void Draw ()=0
 Draws the screen graphics. More...
 
bool IsRemovable () const
 Gets if this screen was set to be removed and disposed. More...
 
bool IsContentLoaded () const
 Gets if the screen had its content data fully loaded. More...
 
bool IsActive () const
 Gets if the screen is active and can be updated. More...
 
bool IsVisible () const
 Gets if the screen is visible and can be drawn. More...
 
bool IsInitialized () const
 Gets if the screeen is initialized. More...
 
virtual void RemoveMe () final
 Sets the screen to be removed and be disposed. More...
 
virtual void SetActive (bool state) final
 Sets the screen active or not, changing its ability to be updated. More...
 
virtual void SetVisible (bool state) final
 Sets the screen visible or not, changing its ability to be drawn. More...
 
virtual void ReInitMe () final
 Sets the screen to be reinitialized. More...
 
virtual void ReInitMe_dont () final
 Unsets the screen to reinitialization. More...
 
bool IsReinitializable () const
 Gets if the screen was set to be reinitialized. More...
 
virtual float GetDepth () final
 Gets the depth of the current screen. The lower the depth, the more on the back it is. More...
 
virtual void SetDepth (float depth) final
 Sets the depth of the current screen. The lower the depth, the more on the back it is. More...
 

Detailed Description

A class representing a Screen to be rendered on the screen manager.

Constructor & Destructor Documentation

◆ ~Screen()

virtual OficinaFramework::ScreenSystem::Screen::~Screen ( )
virtual

Destroys the screen and disposes it.

Member Function Documentation

◆ Draw()

virtual void OficinaFramework::ScreenSystem::Screen::Draw ( )
pure virtual

Draws the screen graphics.

◆ GetDepth()

virtual float OficinaFramework::ScreenSystem::Screen::GetDepth ( )
finalvirtual

Gets the depth of the current screen. The lower the depth, the more on the back it is.

Returns
Depth of the screen on the manager.

◆ Initialize()

virtual void OficinaFramework::ScreenSystem::Screen::Initialize ( )
pure virtual

Initializes the screen, with the first logical values.

Attention
Call this method to fully complement your derived class.

◆ IsActive()

bool OficinaFramework::ScreenSystem::Screen::IsActive ( ) const

Gets if the screen is active and can be updated.

Returns
Whether the screen can be updated or not.
Note
Use this method inside your override of the Update method to separate the code that must still be executed, even though the screen is inactive.

◆ IsContentLoaded()

bool OficinaFramework::ScreenSystem::Screen::IsContentLoaded ( ) const

Gets if the screen had its content data fully loaded.

Returns
Wether the screen had its assets fully loaded or not.

◆ IsInitialized()

bool OficinaFramework::ScreenSystem::Screen::IsInitialized ( ) const

Gets if the screeen is initialized.

Returns
Whether the screen was initialized or not.

◆ IsReinitializable()

bool OficinaFramework::ScreenSystem::Screen::IsReinitializable ( ) const

Gets if the screen was set to be reinitialized.

◆ IsRemovable()

bool OficinaFramework::ScreenSystem::Screen::IsRemovable ( ) const

Gets if this screen was set to be removed and disposed.

Returns
Whether the screen is set to be removed or not.

◆ IsVisible()

bool OficinaFramework::ScreenSystem::Screen::IsVisible ( ) const

Gets if the screen is visible and can be drawn.

Returns
Whether the screen can be drawn or not.

◆ LoadContent()

virtual void OficinaFramework::ScreenSystem::Screen::LoadContent ( )
pure virtual

Loads screen content, such as textures and other data.

Attention
To prevent early usage of unallocated data, you must ALWAYS call Screen::LoadContent on the end of this method's override.

◆ ReInitialize()

virtual void OficinaFramework::ScreenSystem::Screen::ReInitialize ( )
virtual

Reinitializes the screen. Used to reposition objects when a reinitialization is needed, but content must not be unloaded.

Attention
Implementation is optional, but is all up to the developer.

◆ ReInitMe()

virtual void OficinaFramework::ScreenSystem::Screen::ReInitMe ( )
finalvirtual

Sets the screen to be reinitialized.

◆ ReInitMe_dont()

virtual void OficinaFramework::ScreenSystem::Screen::ReInitMe_dont ( )
finalvirtual

Unsets the screen to reinitialization.

◆ RemoveMe()

virtual void OficinaFramework::ScreenSystem::Screen::RemoveMe ( )
finalvirtual

Sets the screen to be removed and be disposed.

◆ SetActive()

virtual void OficinaFramework::ScreenSystem::Screen::SetActive ( bool  state)
finalvirtual

Sets the screen active or not, changing its ability to be updated.

Parameters
stateThe state of activity to be given to the screen.

◆ SetDepth()

virtual void OficinaFramework::ScreenSystem::Screen::SetDepth ( float  depth)
finalvirtual

Sets the depth of the current screen. The lower the depth, the more on the back it is.

Parameters
depthDepth to be given to the screen on the manager.

◆ SetVisible()

virtual void OficinaFramework::ScreenSystem::Screen::SetVisible ( bool  state)
finalvirtual

Sets the screen visible or not, changing its ability to be drawn.

Parameters
stateThe state of drawability to be given to the screen.

◆ UnloadContent()

virtual void OficinaFramework::ScreenSystem::Screen::UnloadContent ( )
pure virtual

Unloads screen content, such as textures and other data.

◆ Update()

virtual void OficinaFramework::ScreenSystem::Screen::Update ( )
pure virtual

Updates the screen logic.


The documentation for this class was generated from the following file: