Commit c37bd8e1 authored by Max Kobelt's avatar Max Kobelt
Browse files

Use existing variable for checking string length

parent 69fe578f
#include "raylib.h"
#include <stddef.h>
#include <string.h>
#define MAX_INPUT_CHARS 10
#define PLAY_FONT_SIZE 50
......@@ -53,7 +52,7 @@ void drawMenu() {
);
if ((++framesCount / (FRAME_RATE / 2)) % 2 && letterCount <= MAX_INPUT_CHARS - 1) {
DrawText("_",
inputBox.x + (strlen(name) ? 1.5 : 1) * TEXT_SIDE_MARGIN + MeasureText(name, NAME_FONT_SIZE),
inputBox.x + (letterCount ? 1.5 : 1) * TEXT_SIDE_MARGIN + MeasureText(name, NAME_FONT_SIZE),
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