Skip to content

Commit

Permalink
[gamekit] Updated. Menu background fixed. [Config] Now creating 'conf…
Browse files Browse the repository at this point in the history
…ig' folder if it doesn't exist yet.
  • Loading branch information
Unarelith committed Jul 7, 2020
1 parent b6f531a commit 1a4227a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion external/gamekit
Binary file modified resources/textures/menu_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion source/client/core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@

#include <sol/sol.hpp>

#include <filesystem.hpp>

#include "Config.hpp"

namespace fs = ghc::filesystem;

// Gameplay
bool Config::isFlyModeEnabled = false;
bool Config::isNoClipEnabled = false;
Expand Down Expand Up @@ -65,7 +69,10 @@ std::string Config::defaultUsername = "";
std::string Config::defaultServerAddress = "localhost:4242";

void Config::loadConfigFromFile(const char *filename) {
if (gk::Filesystem::fileExists(filename)) {
if (!fs::exists("config"))
fs::create_directory("config");

if (fs::exists(filename)) {
sol::state lua;

try {
Expand Down

0 comments on commit 1a4227a

Please sign in to comment.