You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
631 B
28 lines
631 B
#ifndef INPUTHANDLER_H_
|
|
#define INPUTHANDLER_H_
|
|
#include "raylib.h"
|
|
#include "../sprite.h"
|
|
#include "../List/list.h"
|
|
#include "../IsometricMap/isometricMap.h"
|
|
#include "../game.h"
|
|
|
|
typedef struct InputHandler{
|
|
int pressed;
|
|
Vector2 rectStart;
|
|
Vector2 cursorPos;
|
|
Vector2 cursorWorldPos;
|
|
Vector2 cursorWorldTile;
|
|
int selectedLayer;
|
|
Texture2D *cursorTextures;
|
|
Sprite *cursorSprite;
|
|
} InputHandler;
|
|
|
|
void mouseInput(Game *game);
|
|
|
|
void keyboardInput(InputHandler *inputHandler, Camera2D *camera);
|
|
|
|
void DrawRect(Vector2 rectStart, Vector2 *mousePosition);
|
|
|
|
Vector2 GetRectangle(Vector2 rectStart);
|
|
|
|
#endif |