Skip to content

Commit

Permalink
Made Input a true singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Puddlestomper authored and LovelySanta committed Aug 27, 2019
1 parent e8b2ad9 commit 9cbad6e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Hazel/src/Hazel/Input.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ namespace Hazel {

class HAZEL_API Input
{
protected:
Input() = default;
public:
Input(const Input&) = delete;
Input& operator=(const Input&) = delete;

inline static bool IsKeyPressed(int keycode) { return s_Instance->IsKeyPressedImpl(keycode); }

inline static bool IsMouseButtonPressed(int button) { return s_Instance->IsMouseButtonPressedImpl(button); }
Expand Down

0 comments on commit 9cbad6e

Please sign in to comment.