Added 3 unicode pages for font, fixed UI, added Block.breakable
Added 1, 2, 3 and 4 unicode pages from Minecraft. Font now uses std::wstring instead of std::string Added Block.breakable field (the only unbreakable block is bedrock) Bedrock is now selectable
This commit is contained in:
+6
-5
@@ -2,20 +2,21 @@
|
||||
#define GRAPHICS_FONT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Texture;
|
||||
class Batch2D;
|
||||
|
||||
class Font {
|
||||
public:
|
||||
Texture* texture;
|
||||
Font(Texture* texture);
|
||||
std::vector<Texture*> pages;
|
||||
Font(std::vector<Texture*> pages);
|
||||
~Font();
|
||||
|
||||
int getGlyphWidth(char c);
|
||||
bool isPrintableChar(char c);
|
||||
void draw(Batch2D* batch, std::string text, int x, int y);
|
||||
void drawWithShadow(Batch2D* batch, std::string text, int x, int y);
|
||||
bool isPrintableChar(int c);
|
||||
void draw(Batch2D* batch, std::wstring text, int x, int y);
|
||||
void drawWithShadow(Batch2D* batch, std::wstring text, int x, int y);
|
||||
};
|
||||
|
||||
#endif /* GRAPHICS_FONT_H_ */
|
||||
|
||||
Reference in New Issue
Block a user