CYIFrameworkConfiguration is used to specify configuration settings for the CYIFramework class.
To configure CYIFramework, pass a configured instance of this class to CYIFramework::SetFrameworkConfiguration().
#include <framework/YiFrameworkConfiguration.h>
Public Member Functions | |
CYIFrameworkConfiguration () | |
virtual | ~CYIFrameworkConfiguration () |
void | SetMaxFonts (uint16_t maxFonts) |
void | SetTextAtlasSize (uint16_t fontAtlasSize, CYITextEngine::TextType textAtlasType=CYITextEngine::TextType::All) |
uint16_t | GetMaxFonts () const |
uint16_t | GetTextAtlasSize (CYITextEngine::TextType textAtlasType=CYITextEngine::TextType::All) const |
const std::map< CYITextEngine::TextType, uint16_t > & | GetTextAtlasSizes () const |
void | SetAudioEngineEnabled (bool enabled) |
bool | IsAudioEngineEnabled () const |
void | SetSpeechSynthesizerEnabled (bool enabled) |
bool | IsSpeechSynthesizerEnabled () const |
CYIFrameworkConfiguration::CYIFrameworkConfiguration | ( | ) |
|
virtual |
uint16_t CYIFrameworkConfiguration::GetMaxFonts | ( | ) | const |
Returns the maximum number of fonts to cache.
uint16_t CYIFrameworkConfiguration::GetTextAtlasSize | ( | CYITextEngine::TextType | textAtlasType = CYITextEngine::TextType::All | ) | const |
Returns the text atlas pixel dimension that the engine is configured to use for the specified textAtlasType.
const std::map<CYITextEngine::TextType, uint16_t>& CYIFrameworkConfiguration::GetTextAtlasSizes | ( | ) | const |
Returns a map containing the current size for each text atlas type.
bool CYIFrameworkConfiguration::IsAudioEngineEnabled | ( | ) | const |
Returns whether or not the Audio Engine will be enabled by this configuration. Default is true.
bool CYIFrameworkConfiguration::IsSpeechSynthesizerEnabled | ( | ) | const |
Returns whether or not the Speech Synthesizer will be enabled by this configuration. Default is true.
void CYIFrameworkConfiguration::SetAudioEngineEnabled | ( | bool | enabled | ) |
Set whether to enable the Audio Engine or not. The default is true. If false, the Audio Engine won't be initialized, saving a small amount of memory and CPU time. Could be use if the app doesn't plan on playing sounds at all, or if it is using a third party audio engine.
void CYIFrameworkConfiguration::SetMaxFonts | ( | uint16_t | maxFonts | ) |
Sets the maximum number of fonts to cache. The default is 0, which will use the caching system's default value.
void CYIFrameworkConfiguration::SetSpeechSynthesizerEnabled | ( | bool | enabled | ) |
Set whether to enable the Speech Synthesizer or not. The default is true. If false, the Speech Synthesizer won't be initialized, saving a small amount of memory and CPU time.
void CYIFrameworkConfiguration::SetTextAtlasSize | ( | uint16_t | fontAtlasSize, |
CYITextEngine::TextType | textAtlasType = CYITextEngine::TextType::All |
||
) |
Set the size of the text atlas in pixels. Specify textAtlasType to individually configure the size of the text atlas for each text type.
The font atlas is a square texture. This will set both the width and height of the texture.