2020-01-01 21:29:24 +01:00
|
|
|
#ifndef TEXTBOX_H
|
|
|
|
#define TEXTBOX_H
|
|
|
|
|
|
|
|
#include "SDL.h"
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class textboxclass
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
textboxclass();
|
|
|
|
|
|
|
|
void centerx();
|
|
|
|
|
|
|
|
void centery();
|
|
|
|
|
|
|
|
void adjust();
|
|
|
|
|
|
|
|
void initcol(int rr, int gg, int bb);
|
|
|
|
|
|
|
|
void setcol(int rr, int gg, int bb);
|
|
|
|
|
|
|
|
void update();
|
|
|
|
|
|
|
|
void remove();
|
|
|
|
|
|
|
|
void removefast();
|
|
|
|
|
|
|
|
void resize();
|
|
|
|
|
|
|
|
void addline(std::string t);
|
|
|
|
public:
|
|
|
|
//Fundamentals
|
|
|
|
std::vector<std::string> line;
|
2020-04-04 02:41:01 +02:00
|
|
|
int xp, yp, lw, w, h;
|
2020-01-01 21:29:24 +01:00
|
|
|
int x,y;
|
|
|
|
int r,g,b;
|
|
|
|
int tr,tg,tb;
|
|
|
|
SDL_Rect textrect;
|
|
|
|
int timer;
|
|
|
|
|
|
|
|
float tl;
|
2020-04-29 06:49:15 +02:00
|
|
|
float prev_tl;
|
2020-01-01 21:29:24 +01:00
|
|
|
int tm;
|
|
|
|
|
|
|
|
int max;
|
|
|
|
|
2020-04-30 08:46:50 +02:00
|
|
|
bool allowspecial;
|
|
|
|
|
2020-01-01 21:29:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* TEXTBOX_H */
|