Fix formatting ...not very good at this
This commit is contained in:
parent
3dda1c41ec
commit
98070982bf
1 changed files with 4 additions and 4 deletions
|
@ -189,7 +189,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
// Draw emoji and the text bubbles
|
// Draw emoji and the text bubbles
|
||||||
|
@ -271,12 +271,12 @@ 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)
|
else if(sz.x < 160)
|
||||||
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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue