senior-sigan / WHY_CPP

Simple Game Engine in C++ to create Retro games.
https://senior-sigan.github.io/WHY_CPP/
MIT License
7 stars 2 forks source link

Text input. #7

Open andrey-pagin opened 5 years ago

andrey-pagin commented 5 years ago

I want to do leaderboard. Now to text input I must use 30 or more ifs. Could you add possibility to normal text input.

senior-sigan commented 5 years ago

@includehead Could you please share an example where you use 30 ifs? I'm guessing what is the normal text input. If you have an API sugesstion I'll implement it. But now I cannot really get the problem.

Thanks.

andrey-pagin commented 5 years ago

Do you think it's ok to do one if to one symbol, like that if (IsClicked(KEY::SPACE)) string + " "; if (IsClicked(KEY::A)) string + "A"; if (IsClicked(KEY::B)) string + "B"; if (IsClicked(KEY::C)) string + "C"; ... ... ... But I need caps in leaderboard, it's also 30 ifs.