Implemented the changes to ConfigUtility in the client and server
The server's changes were easy. The clients means that the constructors for each scene have one less argument, and each scene has one less member. The exception to this is LobbyMenu, where the config is used in multiple places, so it was easier to have the config's reference as a member. To replace the config's usage, I added this line in most cases: ConfigUtility& config = ConfigUtility::GetSingleton(); The only requirement is that ConfigUtility::Create() and ConfigUtility::Delete() are called from the main() function.
This commit is contained in:
@@ -21,14 +21,14 @@
|
||||
*/
|
||||
#include "splash_screen.hpp"
|
||||
|
||||
#include "config_utility.hpp"
|
||||
|
||||
//-------------------------
|
||||
//Public access members
|
||||
//-------------------------
|
||||
|
||||
SplashScreen::SplashScreen(ConfigUtility* const argConfig):
|
||||
config(*argConfig)
|
||||
{
|
||||
logo.LoadSurface(config["dir.logos"] + "krstudios.bmp");
|
||||
SplashScreen::SplashScreen() {
|
||||
logo.LoadSurface(ConfigUtility::GetSingleton()["dir.logos"] + "krstudios.bmp");
|
||||
startTick = std::chrono::steady_clock::now();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user