2#include <SDL_keycode.h>
4#include "eustb_textedit_string.h"
49 std::optional<KeyboardInput>
key = std::nullopt;
50 std::optional<char>
keychar = std::nullopt;
bool basic_button(u32 id, const Rect &rect, UiState &uistate, render::SpriteBatch *batch)
bool slider(u32 id, float *val, const Rect &rect, UiState &uistate, render::SpriteBatch *batch)
bool textfield(u32 id, std::string *val, render::DrawableFont *font, float size, const v2 &pos, UiState &uistate, render::SpriteBatch *batch)
bool button_logic(u32 id, const Rect &rect, UiState &uistate)
void draw_text(render::SpriteBatch *batch, render::DrawableFont *font, const std::string &str, float size, const v2 &pos, const Rgb &color)
bool button_texture(u32 id, const Rect &rect, UiState &uistate, render::SpriteBatch *batch, const render::Texture2d *texture, const Rect &active, const Rect &hot, const Rect &normal)
A (inclusive) range between two values.
Represents color in gamma (non-linear) space (aka sRGB).
u32 get(const std::string &str) const
void push(const std::string &str)
std::optional< KeyboardInput > key
std::optional< u32 > active_item
bool is_active_free() const
std::optional< u32 > kbd_item
std::optional< u32 > hot_item
std::optional< char > keychar
std::optional< u32 > last_widget