1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 05:58:30 +02:00
VVVVVV/desktop_version/src/Textbox.h
Misa 2ac13815e4 Remove textrect attribute from textboxclass
Instead of duplicating the same variables over and over again,
Graphics::drawgui() can just make its own SDL_Rect. It's not that hard.

As far as I can tell, textrect was always being properly kept up to date
by the time Graphics::drawgui() got around to rendering
(textboxclass::resize() keeps being called a LOT), so this shouldn't be
a noticeable change from the user perspective.
2021-03-21 02:53:25 -04:00

49 lines
661 B
C++

#ifndef TEXTBOX_H
#define TEXTBOX_H
#include <SDL.h>
#include <string>
#include <vector>
class textboxclass
{
public:
textboxclass(void);
void centerx(void);
void centery(void);
void adjust(void);
void initcol(int rr, int gg, int bb);
void setcol(int rr, int gg, int bb);
void update(void);
void remove(void);
void removefast(void);
void resize(void);
void addline(std::string t);
public:
//Fundamentals
std::vector<std::string> line;
int xp, yp, lw, w, h;
int r,g,b;
int tr,tg,tb;
int timer;
float tl;
float prev_tl;
int tm;
int max;
};
#endif /* TEXTBOX_H */