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 1a9f2d9342 Add flipme attribute to textboxclass
Instead of calculating the y-position of the text box when it's created,
we will store a flag that says whether or not the text box should be
flipped in Flip Mode (and thus stay right-side-up), and when it comes
time to draw the text box, we will check Flip Mode and calculate the
position then.
2021-03-21 02:53:25 -04:00

51 lines
738 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;
/* Whether to flip text box y-position in Flip Mode. */
bool flipme;
};
#endif /* TEXTBOX_H */