Main screen: Display .ppdmp filenames on buttons in grid mode

Makes it a bit easier to pick them out and doesn't make them look quite
as broken.
This commit is contained in:
Henrik Rydgård 2022-07-18 11:03:02 +02:00
parent 449c2338c5
commit f12e194cb2

View File

@ -322,7 +322,17 @@ void GameButton::Draw(UIContext &dc) {
dc.Draw()->Flush();
dc.RebindTexture();
dc.SetFontStyle(dc.theme->uiFont);
if (!gridStyle_) {
if (gridStyle_ && ginfo->fileType == IdentifiedFileType::PPSSPP_GE_DUMP) {
// Super simple drawing for ge dumps.
dc.PushScissor(bounds_);
const std::string currentTitle = ginfo->GetTitle();
dc.SetFontScale(0.6f, 0.6f);
dc.DrawText(title_.c_str(), bounds_.x + 4.0f, bounds_.centerY(), style.fgColor, ALIGN_VCENTER | ALIGN_LEFT);
dc.SetFontScale(1.0f, 1.0f);
title_ = currentTitle;
dc.Draw()->Flush();
dc.PopScissor();
} else if (!gridStyle_) {
float tw, th;
dc.Draw()->Flush();
dc.PushScissor(bounds_);