@@ -47,7 +47,7 @@ int main ()
47
47
//----------------------------------------------------------------------------------
48
48
if (IsKeyPressed (KEY_ONE )) zoomMode = 0 ;
49
49
else if (IsKeyPressed (KEY_TWO )) zoomMode = 1 ;
50
-
50
+
51
51
// Translate based on mouse right click
52
52
if (IsMouseButtonDown (MOUSE_BUTTON_LEFT ))
53
53
{
@@ -68,7 +68,7 @@ int main ()
68
68
// Set the offset to where the mouse is
69
69
camera .offset = GetMousePosition ();
70
70
71
- // Set the target to match, so that the camera maps the world space point
71
+ // Set the target to match, so that the camera maps the world space point
72
72
// under the cursor to the screen space point under the cursor at any zoom
73
73
camera .target = mouseWorldPos ;
74
74
@@ -89,7 +89,7 @@ int main ()
89
89
// Set the offset to where the mouse is
90
90
camera .offset = GetMousePosition ();
91
91
92
- // Set the target to match, so that the camera maps the world space point
92
+ // Set the target to match, so that the camera maps the world space point
93
93
// under the cursor to the screen space point under the cursor at any zoom
94
94
camera .target = mouseWorldPos ;
95
95
}
@@ -111,7 +111,7 @@ int main ()
111
111
112
112
BeginMode2D (camera );
113
113
114
- // Draw the 3d grid, rotated 90 degrees and centered around 0,0
114
+ // Draw the 3d grid, rotated 90 degrees and centered around 0,0
115
115
// just so we have something in the XY plane
116
116
rlPushMatrix ();
117
117
rlTranslatef (0 , 25 * 50 , 0 );
@@ -121,19 +121,19 @@ int main ()
121
121
122
122
// Draw a reference circle
123
123
DrawCircle (GetScreenWidth ()/2 , GetScreenHeight ()/2 , 50 , MAROON );
124
-
124
+
125
125
EndMode2D ();
126
-
126
+
127
127
// Draw mouse reference
128
128
//Vector2 mousePos = GetWorldToScreen2D(GetMousePosition(), camera)
129
129
DrawCircleV (GetMousePosition (), 4 , DARKGRAY );
130
- DrawTextEx (GetFontDefault (), TextFormat ("[%i, %i]" , GetMouseX (), GetMouseY ()),
130
+ DrawTextEx (GetFontDefault (), TextFormat ("[%i, %i]" , GetMouseX (), GetMouseY ()),
131
131
Vector2Add (GetMousePosition (), (Vector2 ){ -44 , -24 }), 20 , 2 , BLACK );
132
132
133
133
DrawText ("[1][2] Select mouse zoom mode (Wheel or Move)" , 20 , 20 , 20 , DARKGRAY );
134
134
if (zoomMode == 0 ) DrawText ("Mouse left button drag to move, mouse wheel to zoom" , 20 , 50 , 20 , DARKGRAY );
135
135
else DrawText ("Mouse left button drag to move, mouse press and move to zoom" , 20 , 50 , 20 , DARKGRAY );
136
-
136
+
137
137
EndDrawing ();
138
138
//----------------------------------------------------------------------------------
139
139
}
0 commit comments