summaryrefslogtreecommitdiffhomepage
path: root/examples/core/core_window_letterbox.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-04-22 18:55:24 +0200
committerRay <[email protected]>2021-04-22 18:55:24 +0200
commitdcf52c132fb0ca28f37dae9d957155e2541df812 (patch)
treeb6c263e59daba00fc33badd0a45fa6756d5df14c /examples/core/core_window_letterbox.c
parentf92ee46d86b5a0cfb05c10b0c31fb966a4784b44 (diff)
downloadraylib-dcf52c132fb0ca28f37dae9d957155e2541df812.tar.gz
raylib-dcf52c132fb0ca28f37dae9d957155e2541df812.zip
Remove trail spaces
Diffstat (limited to 'examples/core/core_window_letterbox.c')
-rw-r--r--examples/core/core_window_letterbox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/core/core_window_letterbox.c b/examples/core/core_window_letterbox.c
index c37e7560..dca70d9a 100644
--- a/examples/core/core_window_letterbox.c
+++ b/examples/core/core_window_letterbox.c
@@ -64,13 +64,13 @@ int main(void)
// Recalculate random colors for the bars
for (int i = 0; i < 10; i++) colors[i] = (Color){ GetRandomValue(100, 250), GetRandomValue(50, 150), GetRandomValue(10, 100), 255 };
}
-
+
// Update virtual mouse (clamped mouse value behind game screen)
Vector2 mouse = GetMousePosition();
Vector2 virtualMouse = { 0 };
virtualMouse.x = (mouse.x - (GetScreenWidth() - (gameScreenWidth*scale))*0.5f)/scale;
virtualMouse.y = (mouse.y - (GetScreenHeight() - (gameScreenHeight*scale))*0.5f)/scale;
- virtualMouse = ClampValue(virtualMouse, (Vector2){ 0, 0 }, (Vector2){ gameScreenWidth, gameScreenHeight });
+ virtualMouse = ClampValue(virtualMouse, (Vector2){ 0, 0 }, (Vector2){ gameScreenWidth, gameScreenHeight });
// Apply the same transformation as the virtual mouse to the real mouse (i.e. to work with raygui)
//SetMouseOffset(-(GetScreenWidth() - (gameScreenWidth*scale))*0.5f, -(GetScreenHeight() - (gameScreenHeight*scale))*0.5f);
@@ -90,7 +90,7 @@ int main(void)
for (int i = 0; i < 10; i++) DrawRectangle(0, (gameScreenHeight/10)*i, gameScreenWidth, gameScreenHeight/10, colors[i]);
DrawText("If executed inside a window,\nyou can resize the window,\nand see the screen scaling!", 10, 25, 20, WHITE);
-
+
DrawText(TextFormat("Default Mouse: [%i , %i]", (int)mouse.x, (int)mouse.y), 350, 25, 20, GREEN);
DrawText(TextFormat("Virtual Mouse: [%i , %i]", (int)virtualMouse.x, (int)virtualMouse.y), 350, 55, 20, YELLOW);