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.
KED/ked/ncurses/item.h

77 lines
983 B

#include "main.h"
#ifndef _ITEM_H_
#define _ITEM_H_
#define BRD_SPC 1
class Item
{
public:
Item(std::string name, char trigger);
~Item();
//Getters
int getPosX();
int getPosY();
int getLength();
char getTrigger();
std::string getName();
//Setters
void setPosX(int x);
void setPosY(int y);
private:
std::string name; // Name of the item
int xPos, yPos = 0; // Coordinates of the item
int itemLength = 0; //Lenght of the item
char trigger; // trigger to select this item
};
Item::Item(std::string name, char trigger)
{
this->name = name;
this->trigger = trigger;
}
Item::~Item()
{
}
//Getters
int Item::getPosX()
{
return xPos;
}
int Item::getPosY()
{
return yPos;
}
int Item::getLength()
{
return name.length();
}
char Item::getTrigger()
{
return trigger;
}
std::string Item::getName()
{
return name;
}
//Setters
void Item::setPosX(int x)
{
this->xPos = x;
}
void Item::setPosY(int y)
{
this->yPos = y;
}
#endif