Brenta Engine
1.2
Loading...
Searching...
No Matches
mouse.hpp
1
// SPDX-License-Identifier: MIT
2
// Author: Giovanni Santini
3
// Mail: giovanni.santini@proton.me
4
// Github: @San7o
5
6
#pragma once
7
8
namespace
brenta
9
{
10
11
//
12
// Mouse
13
// -----
14
//
15
// This is an handy class to keep track of the state of the mouse.
16
// You probably would have created this class anyway, so the engine
17
// provides a default one for convenience.
18
//
19
class
Mouse
20
{
21
public
:
22
23
// `first` is useful if you want to set the initial position of the
24
// mouse as "invalid" instead of (0, 0)
25
bool
first =
true
;
26
float
x;
27
float
y;
28
float
sensitivity;
29
30
Mouse
() =
default
;
31
Mouse
(
float
x,
float
y) : x(x), y(y) {}
32
Mouse
(
float
x,
float
y,
float
sensitivity)
33
: x(x), y(y), sensitivity(sensitivity) {}
34
35
};
36
37
}
// namespace brenta
brenta::Mouse
Definition
mouse.hpp:20
include
brenta
mouse.hpp
Generated by
1.9.8