Skip to content

Commit b2041f5

Browse files
JeffM2501psxdev
authored andcommitted
Add input_virtual_controls to MSVC projects (raysan5#4433)
Fix input_virtual_controls example to use correct default font sizes
1 parent f90bd97 commit b2041f5

File tree

3 files changed

+30
-11
lines changed

3 files changed

+30
-11
lines changed

examples/core/core_input_virtual_controls.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ int main(void)
5454
// Main game loop
5555
while (!WindowShouldClose()) // Detect window close button or ESC key
5656
{
57-
// Update
58-
//--------------------------------------------------------------------------
57+
// Update
58+
//--------------------------------------------------------------------------
5959
dpadKeydown = -1; //reset
6060
float inputX=0;
6161
float inputY=0;
@@ -89,10 +89,9 @@ int main(void)
8989
case 3: playerY += 50*GetFrameTime();
9090
default:;
9191
};
92-
//--------------------------------------------------------------------------
93-
94-
// Draw
95-
//--------------------------------------------------------------------------
92+
//--------------------------------------------------------------------------
93+
// Draw
94+
//--------------------------------------------------------------------------
9695
BeginDrawing();
9796
ClearBackground(RAYWHITE);
9897
for(int i=0;i<4;i++)
@@ -103,14 +102,15 @@ int main(void)
103102
{
104103
//draw label
105104
DrawText(TextSubtext(dpadLabel,i,1),
106-
dpadCollider[i][0]-5,
107-
dpadCollider[i][1]-5,16,BLACK);
105+
dpadCollider[i][0]-7,
106+
dpadCollider[i][1]-8,20,BLACK);
108107
}
109-
110108
}
111-
DrawText("Player",playerX,playerY,16,BLACK);
109+
110+
DrawRectangle(playerX-4,playerY-4,75,28,RED);
111+
DrawText("Player",playerX,playerY,20,WHITE);
112112
EndDrawing();
113-
//--------------------------------------------------------------------------
113+
//--------------------------------------------------------------------------
114114
}
115115

116116
// De-Initialization
-510 Bytes
Loading

projects/VS2022/raylib.sln

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "models_gpu_skinning", "exam
301301
EndProject
302302
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shaders_shadowmap", "examples\shaders_shadowmap.vcxproj", "{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}"
303303
EndProject
304+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_input_virtual_controls", "examples\core_input_virtual_controls.vcxproj", "{92B64AE7-D773-6F03-89F1-CE59BBF4F053}"
305+
EndProject
304306
Global
305307
GlobalSection(SolutionConfigurationPlatforms) = preSolution
306308
Debug.DLL|x64 = Debug.DLL|x64
@@ -2549,6 +2551,22 @@ Global
25492551
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release|x64.Build.0 = Release|x64
25502552
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release|x86.ActiveCfg = Release|Win32
25512553
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629}.Release|x86.Build.0 = Release|Win32
2554+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Debug.DLL|x64.ActiveCfg = Debug.DLL|x64
2555+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Debug.DLL|x64.Build.0 = Debug.DLL|x64
2556+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Debug.DLL|x86.ActiveCfg = Debug.DLL|Win32
2557+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Debug.DLL|x86.Build.0 = Debug.DLL|Win32
2558+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Debug|x64.ActiveCfg = Debug|x64
2559+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Debug|x64.Build.0 = Debug|x64
2560+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Debug|x86.ActiveCfg = Debug|Win32
2561+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Debug|x86.Build.0 = Debug|Win32
2562+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Release.DLL|x64.ActiveCfg = Release.DLL|x64
2563+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Release.DLL|x64.Build.0 = Release.DLL|x64
2564+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Release.DLL|x86.ActiveCfg = Release.DLL|Win32
2565+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Release.DLL|x86.Build.0 = Release.DLL|Win32
2566+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Release|x64.ActiveCfg = Release|x64
2567+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Release|x64.Build.0 = Release|x64
2568+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Release|x86.ActiveCfg = Release|Win32
2569+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053}.Release|x86.Build.0 = Release|Win32
25522570
EndGlobalSection
25532571
GlobalSection(SolutionProperties) = preSolution
25542572
HideSolutionNode = FALSE
@@ -2701,6 +2719,7 @@ Global
27012719
{703BE7BA-5B99-4F70-806D-3A259F6A991E} = {278D8859-20B1-428F-8448-064F46E1F021}
27022720
{8245DAD9-D402-4D5C-8F45-32229CD3B263} = {AF5BEC5C-1F2B-4DA8-B12D-D09FE569237C}
27032721
{41BBCC10-6FDE-48A1-B2E0-A0EC6A668629} = {5317807F-61D4-4E0F-B6DC-2D9F12621ED9}
2722+
{92B64AE7-D773-6F03-89F1-CE59BBF4F053} = {6C82BAAE-BDDF-457D-8FA8-7E2490B07035}
27042723
EndGlobalSection
27052724
GlobalSection(ExtensibilityGlobals) = postSolution
27062725
SolutionGuid = {E926C768-6307-4423-A1EC-57E95B1FAB29}

0 commit comments

Comments
 (0)