mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-12-01 01:18:52 +00:00
Optional color
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user