Commit ab9f9658 authored by Valentin Bartschies's avatar Valentin Bartschies
Browse files

Add casting to int

parent c944af9b
......@@ -43,5 +43,5 @@ void calcGame() {
void drawGame() {
ClearBackground(BLACK);
DrawRectangleRec(laserCanon, WHITE);
DrawRectangleLines(gameBorder.x, gameBorder.y, gameBorder.width, gameBorder.height, WHITE);
DrawRectangleLines((int) gameBorder.x, (int) gameBorder.y, (int) gameBorder.width, (int) gameBorder.height, WHITE);
}
\ No newline at end of file
......@@ -38,20 +38,20 @@ void calcMenu() {
void drawMenu() {
ClearBackground(BLACK); // To clear the screen when you go back into the menu
DrawText("PLAY", playBtnPos.x, playBtnPos.y, PLAY_FONT_SIZE, RED);
DrawText("PLAY", (int) playBtnPos.x, (int) playBtnPos.y, PLAY_FONT_SIZE, RED);
DrawRectangleRec(inputBox, LIGHTGRAY);
DrawRectangleLines(inputBox.x, inputBox.y, inputBox.width, inputBox.height, RED);
DrawRectangleLines((int) inputBox.x, (int) inputBox.y, (int) inputBox.width, (int) inputBox.height, RED);
DrawText(name,
inputBox.x + TEXT_SIDE_MARGIN,
inputBox.y + inputBox.height - NAME_FONT_SIZE,
(int) inputBox.x + TEXT_SIDE_MARGIN,
(int) (inputBox.y + inputBox.height) - NAME_FONT_SIZE,
NAME_FONT_SIZE,
RED
);
if ((++framesCount / (FRAME_RATE / 2)) % 2 && letterCount <= MAX_INPUT_CHARS - 1) {
DrawText("_",
inputBox.x + (letterCount ? 1.5 : 1) * TEXT_SIDE_MARGIN + MeasureText(name, NAME_FONT_SIZE),
inputBox.y + inputBox.height - NAME_FONT_SIZE,
(int) (inputBox.x + (letterCount ? 1.5 : 1)) * TEXT_SIDE_MARGIN + MeasureText(name, NAME_FONT_SIZE),
(int) (inputBox.y + inputBox.height) - NAME_FONT_SIZE,
NAME_FONT_SIZE,
RED
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment