initial commit
This commit is contained in:
58
NewDialogs/Item.cpp
Normal file
58
NewDialogs/Item.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
#include "Item.h"
|
||||
|
||||
Item::Item(SDL_Rect pos) {
|
||||
this->pos = pos;
|
||||
needs_redraw = true;
|
||||
}
|
||||
|
||||
Item::~Item() {
|
||||
}
|
||||
|
||||
SDL_Surface *Item::getSurface() {
|
||||
return surface;
|
||||
}
|
||||
|
||||
void Item::setSurface(SDL_Surface *surface) {
|
||||
needs_redraw = true;
|
||||
this->surface = surface;
|
||||
}
|
||||
|
||||
void Item::setPos(SDL_Rect pos) {
|
||||
this->pos = pos;
|
||||
}
|
||||
|
||||
SDL_Rect *Item::getPos() {
|
||||
return &pos;
|
||||
}
|
||||
|
||||
bool Item::onMousePress(int x, int y) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Item::onMouseRelease(int x, int y) {
|
||||
}
|
||||
|
||||
void Item::onMouseMove(int x, int y) {
|
||||
}
|
||||
|
||||
void Item::onFingerDown(int x, int y, int finger_id) {
|
||||
}
|
||||
|
||||
void Item::onFingerUp(int x, int y, int finger_id) {
|
||||
}
|
||||
|
||||
bool Item::needsRedraw() {
|
||||
return needs_redraw;
|
||||
}
|
||||
|
||||
void Item::drawDone() {
|
||||
needs_redraw = false;
|
||||
}
|
||||
|
||||
void Item::setName(string name) {
|
||||
this->name = name;
|
||||
}
|
||||
|
||||
string Item::getName() {
|
||||
return name;
|
||||
}
|
||||
Reference in New Issue
Block a user