mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
GameBrowser: Show the network folder as Network, with its own icon
The path display says Network instead of \\, and the folder button in the drive list gets the new I_NETWORK icon and a translated name. images.svg also picks up I_TOGGLE_ON and I_TOGGLE_OFF, not used yet. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
494102acb1
commit
dcb1a77dc6
3 files changed
+53
-22
No files matched your search
+6
-3
@@ -745,7 +745,9 @@ void DirButton::Draw(UIContext &dc) {
|
||||
|
||||
std::string_view text(GetText());
|
||||
ImageID image = ImageID(pinned_ ? "I_FOLDER_PINNED" : "I_FOLDER");
|
||||
if (text == "..") {
|
||||
if (path_.IsNetworkRoot()) {
|
||||
image = ImageID("I_NETWORK");
|
||||
} else if (text == "..") {
|
||||
image = ImageID("I_UP_DIRECTORY");
|
||||
text = "";
|
||||
}
|
||||
@@ -1031,7 +1033,7 @@ void GameBrowser::Refresh() {
|
||||
// Recent isn't a real folder, so it gets no path or refresh.
|
||||
const bool isRecent = path_.GetPath().ToString() == "!RECENT";
|
||||
|
||||
std::string pathStr = GetFriendlyPath(path_.GetPath(), aliasMatch_, aliasDisplay_);
|
||||
std::string pathStr = path_.GetPath().IsNetworkRoot() ? std::string(mm->T("Network")) : GetFriendlyPath(path_.GetPath(), aliasMatch_, aliasDisplay_);
|
||||
|
||||
if (pathOnSeparateLine && !isRecent) {
|
||||
Add(new TextView(pathStr, ALIGN_VCENTER | FLAG_WRAP_TEXT, true, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(8, 0, 8, 0))));
|
||||
@@ -1148,7 +1150,8 @@ void GameBrowser::Refresh() {
|
||||
|
||||
if (!isGame && !isSaveData) {
|
||||
if (browseFlags_ & BrowseFlags::NAVIGATE) {
|
||||
dirButtons.push_back(new DirButton(fileInfo[i].fullName, fileInfo[i].name, lastViewMode_, new UI::LinearLayoutParams(UI::FILL_PARENT, UI::FILL_PARENT)));
|
||||
const std::string name = fileInfo[i].fullName.IsNetworkRoot() ? std::string(mm->T("Network")) : fileInfo[i].name;
|
||||
dirButtons.push_back(new DirButton(fileInfo[i].fullName, name, lastViewMode_, new UI::LinearLayoutParams(UI::FILL_PARENT, UI::FILL_PARENT)));
|
||||
}
|
||||
} else {
|
||||
gameButtons.push_back(new GameButton(fileInfo[i].fullName, lastViewMode_, new UI::LinearLayoutParams(gridStyle ? UI::WRAP_CONTENT : UI::FILL_PARENT, UI::WRAP_CONTENT)));
|
||||
|
||||
Reference in new issue
Block a user