Skip to content

Commit

Permalink
Game modes can now be switched using F1, F2, F3 in IntrinsicEd
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Glatzel committed May 7, 2017
1 parent 6d3247e commit 4ad9680
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IntrinsicCore/src/IntrinsicCoreInputSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ enum Enum
k8,
k9,

kF1,
kF2,
kF3,

kF,
kT,

Expand Down
9 changes: 9 additions & 0 deletions IntrinsicCore/src/IntrinsicCoreSystemEventProviderSDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ void SDL::pumpEvents()
case SDLK_t:
keyEvent.key = Input::Key::kT;
break;
case SDLK_F1:
keyEvent.key = Input::Key::kF1;
break;
case SDLK_F2:
keyEvent.key = Input::Key::kF2;
break;
case SDLK_F3:
keyEvent.key = Input::Key::kF3;
break;
case SDLK_0:
keyEvent.key = Input::Key::k0;
break;
Expand Down
9 changes: 9 additions & 0 deletions IntrinsicEd/src/IntrinsicEdViewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ void IntrinsicEdViewport::onKeyPressed(Resources::EventRef p_EventRef)
else
IntrinsicEd::_mainWindow->onEditingGameState();
break;
case Input::Key::kF1:
IntrinsicEd::_mainWindow->onEditingGameState();
break;
case Input::Key::kF2:
IntrinsicEd::_mainWindow->onBenchmarkGameState();
break;
case Input::Key::kF3:
IntrinsicEd::_mainWindow->onMainGameState();
break;
case Input::Key::k1:
IntrinsicEd::_mainWindow->onEditingModeDefault();
break;
Expand Down

0 comments on commit 4ad9680

Please sign in to comment.