mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-03-28 20:44:36 -05:00
20 lines
657 B
C++
20 lines
657 B
C++
#pragma once
|
|
#include <string>
|
|
#include <SDL2/SDL.h>
|
|
|
|
namespace graphics
|
|
{
|
|
namespace systemFont
|
|
{
|
|
// Inits freetype2
|
|
bool init(void);
|
|
void exit(void);
|
|
// Renders text with system font
|
|
void renderText(const std::string &text, SDL_Texture *target, int x, int y, int fontSize, uint32_t color);
|
|
// Renders text, but wraps to new line if maxWidth is hit or exeeded
|
|
void renderTextWrap(const std::string &text, SDL_Texture *target, int x, int y, int fontSize, int maxWidth, uint32_t color);
|
|
// Returns width of string
|
|
int getTextWidth(const std::string &text, int fontSize);
|
|
}
|
|
}
|