mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Merge pull request #7832 from unknownbrackets/ui-tweaks
Tweak Savedata and System Info screens
This commit is contained in:
commit
e5f432c0e7
@ -406,7 +406,7 @@ void SystemInfoScreen::CreateViews() {
|
||||
std::vector<std::string> exts;
|
||||
SplitString(cpu_info.Summarize(), ',', exts);
|
||||
for (size_t i = 2; i < exts.size(); i++) {
|
||||
cpuExtensions->Add(new TextView(exts[i]));
|
||||
cpuExtensions->Add(new TextView(exts[i]))->SetFocusable(true);
|
||||
}
|
||||
|
||||
ViewGroup *oglExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
|
@ -99,7 +99,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
I18NCategory *s = GetI18NCategory("System");
|
||||
I18NCategory *n = GetI18NCategory("Networking");
|
||||
I18NCategory *ms = GetI18NCategory("MainSettings");
|
||||
I18NCategory *dev = GetI18NCategory("Developer");
|
||||
I18NCategory *de = GetI18NCategory("Developer");
|
||||
|
||||
if (vertical) {
|
||||
root_ = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
@ -474,6 +474,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
|
||||
tools->Add(new ItemHeader(ms->T("Tools")));
|
||||
tools->Add(new Choice(sa->T("Savedata Manager")))->OnClick.Handle(this, &GameSettingsScreen::OnSavedataManager);
|
||||
tools->Add(new Choice(de->T("System Information")))->OnClick.Handle(this, &GameSettingsScreen::OnSysInfo);
|
||||
|
||||
// System
|
||||
ViewGroup *systemSettingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
@ -483,7 +484,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
tabHolder->AddTab(ms->T("System"), systemSettingsScroll);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("UI Language")));
|
||||
systemSettings->Add(new Choice(dev->T("Language", "Language")))->OnClick.Handle(this, &GameSettingsScreen::OnLanguage);
|
||||
systemSettings->Add(new Choice(de->T("Language", "Language")))->OnClick.Handle(this, &GameSettingsScreen::OnLanguage);
|
||||
|
||||
systemSettings->Add(new ItemHeader(s->T("Developer Tools")));
|
||||
systemSettings->Add(new Choice(s->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools);
|
||||
@ -980,6 +981,11 @@ UI::EventReturn GameSettingsScreen::OnSavedataManager(UI::EventParams &e) {
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn GameSettingsScreen::OnSysInfo(UI::EventParams &e) {
|
||||
screenManager()->push(new SystemInfoScreen());
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
void DeveloperToolsScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
root_ = new ScrollView(ORIENT_VERTICAL);
|
||||
@ -1005,7 +1011,6 @@ void DeveloperToolsScreen::CreateViews() {
|
||||
list->Add(new CheckBox(&g_Config.bJit, s->T("Dynarec", "Dynarec (JIT)")))->OnClick.Handle(this, &DeveloperToolsScreen::OnJitAffectingSetting);
|
||||
}
|
||||
|
||||
list->Add(new Choice(de->T("System Information")))->OnClick.Handle(this, &DeveloperToolsScreen::OnSysInfo);
|
||||
list->Add(new CheckBox(&g_Config.bShowDeveloperMenu, de->T("Show Developer Menu")));
|
||||
list->Add(new CheckBox(&g_Config.bDumpDecryptedEboot, de->T("Dump Decrypted Eboot", "Dump Decrypted EBOOT.BIN (If Encrypted) When Booting Game")));
|
||||
|
||||
@ -1063,11 +1068,6 @@ UI::EventReturn DeveloperToolsScreen::OnLoggingChanged(UI::EventParams &e) {
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn DeveloperToolsScreen::OnSysInfo(UI::EventParams &e) {
|
||||
screenManager()->push(new SystemInfoScreen());
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn DeveloperToolsScreen::OnRunCPUTests(UI::EventParams &e) {
|
||||
RunTests();
|
||||
return UI::EVENT_DONE;
|
||||
|
@ -100,6 +100,7 @@ private:
|
||||
UI::EventReturn OnAudioBackend(UI::EventParams &e);
|
||||
|
||||
UI::EventReturn OnSavedataManager(UI::EventParams &e);
|
||||
UI::EventReturn OnSysInfo(UI::EventParams &e);
|
||||
|
||||
// Temporaries to convert bools to int settings
|
||||
bool cap60FPS_;
|
||||
@ -125,7 +126,6 @@ protected:
|
||||
private:
|
||||
UI::EventReturn OnBack(UI::EventParams &e);
|
||||
UI::EventReturn OnRunCPUTests(UI::EventParams &e);
|
||||
UI::EventReturn OnSysInfo(UI::EventParams &e);
|
||||
UI::EventReturn OnLoggingChanged(UI::EventParams &e);
|
||||
UI::EventReturn OnLoadLanguageIni(UI::EventParams &e);
|
||||
UI::EventReturn OnSaveLanguageIni(UI::EventParams &e);
|
||||
|
@ -241,7 +241,8 @@ void SavedataButton::Draw(UIContext &dc) {
|
||||
|
||||
float tx = 150;
|
||||
if (availableWidth < tw) {
|
||||
tx -= (1.0f + sin(time_now_d() * 1.5f)) * sineWidth;
|
||||
float overageRatio = 1.5f * availableWidth * 1.0f / tw;
|
||||
tx -= (1.0f + sin(time_now_d() * overageRatio)) * sineWidth;
|
||||
Bounds tb = bounds_;
|
||||
tb.x = bounds_.x + 150;
|
||||
tb.w = bounds_.w - 150;
|
||||
@ -279,6 +280,7 @@ void SavedataBrowser::Refresh() {
|
||||
|
||||
Add(new Spacer(1.0f));
|
||||
I18NCategory *m = GetI18NCategory("MainMenu");
|
||||
I18NCategory *s = GetI18NCategory("Savedata");
|
||||
|
||||
UI::LinearLayout *gl = new UI::LinearLayout(UI::ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
gl->SetSpacing(4.0f);
|
||||
@ -310,6 +312,12 @@ void SavedataBrowser::Refresh() {
|
||||
SavedataButton *b = gameList_->Add(savedataButtons[i]);
|
||||
b->OnClick.Handle(this, &SavedataBrowser::SavedataButtonClick);
|
||||
}
|
||||
|
||||
if (savedataButtons.empty()) {
|
||||
ViewGroup *group = new LinearLayout(ORIENT_VERTICAL, new UI::LinearLayoutParams(UI::Margins(12, 0)));
|
||||
group->Add(new TextView(s->T("None yet. Things will appear here after you save.")));
|
||||
gameList_->Add(group);
|
||||
}
|
||||
}
|
||||
|
||||
UI::EventReturn SavedataBrowser::SavedataButtonClick(UI::EventParams &e) {
|
||||
|
Loading…
Reference in New Issue
Block a user