57bool open_url(
const std::string& url);
73template <
typename T> T
lerp(
const T& a,
const T& b,
float t)
Easing functions for animations.
T mix(const T &a, const T &b, float f)
a + (b - a) * f. Integer types are worked in floating point, so a falling unsigned range does not wra...
int get_font_height(const asw::Font &font)
Get the height of a line of text in a font.
void clear_text_size_cache()
Clear cached text metrics.
asw::Vec2< int > get_text_size(const asw::Font &font, std::string_view text)
Get text size.
asw::Vec2< float > get_texture_size(const asw::Texture &tex)
Get texture size.
bool open_url(const std::string &url)
Open a web page in the player's browser, e.g. a login or store page. Web builds open it in a new tab.
T lerp(const T &a, const T &b, float t)
Lerp between two values.
void abort_on_error(const std::string &message)
Abort program and display error message.
std::shared_ptr< TTF_Font > Font
Alias for a shared pointer to an TTF_Font.
std::shared_ptr< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
Types used throughout the ASW library.