mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
gui and Font update
This commit is contained in:
parent
6cdb45485b
commit
9cb3923442
5 changed files with 43 additions and 23 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef GRAPHICS_FONT_H_
|
||||
#define GRAPHICS_FONT_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../typedefs.h"
|
||||
|
|
@ -13,13 +14,15 @@ const uint STYLE_SHADOW = 1;
|
|||
const uint STYLE_OUTLINE = 2;
|
||||
|
||||
class Font {
|
||||
int lineHeight_;
|
||||
int lineHeight;
|
||||
int yoffset;
|
||||
public:
|
||||
std::vector<Texture*> pages;
|
||||
Font(std::vector<Texture*> pages, int lineHeight);
|
||||
std::vector<std::unique_ptr<Texture>> pages;
|
||||
Font(std::vector<std::unique_ptr<Texture>> pages, int lineHeight, int yoffset);
|
||||
~Font();
|
||||
|
||||
int lineHeight() const;
|
||||
int getLineHeight() const;
|
||||
int getYOffset() const;
|
||||
int calcWidth(std::wstring text);
|
||||
// int getGlyphWidth(char c);
|
||||
bool isPrintableChar(int c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue