Changeset cd1cb0f in opengl-game for game-gui-sdl.cpp


Ignore:
Timestamp:
Dec 24, 2019, 12:48:49 AM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
0fe8433
Parents:
a79be34
git-author:
Dmitry Portnoy <dmitry.portnoy@…> (12/22/19 03:45:12)
git-committer:
Dmitry Portnoy <dmitry.portnoy@…> (12/24/19 00:48:49)
Message:

In VulkanGame, make the ship move when the player holds down the right or left arrow keys

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game-gui-sdl.cpp

    ra79be34 rcd1cb0f  
    1010
    1111string GameGui_SDL::s_errorMessage;
     12
     13GameGui_SDL::GameGui_SDL() : keyState(SDL_GetKeyboardState(NULL)) {
     14}
    1215
    1316string& GameGui_SDL::getError() {
     
    140143}
    141144
     145bool GameGui_SDL::keyPressed(unsigned int key) {
     146   return keyState[key];
     147}
     148
    142149void GameGui_SDL::refreshWindowSize() {
    143150   SDL_GetWindowSize(window, &windowWidth, &windowHeight);
Note: See TracChangeset for help on using the changeset viewer.