Skip to content

Commit

Permalink
update camera on modechange
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Thomas (malinka) committed Feb 17, 2018
1 parent a51c8e3 commit 3b178c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Camera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ using namespace Entropy::Asteria;
using namespace std;
using namespace Entropy;

using Entropy::Mnemosyne::Events::ModeChange;
using Entropy::Theia::Events::Key;
using Entropy::Theia::Vertex;
using Entropy::Theia::Dimension;
Expand Down Expand Up @@ -74,6 +75,11 @@ void Camera::Update(const chrono::duration<double> &dt)
}
}

void Camera::onEvent(const ModeChange &)
{
Update();
}

void Camera::onEvent(const Key &k)
{
if(k.Action() == GLFW_PRESS || k.Action() == GLFW_REPEAT) {
Expand Down
1 change: 1 addition & 0 deletions src/Camera.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
constexpr Theia::Dimension Width() const;
protected:
void Update();
void onEvent(const Mnemosyne::Events::ModeChange &);
void onEvent(const Theia::Events::Key &);
private:
Theia::Camera &_camera;
Expand Down

0 comments on commit 3b178c6

Please sign in to comment.