You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
569 B
23 lines
569 B
#pragma once |
|
|
|
#include <SDL_ttf.h> |
|
#include <stdint.h> |
|
|
|
namespace devilution { |
|
|
|
enum TextAlignment : uint8_t { |
|
TextAlignment_BEGIN, |
|
TextAlignment_CENTER, |
|
TextAlignment_END, |
|
}; |
|
|
|
/** |
|
* Renders UTF-8, wrapping lines to avoid exceeding wrapLength, and aligning |
|
* according to the `x_align` argument. |
|
* |
|
* This method is slow. Caching the result is recommended. |
|
*/ |
|
SDL_Surface *RenderUTF8_Solid_Wrapped( |
|
TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength, const int x_align = TextAlignment_BEGIN); |
|
|
|
} // namespace devilution
|
|
|