X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGame.cpp;h=5465a8e96012356bda8072a3c851ac02d2bb8e26;hb=0aab437dc560d2afa982e61cc2547756ad7b0761;hp=54b4f2f6907d11bc702ef2e972d2e602ad7ed433;hpb=8b6e8f3ad7390309795eb35c0959264cb7924402;p=lugaru.git diff --git a/Source/Game.cpp b/Source/Game.cpp index 54b4f2f..5465a8e 100644 --- a/Source/Game.cpp +++ b/Source/Game.cpp @@ -1,6 +1,6 @@ /* Copyright (C) 2003, 2010 - Wolfire Games -Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) +Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. @@ -175,11 +175,13 @@ void Game::inputText(string& str, unsigned* charselected) } else if (evenement.key.keysym.sym == SDLK_END) { (*charselected) = str.size(); } else if (evenement.key.keysym.sym == SDLK_LEFT) { - if ((*charselected) != 0) + if ((*charselected) != 0) { (*charselected)--; + } } else if (evenement.key.keysym.sym == SDLK_RIGHT) { - if ((*charselected) < str.size()) + if ((*charselected) < str.size()) { (*charselected)++; + } } else if (evenement.key.keysym.sym == SDLK_RETURN) { waiting = false; }