From f67a74008cd63e310e749525847875656b132392 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Sat, 10 Aug 2019 17:02:56 -0400 Subject: [PATCH] Optional color --- examples/textures/textures_image_loading.cpp | 4 ++-- include/raylib/Texture2D.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/textures/textures_image_loading.cpp b/examples/textures/textures_image_loading.cpp index 18f94d4..bfdb61c 100644 --- a/examples/textures/textures_image_loading.cpp +++ b/examples/textures/textures_image_loading.cpp @@ -37,7 +37,7 @@ int main() ClearBackground(RAYWHITE); - texture.Draw(screenWidth / 2 - texture.getWidth() / 2, screenHeight / 2 - texture.getHeight() / 2, WHITE); + texture.Draw(screenWidth / 2 - texture.getWidth() / 2, screenHeight / 2 - texture.getHeight() / 2); DrawText("this IS a texture loaded from an image!", 300, 370, 10, GRAY); @@ -46,4 +46,4 @@ int main() } return 0; -} \ No newline at end of file +} diff --git a/include/raylib/Texture2D.hpp b/include/raylib/Texture2D.hpp index 7ff7a96..7763f3e 100644 --- a/include/raylib/Texture2D.hpp +++ b/include/raylib/Texture2D.hpp @@ -54,7 +54,7 @@ namespace raylib { set(LoadTexture(fileName.c_str())); } - void Draw(int posX, int posY, ::Color tint) { + void Draw(int posX, int posY, ::Color tint = WHITE) { DrawTexture(*this, posX, posY, tint); }