Browse Source

Fixed formatting! Grumble, grumble...

pull/810/head
Vlad Adrian 5 years ago
committed by GitHub
parent
commit
3dda1c41ec
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      examples/text/text_unicode.c

+ 6
- 2
examples/text/text_unicode.c View File

@ -270,10 +270,14 @@ void Draw()
// Calculate size for the message box (approximate the height and width) // Calculate size for the message box (approximate the height and width)
Vector2 sz = MeasureTextEx(*font, messages[message].text, font->baseSize, 1.0f); Vector2 sz = MeasureTextEx(*font, messages[message].text, font->baseSize, 1.0f);
if(sz.x > 300) {
if(sz.x > 300)
{
sz.y *= sz.x/300; sz.y *= sz.x/300;
sz.x = 300; sz.x = 300;
} else if(sz.x < 160) sz.x = 160;
}
else if(sz.x < 160)
sz.x = 160;
Rectangle msgRect = { selectedPos.x - 38.8f, selectedPos.y, 2 * horizontalPadding + sz.x, 2 * verticalPadding + sz.y}; Rectangle msgRect = { selectedPos.x - 38.8f, selectedPos.y, 2 * horizontalPadding + sz.x, 2 * verticalPadding + sz.y};
msgRect.y -= msgRect.height; msgRect.y -= msgRect.height;
Vector2 a = {selectedPos.x, msgRect.y + msgRect.height}, b = {a.x + 8, a.y + 10}, c= {a.x+10, a.y}; // coordinates for the chat bubble triangle Vector2 a = {selectedPos.x, msgRect.y + msgRect.height}, b = {a.x + 8, a.y + 10}, c= {a.x+10, a.y}; // coordinates for the chat bubble triangle

Loading…
Cancel
Save