diff -r a4ee36ff7147 -r 7899792496cb ui/common/wrapper.c --- a/ui/common/wrapper.c Sun Aug 31 09:44:53 2025 +0200 +++ b/ui/common/wrapper.c Sun Aug 31 10:31:42 2025 +0200 @@ -262,3 +262,40 @@ } return NULL; } + +/* ---------------------------- UiTextStyle ---------------------------- */ + +void ui_textstyle_set_bold(UiTextStyle *style, UiBool set) { + if(set) { + style->text_style |= UI_TEXT_STYLE_BOLD; + } else { + style->text_style &= ~UI_TEXT_STYLE_BOLD; + } +} + +void ui_textstyle_set_underline(UiTextStyle *style, UiBool set) { + if(set) { + style->text_style |= UI_TEXT_STYLE_UNDERLINE; + } else { + style->text_style &= ~UI_TEXT_STYLE_UNDERLINE; + } +} + +void ui_textstyle_set_italic(UiTextStyle *style, UiBool set) { + if(set) { + style->text_style |= UI_TEXT_STYLE_ITALIC; + } else { + style->text_style &= ~UI_TEXT_STYLE_ITALIC; + } +} + +void ui_textstyle_set_color(UiTextStyle *style, int r, int g, int b) { + style->fg_set = TRUE; + style->fg.red = r; + style->fg.green = g; + style->fg.blue = b; +} + +void ui_textstyle_enable_color(UiTextStyle *style, UiBool enable) { + style->fg_set = enable; +}