1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-20 20:23:03 +02:00
vcmi/client/FontBase.h
Michał W. Urbańczyk d0ff61807d Obtaining town instance pointer via cb. Plz, don't access gamestate directly from player interface! Everything has to go via callback.
Commented out giving starting artifact - new artifact randomization make it crashing. Please fix it.

New control - CTextBox - for multi-line text with optional slider. Used it for map description and info windows. Related changes. Fixes #22 and #96.
2010-07-06 02:10:26 +00:00

40 lines
682 B
C

#ifndef __FONTBASE_H__
#define __FONTBASE_H__
/*
* FontBase.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
enum EFonts
{
FONT_BIG, FONT_CALLI, FONT_CREDITS, FONT_HIGH_SCORE, FONT_MEDIUM, FONT_SMALL, FONT_TIMES, FONT_TINY, FONT_VERD
};
struct Font
{
struct Char
{
si32 unknown1, width, unknown2, offset;
unsigned char *pixels;
};
Char chars[256];
ui8 height;
unsigned char *data;
Font(unsigned char *Data);
~Font();
int getWidth(const char *text) const;
int getCharWidth(char c) const;
};
#endif