瀏覽代碼

Added header description about base alpha multiplier

pull/5373/head
John 3 月之前
父節點
當前提交
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 background color: [bRRGGBBAA]
// - 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
DrawTextStyled(GetFontDefault(), "This changes the [cFF0000FF]foreground color[r] of provided text!!!",
@ -106,7 +108,7 @@ int main(void)
//----------------------------------------------------------------------------------
// 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
static void DrawTextStyled(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color color)
{

Loading…
取消
儲存