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.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "devilution.h"
|
|
|
|
|
|
|
|
|
|
#include <SDL_ttf.h>
|
|
|
|
|
|
|
|
|
|
namespace dvl {
|
|
|
|
|
|
|
|
|
|
enum class TextAlignment {
|
|
|
|
|
BEGIN = 0,
|
|
|
|
|
CENTER,
|
|
|
|
|
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, TextAlignment x_align = TextAlignment::BEGIN);
|
|
|
|
|
|
|
|
|
|
} // namespace dvl
|