conventions
This commit is contained in:
parent
2ebec24664
commit
6ce48d01f5
|
|
@ -58,12 +58,14 @@ int main(void)
|
||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
// Disable the hint text once the user clicks
|
// Disable the hint text once the user clicks
|
||||||
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT) && startText) {
|
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT) && startText)
|
||||||
|
{
|
||||||
startText = false;
|
startText = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear the canvas when the user middle-clicks
|
// Clear the canvas when the user middle-clicks
|
||||||
if (IsMouseButtonPressed(MOUSE_BUTTON_MIDDLE)) {
|
if (IsMouseButtonPressed(MOUSE_BUTTON_MIDDLE))
|
||||||
|
{
|
||||||
BeginTextureMode(canvas);
|
BeginTextureMode(canvas);
|
||||||
ClearBackground(backgroundColor);
|
ClearBackground(backgroundColor);
|
||||||
EndTextureMode();
|
EndTextureMode();
|
||||||
|
|
@ -115,7 +117,7 @@ int main(void)
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
// Draw the render texture to the screen, flipped vertically to make it appear top-side up
|
// Draw the render texture to the screen, flipped vertically to make it appear top-side up
|
||||||
DrawTextureRec(canvas.texture, (Rectangle){0.0f, 0.0f, (float)canvas.texture.width,(float)-canvas.texture.height}, (Vector2){0, 0}, WHITE);
|
DrawTextureRec(canvas.texture, (Rectangle){ 0.0f, 0.0f, (float)canvas.texture.width,(float)-canvas.texture.height }, Vector2Zero(), WHITE);
|
||||||
|
|
||||||
// Draw the preview circle
|
// Draw the preview circle
|
||||||
if (!leftButtonDown) DrawCircleLinesV(GetMousePosition(), lineThickness/2.0f, (Color){ 127, 127, 127, 127 });
|
if (!leftButtonDown) DrawCircleLinesV(GetMousePosition(), lineThickness/2.0f, (Color){ 127, 127, 127, 127 });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user