Show region on game selection screen

This commit is contained in:
iota97 2020-02-23 08:33:44 +01:00
parent 6610cd7663
commit 592d6f902e
20 changed files with 34134 additions and 33930 deletions

View File

@ -448,6 +448,7 @@ static ConfigSetting generalSettings[] = {
ConfigSetting("EnableStateUndo", &g_Config.bEnableStateUndo, &DefaultEnableStateUndo, true, true),
ConfigSetting("RewindFlipFrequency", &g_Config.iRewindFlipFrequency, 0, true, true),
ConfigSetting("ShowRegionOnGameIcon", &g_Config.bShowRegionOnGameIcon, false, true, true),
ConfigSetting("GridView1", &g_Config.bGridView1, true),
ConfigSetting("GridView2", &g_Config.bGridView2, true),
ConfigSetting("GridView3", &g_Config.bGridView3, false),

View File

@ -209,6 +209,7 @@ public:
// UI
bool bShowDebuggerOnLoad;
int iShowFPSCounter;
bool bShowRegionOnGameIcon;
// TODO: Maybe move to a separate theme system.
uint32_t uItemStyleFg;

View File

@ -265,6 +265,7 @@ void GameInfo::ParseParamSFO() {
case 'J': region = GAMEREGION_JAPAN; break;
case 'H': region = GAMEREGION_HONGKONG; break;
case 'A': region = GAMEREGION_ASIA; break;
case 'K': region = GAMEREGION_KOREA; break;
}
/*
if (regStr == "NPEZ" || regStr == "NPEG" || regStr == "ULES" || regStr == "UCES" ||

View File

@ -46,6 +46,7 @@ enum GameRegion {
GAMEREGION_EUROPE,
GAMEREGION_HONGKONG,
GAMEREGION_ASIA,
GAMEREGION_KOREA,
GAMEREGION_OTHER,
GAMEREGION_MAX,
};

View File

@ -217,7 +217,8 @@ void GameScreen::render() {
"USA",
"Europe",
"Hong Kong",
"Asia"
"Asia",
"Korea"
};
tvRegion_->SetText(ga->T(regionNames[info->region]));
} else if (info->region > GAMEREGION_MAX){

View File

@ -718,6 +718,7 @@ void GameSettingsScreen::CreateViews() {
#endif
systemSettings->Add(new CheckBox(&g_Config.bCheckForNewVersion, sy->T("VersionCheck", "Check for new versions of PPSSPP")));
systemSettings->Add(new CheckBox(&g_Config.bShowRegionOnGameIcon, sy->T("Show region on game icon")));
if (g_Config.iMaxRecent > 0)
systemSettings->Add(new Choice(sy->T("Clear Recent Games List")))->OnClick.Handle(this, &GameSettingsScreen::OnClearRecents);

View File

@ -363,6 +363,17 @@ void GameButton::Draw(UIContext &dc) {
if (ginfo->hasConfig && !ginfo->id.empty()) {
dc.Draw()->DrawImage(I_GEAR, x, y + h - ui_images[I_GEAR].h, 1.0f);
}
if (g_Config.bShowRegionOnGameIcon && ginfo->region >= 0 && ginfo->region < GAMEREGION_MAX && ginfo->region != GAMEREGION_OTHER) {
static const int regionIcons[GAMEREGION_MAX] = {
I_FLAG_JP,
I_FLAG_US,
I_FLAG_EU,
I_FLAG_HK,
I_FLAG_AS,
I_FLAG_KO
};
dc.Draw()->DrawImage(regionIcons[ginfo->region], x + w - ui_images[regionIcons[ginfo->region]].w - 5, y + h - ui_images[regionIcons[ginfo->region]].h - 5, 1.0f);
}
if (overlayColor) {
dc.FillRect(Drawable(overlayColor), overlayBounds);
}

File diff suppressed because it is too large Load Diff

View File

@ -49,7 +49,13 @@
#define I_5 38
#define I_6 39
#define I_PSP_DISPLAY 40
#define I_FLAG_JP 41
#define I_FLAG_US 42
#define I_FLAG_EU 43
#define I_FLAG_HK 44
#define I_FLAG_AS 45
#define I_FLAG_KO 46
extern const Atlas ui_atlas;
extern const AtlasImage ui_images[41];
extern const AtlasImage ui_images[47];

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -42,3 +42,9 @@ image I_4 source_assets/image/4.png copy
image I_5 source_assets/image/5.png copy
image I_6 source_assets/image/6.png copy
image I_PSP_DISPLAY source_assets/image/psp_display.png copy
image I_FLAG_JP source_assets/image/flag_jp.png copy
image I_FLAG_US source_assets/image/flag_us.png copy
image I_FLAG_EU source_assets/image/flag_eu.png copy
image I_FLAG_HK source_assets/image/flag_hk.png copy
image I_FLAG_AS source_assets/image/flag_as.png copy
image I_FLAG_KO source_assets/image/flag_ko.png copy

View File

@ -41,3 +41,9 @@ image I_4 source_assets/image/4.png copy
image I_5 source_assets/image/5.png copy
image I_6 source_assets/image/6.png copy
image I_PSP_DISPLAY source_assets/image/psp_display.png copy
image I_FLAG_JP source_assets/image/flag_jp.png copy
image I_FLAG_US source_assets/image/flag_us.png copy
image I_FLAG_EU source_assets/image/flag_eu.png copy
image I_FLAG_HK source_assets/image/flag_hk.png copy
image I_FLAG_AS source_assets/image/flag_as.png copy
image I_FLAG_KO source_assets/image/flag_ko.png copy

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B