1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-03 03:23:33 +02:00
VVVVVV/desktop_version/src/Textbox.h

82 lines
1.2 KiB
C
Raw Normal View History

2020-01-01 21:29:24 +01:00
#ifndef TEXTBOX_H
#define TEXTBOX_H
#include <stdint.h>
2020-01-01 21:29:24 +01:00
#include <string>
#include <vector>
struct TextboxSprite
{
int x;
int y;
int col;
int tile;
};
enum TextboxImage
{
TEXTIMAGE_NONE,
TEXTIMAGE_LEVELCOMPLETE,
TEXTIMAGE_GAMECOMPLETE
};
2020-01-01 21:29:24 +01:00
class textboxclass
{
public:
textboxclass(int gap);
2020-01-01 21:29:24 +01:00
void addsprite(int x, int y, int tile, int col);
void setimage(TextboxImage image);
void centerx(void);
2020-01-01 21:29:24 +01:00
void centery(void);
2020-01-01 21:29:24 +01:00
void adjust(void);
2020-01-01 21:29:24 +01:00
void initcol(int rr, int gg, int bb);
void update(void);
2020-01-01 21:29:24 +01:00
void remove(void);
2020-01-01 21:29:24 +01:00
void removefast(void);
2020-01-01 21:29:24 +01:00
void resize(void);
2020-01-01 21:29:24 +01:00
void addline(const std::string& t);
void pad(size_t left_pad, size_t right_pad);
void padtowidth(size_t new_w);
void centertext(void);
2020-01-01 21:29:24 +01:00
public:
//Fundamentals
std::vector<std::string> lines;
int xp, yp, w, h;
2020-01-01 21:29:24 +01:00
int r,g,b;
int linegap;
2020-01-01 21:29:24 +01:00
int timer;
float tl;
float prev_tl;
2020-01-01 21:29:24 +01:00
int tm;
/* Whether to flip text box y-position in Flip Mode. */
bool flipme;
int rand;
bool large;
uint32_t print_flags;
bool fill_buttons;
std::vector<TextboxSprite> sprites;
TextboxImage image;
2020-01-01 21:29:24 +01:00
};
#endif /* TEXTBOX_H */