1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-17 01:58:29 +02:00
VVVVVV/desktop_version/src/Textbox.h
Dav999-v 48a4e19635 Migrate more prints to font::, determine font for most textboxes
Some textboxes need to be in the level font (like room names, cutscene
dialogue, etc - even in the main game), and some need to be in the
interface font (like when you collect a shiny trinket or crewmate). So
most of these textboxes now have graphics.textboxprintflags(font_flag)
as appropriate.

RoomnameTranslator.cpp is now also migrated to the new print system -
in room name translator mode, the room name is now displayed in the 8x8
font if it's untranslated and the level font if it is.
2023-02-13 23:27:00 -08:00

56 lines
823 B
C++

#ifndef TEXTBOX_H
#define TEXTBOX_H
#include <stdint.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 update(void);
void remove(void);
void removefast(void);
void resize(void);
void addline(const std::string& t);
void pad(size_t left_pad, size_t right_pad);
void padtowidth(size_t new_w);
void centertext();
public:
//Fundamentals
std::vector<std::string> lines;
int xp, yp, w, h;
int r,g,b;
int timer;
float tl;
float prev_tl;
int tm;
/* Whether to flip text box y-position in Flip Mode. */
bool flipme;
int rand;
uint32_t print_flags;
};
#endif /* TEXTBOX_H */