summaryrefslogtreecommitdiff
path: root/gfx/manualCameraController.h
blob: 465f31f696b3549b86db7f2beb4fb2ec9eaccd85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef MANUAL_CAMERA_CONTROLLER_H
#define MANUAL_CAMERA_CONTROLLER_H

#include "game/worldobject.h"
#include "inputHandler.h"
#include <SDL2/SDL.h>
#include <gfx/camera_controller.h>
#include <optional>

class Camera;

class ManualCameraController : public CameraController, public InputHandler {
public:
	bool handleInput(SDL_Event & e) override;

	void tick(TickDuration) override { }

	void updateCamera(Camera * camera) const override;

private:
	bool ctrl {false}, mrb {false};
	mutable std::optional<SDL_MouseMotionEvent> motion;
};
#endif