fixed input with keyboard and controller at the same time
This commit is contained in:
parent
d8fa53801b
commit
eabeb55115
11 changed files with 95 additions and 68 deletions
20
src/DataStructures/DirectionButtonStatus.h
Normal file
20
src/DataStructures/DirectionButtonStatus.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef DIRECTION_BUTTON_STATUS_H
|
||||
#define DIRECTION_BUTTON_STATUS_H
|
||||
|
||||
#include <math.h>
|
||||
#include <SDL3/SDL.h>
|
||||
#include "NormalizedDirection.h"
|
||||
|
||||
class DirectionButtonStatus
|
||||
{
|
||||
public:
|
||||
bool UpPressed = false;
|
||||
bool DownPressed = false;
|
||||
bool LeftPressed = false;
|
||||
bool RightPressed = false;
|
||||
const float c_NormalizedDiagonal = 1 / sqrt(2);
|
||||
|
||||
bool GetDirection(NormalizedDirection & ref_direction);
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue