Add input_virtual_controls to MSVC projects (#4433)

Fix input_virtual_controls example to use correct default font sizes
This commit is contained in:
Jeffery Myers 2024-10-25 00:47:04 -07:00 committed by GitHub
parent 728ccc96bc
commit f03f093909
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 30 additions and 11 deletions

View file

@ -54,8 +54,8 @@ int main(void)
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//--------------------------------------------------------------------------
// Update
//--------------------------------------------------------------------------
dpadKeydown = -1; //reset
float inputX=0;
float inputY=0;
@ -89,10 +89,9 @@ int main(void)
case 3: playerY += 50*GetFrameTime();
default:;
};
//--------------------------------------------------------------------------
// Draw
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Draw
//--------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
for(int i=0;i<4;i++)
@ -103,14 +102,15 @@ int main(void)
{
//draw label
DrawText(TextSubtext(dpadLabel,i,1),
dpadCollider[i][0]-5,
dpadCollider[i][1]-5,16,BLACK);
dpadCollider[i][0]-7,
dpadCollider[i][1]-8,20,BLACK);
}
}
DrawText("Player",playerX,playerY,16,BLACK);
DrawRectangle(playerX-4,playerY-4,75,28,RED);
DrawText("Player",playerX,playerY,20,WHITE);
EndDrawing();
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
}
// De-Initialization

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Before After
Before After