Updating a few more things to state events, will probably stop here for now and revist the trailing things later.

This commit is contained in:
2023-03-01 14:16:50 -08:00
parent 8cc122d97c
commit d1892c3617
15 changed files with 397 additions and 405 deletions

View File

@ -4,7 +4,7 @@
// https://opensource.org/licenses/MIT
#pragma once
#include "event/Event.hpp"
#include "state/State.hpp"
#include "asset/AssetManager.hpp"
namespace Dawn {
@ -14,7 +14,7 @@ namespace Dawn {
std::string language;
};
class LocaleManager {
class LocaleManager : public StateOwner {
private:
DawnGame *game;
LanguageAsset *asset;
@ -26,8 +26,8 @@ namespace Dawn {
void onLanguageLoaded();
public:
Event<> eventLocaleChanged;
Event<> eventLanguageUpdated;
StateEvent<> eventLocaleChanged;
StateEvent<> eventLanguageUpdated;
/**
* Initializes the Locale Manager Instance. Locale Manager is responsible