- [NEW] fonts amb colorets
- [WIP] stringProperty
This commit is contained in:
@@ -49,8 +49,9 @@ namespace font
|
||||
draw::draw({sx, sy, spaces[c], h}, {x, y, spaces[c], h});
|
||||
}
|
||||
|
||||
void print(const char* text, int x, int y)
|
||||
void print(const char* text, int x, int y, uint32_t color)
|
||||
{
|
||||
SDL_SetTextureColorMod(surf, (color>>16)&0xff, (color>>8)&0xff, color&0xff);
|
||||
draw::setSource(surf);
|
||||
while(*text) {
|
||||
printChar(*text, x, y);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
namespace font
|
||||
{
|
||||
void load(const char* filename);
|
||||
void print(const char* text, int x, int y);
|
||||
void print(const char* text, int x, int y, uint32_t color = 0xffffffff);
|
||||
const int len(const char *text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user