Просмотр исходного кода

Added header description about base alpha multiplier

pull/5373/head
John 2 месяцев назад
Родитель
Сommit
7cce2bf271
1 измененных файлов: 3 добавлений и 1 удалений
  1. +3
    -1
      examples/text/text_inline_styling.c

+ 3
- 1
examples/text/text_inline_styling.c Просмотреть файл

@ -70,6 +70,8 @@ int main(void)
// - Define foreground color: [cRRGGBBAA] // - Define foreground color: [cRRGGBBAA]
// - Define background color: [bRRGGBBAA] // - Define background color: [bRRGGBBAA]
// - Reset formating: [r] // - Reset formating: [r]
// Colors defined with [cRRGGBBAA] or [bRRGGBBAA] are multiplied by the base color alpha
// This allows global transparency control while keeping per-section styling (ex. text fade effects)
// Example: [bAA00AAFF][cFF0000FF]red text on gray background[r] normal text // Example: [bAA00AAFF][cFF0000FF]red text on gray background[r] normal text
DrawTextStyled(GetFontDefault(), "This changes the [cFF0000FF]foreground color[r] of provided text!!!", DrawTextStyled(GetFontDefault(), "This changes the [cFF0000FF]foreground color[r] of provided text!!!",
@ -106,7 +108,7 @@ int main(void)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Module Functions Definition // Module Functions Definition
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw text using inline styling
// Draw text using inline styling, using input color as the base alpha multiplied to inline styles
// PARAM: color is the default text color, background color is BLANK by default // PARAM: color is the default text color, background color is BLANK by default
static void DrawTextStyled(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color color) static void DrawTextStyled(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color color)
{ {

Загрузка…
Отмена
Сохранить