X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSettings.cpp;h=ef3cebe22e9f5ead286eff1659636a12d9d2fd93;hb=8afdcba610cded0e54b85069ba051268b29669a6;hp=284baf47fee87a90e732d7ed37a4ef72ef07e737;hpb=2cd28eb24fc1b4011511b6c3ed8c025bfc74de4d;p=lugaru.git diff --git a/Source/Settings.cpp b/Source/Settings.cpp index 284baf4..ef3cebe 100644 --- a/Source/Settings.cpp +++ b/Source/Settings.cpp @@ -40,6 +40,7 @@ void DefaultSettings(Game &game) { game.drawkey=SDLK_e; game.throwkey=SDLK_q; game.attackkey=MOUSEBUTTON1; + game.consolekey=SDLK_BACKQUOTE; game.chatkey=SDLK_t; } @@ -122,6 +123,8 @@ void SaveSettings(Game &game) { opstream << Input::keyToChar(game.throwkey); opstream << "\nAttack key:\n"; opstream << Input::keyToChar(game.attackkey); + opstream << "\nConsole key:\n"; + opstream << Input::keyToChar(game.consolekey); opstream << "\nChat key:\n"; opstream << Input::keyToChar(game.chatkey); opstream << "\nDamage bar:\n"; @@ -246,6 +249,9 @@ bool LoadSettings(Game &game) { } else if ( !strncmp(setting, "Attack key", 10) ) { ipstream.getline( string, sizeof(string) ); game.attackkey = Input::CharToKey(string); + } else if ( !strncmp(setting, "Console key", 11) ) { + ipstream.getline( string, sizeof(string) ); + game.consolekey = Input::CharToKey(string); } else if ( !strncmp(setting, "Chat key", 8) ) { ipstream.getline( string, sizeof(string) ); game.chatkey = Input::CharToKey(string);