forked from Alfwich/CubicEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BitmapFontContainer.h
44 lines (32 loc) · 965 Bytes
/
BitmapFontContainer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/***
Bitmap Font Container: Contains bitmap fonts
***/
#ifndef BITMAP_FONT_CONTAINER_H
#define BITMAP_FONT_CONTAINER_H
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_Mixer.h"
#include "SDL_ttf.h"
#include "SDL_opengl.h"
#include <stdio.h>
#include <vector>
#include <string>
#include <unordered_map>
#include <map>
#include "BitmapFont.h"
class BitmapFontContainer
{
private:
static std::unordered_map<std::string,BitmapFont*> BitmapFonts;
public:
// Creates a bitmap font object with the supplied texture
static BitmapFont* AddBitmapFont( Texture* texture, int charWidth, int charHeight, int point, std::string name );
// Returns a pointer to the bitmap font object
static BitmapFont* GetBitmapFont( std::string name );
// Returns true if the bitmap font is in the container
static bool HasBitmapFont( std::string name );
// Clears out the container
// -Deletes all objects
static void Clear();
};
#endif // !BITMAP_FONT_CONTAINER_H