Fix VC warnings for examples (#2085)
This commit is contained in:
parent
086f76ba7a
commit
daeccd03ac
21 changed files with 104 additions and 104 deletions
|
@ -25,7 +25,7 @@ int main(void)
|
|||
char name[MAX_INPUT_CHARS + 1] = "\0"; // NOTE: One extra space required for null terminator char '\0'
|
||||
int letterCount = 0;
|
||||
|
||||
Rectangle textBox = { screenWidth/2 - 100, 180, 225, 50 };
|
||||
Rectangle textBox = { screenWidth/2.0f - 100, 180, 225, 50 };
|
||||
bool mouseOnText = false;
|
||||
|
||||
int framesCounter = 0;
|
||||
|
@ -85,10 +85,10 @@ int main(void)
|
|||
DrawText("PLACE MOUSE OVER INPUT BOX!", 240, 140, 20, GRAY);
|
||||
|
||||
DrawRectangleRec(textBox, LIGHTGRAY);
|
||||
if (mouseOnText) DrawRectangleLines(textBox.x, textBox.y, textBox.width, textBox.height, RED);
|
||||
else DrawRectangleLines(textBox.x, textBox.y, textBox.width, textBox.height, DARKGRAY);
|
||||
if (mouseOnText) DrawRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, RED);
|
||||
else DrawRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, DARKGRAY);
|
||||
|
||||
DrawText(name, textBox.x + 5, textBox.y + 8, 40, MAROON);
|
||||
DrawText(name, (int)textBox.x + 5, (int)textBox.y + 8, 40, MAROON);
|
||||
|
||||
DrawText(TextFormat("INPUT CHARS: %i/%i", letterCount, MAX_INPUT_CHARS), 315, 250, 20, DARKGRAY);
|
||||
|
||||
|
@ -97,7 +97,7 @@ int main(void)
|
|||
if (letterCount < MAX_INPUT_CHARS)
|
||||
{
|
||||
// Draw blinking underscore char
|
||||
if (((framesCounter/20)%2) == 0) DrawText("_", textBox.x + 8 + MeasureText(name, 40), textBox.y + 12, 40, MAROON);
|
||||
if (((framesCounter/20)%2) == 0) DrawText("_", (int)textBox.x + 8 + MeasureText(name, 40), (int)textBox.y + 12, 40, MAROON);
|
||||
}
|
||||
else DrawText("Press BACKSPACE to delete chars...", 230, 300, 20, GRAY);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue