initial commit
This commit is contained in:
35
NewDialogs/Item.h
Normal file
35
NewDialogs/Item.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef ITEM_H
|
||||
#define ITEM_H
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Item {
|
||||
protected:
|
||||
SDL_Surface *surface;
|
||||
bool needs_redraw;
|
||||
private:
|
||||
SDL_Rect pos;
|
||||
string name;
|
||||
public:
|
||||
Item(SDL_Rect pos);
|
||||
virtual ~Item();
|
||||
virtual SDL_Surface *getSurface();
|
||||
void setSurface(SDL_Surface *surface);
|
||||
void setPos(SDL_Rect pos);
|
||||
SDL_Rect *getPos();
|
||||
virtual bool onMousePress(int x, int y);
|
||||
virtual void onMouseRelease(int x, int y);
|
||||
virtual void onMouseMove(int x, int y);
|
||||
virtual void onFingerDown(int x, int y, int finger_id);
|
||||
virtual void onFingerUp(int x, int y, int finger_id);
|
||||
bool needsRedraw();
|
||||
void drawDone();
|
||||
void setName(string name);
|
||||
string getName();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user