mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
add syntax highlighting (WIP)
This commit is contained in:
parent
ce1e9f76cf
commit
ed3865964b
16 changed files with 168 additions and 43 deletions
|
|
@ -12,7 +12,6 @@ class Batch3D;
|
|||
class Camera;
|
||||
|
||||
struct FontStyle {
|
||||
size_t n = -1;
|
||||
bool bold = false;
|
||||
bool italic = false;
|
||||
glm::vec4 color {1, 1, 1, 1};
|
||||
|
|
@ -20,6 +19,7 @@ struct FontStyle {
|
|||
|
||||
struct FontStylesScheme {
|
||||
std::vector<FontStyle> palette;
|
||||
std::vector<ubyte> map;
|
||||
};
|
||||
|
||||
class Font {
|
||||
|
|
@ -57,6 +57,7 @@ public:
|
|||
int x,
|
||||
int y,
|
||||
const FontStylesScheme* styles,
|
||||
size_t styleMapOffset,
|
||||
float scale = 1
|
||||
) const;
|
||||
|
||||
|
|
@ -64,6 +65,7 @@ public:
|
|||
Batch3D& batch,
|
||||
std::wstring_view text,
|
||||
const FontStylesScheme* styles,
|
||||
size_t styleMapOffset,
|
||||
const glm::vec3& pos,
|
||||
const glm::vec3& right={1, 0, 0},
|
||||
const glm::vec3& up={0, 1, 0}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue