mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Handle an empty path in the game browser.
This commit is contained in:
1 parent
4aef413c13
commit
dbd3d8ca2a
2 files changed
+12
-2
No files matched your search
+5
-1
@@ -816,7 +816,7 @@ void GameBrowser::Refresh() {
|
||||
}
|
||||
|
||||
// Show a button to toggle pinning at the very end.
|
||||
if (browseFlags_ & BrowseFlags::PIN) {
|
||||
if ((browseFlags_ & BrowseFlags::PIN) && !path_.GetPath().empty()) {
|
||||
std::string caption = IsCurrentPathPinned() ? "-" : "+";
|
||||
if (!*gridStyle_) {
|
||||
caption = IsCurrentPathPinned() ? mm->T("UnpinPath", "Unpin") : mm->T("PinPath", "Pin");
|
||||
@@ -825,6 +825,10 @@ void GameBrowser::Refresh() {
|
||||
OnClick.Handle(this, &GameBrowser::PinToggleClick);
|
||||
}
|
||||
|
||||
if (path_.GetPath().empty()) {
|
||||
Add(new TextView(mm->T("UseBrowseOrLoad", "Use Browse to choose a folder, or Load to choose a file.")));
|
||||
}
|
||||
|
||||
if (!lastText_.empty() && gameButtons.empty()) {
|
||||
Add(new Spacer());
|
||||
Add(new Choice(lastText_, new UI::LinearLayoutParams(UI::WRAP_CONTENT, UI::WRAP_CONTENT)))->OnClick.Handle(this, &GameBrowser::LastClick);
|
||||
|
||||
Reference in new issue
Block a user