nanoMMO
0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
input.h
Go to the documentation of this file.
1
#ifndef NANOMMO_CLIENT_INPUT_H_
2
#define NANOMMO_CLIENT_INPUT_H_
3
4
#include <raylib.h>
5
6
#include <optional>
7
8
namespace
nanommo
{
9
10
/// Whether the player is typing into a text field, such as the chat's, which
11
/// takes the keys from the game.
12
bool
Typing
();
13
14
/// x is to the right and z is towards the camera, each -1, 0 or 1.
15
Vector3
Movement
();
16
17
bool
Running
();
18
19
bool
Attacking
();
20
21
/// Which of the number keys, from 1 to 9, went down this frame, as a slot
22
/// from zero, or, with Shift held, from nine, for the row above.
23
std::optional<int>
HotbarKey
();
24
25
/// Whether the left button went down this frame on the world, and not on one
26
/// of the GUI's windows.
27
bool
ClickedWorld
();
28
29
/// How far to turn the camera this frame, in radians: with Q and E, or the
30
/// mouse, dragged with the right button down.
31
float
CameraTurn
(
float
seconds);
32
33
/// How far to tilt the camera this frame, in radians, up over the player or
34
/// down towards the ground: with the mouse, dragged with the right button
35
/// down.
36
float
CameraTilt
();
37
38
/// How much closer to bring the camera this frame, as a share of its
39
/// distance, from the mouse wheel.
40
float
CameraZoom
();
41
42
}
// namespace nanommo
43
44
#endif
// NANOMMO_CLIENT_INPUT_H_
nanommo
Definition
chat.cc:9
nanommo::Movement
Vector3 Movement()
x is to the right and z is towards the camera, each -1, 0 or 1.
Definition
input.cc:24
nanommo::Running
bool Running()
Definition
input.cc:48
nanommo::CameraZoom
float CameraZoom()
Definition
input.cc:97
nanommo::Attacking
bool Attacking()
Definition
input.cc:52
nanommo::CameraTurn
float CameraTurn(float seconds)
Definition
input.cc:73
nanommo::Typing
bool Typing()
Definition
input.cc:22
nanommo::CameraTilt
float CameraTilt()
Definition
input.cc:89
nanommo::ClickedWorld
bool ClickedWorld()
Definition
input.cc:68
nanommo::HotbarKey
std::optional< int > HotbarKey()
Definition
input.cc:54
client
input.h
Generated by
1.15.0