mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-09-20 21:37:26 +02:00
b3f7c174ea
These special images are the crewmates, Level Complete, and Game Complete images. They flashed depending on if you were lucky and happened to got your delta-timesteps just right when text boxes were fading in and out. Honestly, I'm surprised text box fading in/out hasn't ran into this issue before. It's insane luck that this issue hasn't occurred before or anything. Well, anyways, to fix this, there's now an attribute `allowspecial` on text boxes, and an optional parameter of the same name for Graphics::createtextbox(). This attribute is the only thing that will let these special text box images render. And any createtextbox()es that utilize these special images have been updated accordingly.
52 lines
689 B
C++
52 lines
689 B
C++
#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;
|
|
int xp, yp, lw, w, h;
|
|
int x,y;
|
|
int r,g,b;
|
|
int tr,tg,tb;
|
|
SDL_Rect textrect;
|
|
int timer;
|
|
|
|
float tl;
|
|
float prev_tl;
|
|
int tm;
|
|
|
|
int max;
|
|
|
|
bool allowspecial;
|
|
|
|
};
|
|
|
|
#endif /* TEXTBOX_H */
|