mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-26 12:27:01 +00:00
Add input_virtual_controls to MSVC projects (#4433)
Fix input_virtual_controls example to use correct default font sizes
This commit is contained in:
@@ -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 |
Reference in New Issue
Block a user