Fix bug that caused us to always show UNKNOWN.PNG for PBP files in recent list and new ui

This commit is contained in:
Henrik Rydgard committed 2013-07-15 18:57:42 +02:00
1 parent f528774b39
commit bf58b32208
2 files changed
+6 -5

No files matched your search

+2 -4
View File
@@ -104,16 +104,14 @@ void GameButton::Draw(UIContext &dc) {
}
if (texture) {
dc.Draw()->Flush();
texture->Bind(0);
dc.Draw()->DrawTexRect(x, y, x+w, y+h, 0, 0, 1, 1, color);
dc.Draw()->Flush();
dc.RebindTexture();
} else {
dc.FillRect(dc.theme->buttonStyle.background, bounds_);
dc.Draw()->Flush();
Texture::Unbind();
}
dc.RebindTexture();
}
// Abstraction above path that lets you navigate easily.