1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-30 16:38:29 +02:00
VVVVVV/desktop_version/src/BlockV.h
Dav999-v 689d6e3e97 Print activity zone text in correct font, remove Graphics::drawtextbox
Activity zones need to be in the interface font if the message is from
the system (like Press ENTER to activate terminal, which may be in a
different language) and in the level font if it's a customized message
(setactivitytext).

Graphics::drawtextbox was counting the textbox width and height in
8x8 characters, even including the borders as characters, so it'd need
to be told what the font for the textbox is, and then probably only the
height needs to be adapted to the font and not the width because that's
adapted to the screen width... So just call Graphics::drawpixeltextbox
directly instead. It was already weird enough how actual cutscene
textboxes called Graphics::drawtextbox with x/8, y/8 before the
previous commit, (when you already have the pixel width and height!)
only to have that be a wrapper for drawpixeltextbox by doing x*8, y*8.
2023-02-13 23:27:00 -08:00

30 lines
514 B
C++

#ifndef BLOCKV_H
#define BLOCKV_H
#include <SDL.h>
#include <stdint.h>
#include <string>
class blockclass
{
public:
blockclass(void);
void clear(void);
void rectset(const int xi, const int yi, const int wi, const int hi);
void setblockcolour(const char* col);
public:
//Fundamentals
SDL_Rect rect;
int type;
int trigger;
int xp, yp, wp, hp;
std::string script, prompt;
int r, g, b;
int activity_x, activity_y;
uint32_t print_flags;
};
#endif /* BLOCKV_H */