mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Update screen.
This commit is contained in:
parent
9814b1d6d2
commit
8d692f26e0
@ -834,11 +834,17 @@ void GamePauseScreen::sendMessage(const char *message, const char *value) {
|
||||
}
|
||||
|
||||
void UmdReplaceScreen::CreateViews() {
|
||||
Margins actionMenuMargins(0, 100, 15, 0);
|
||||
I18NCategory *m = GetI18NCategory("MainMenu");
|
||||
|
||||
TabHolder *leftColumn = new TabHolder(ORIENT_HORIZONTAL, 64);
|
||||
TabHolder *leftColumn = new TabHolder(ORIENT_HORIZONTAL, 64, new LinearLayoutParams(1.0));
|
||||
leftColumn->SetClip(true);
|
||||
|
||||
ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(270, FILL_PARENT, actionMenuMargins));
|
||||
LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
rightColumnItems->SetSpacing(0.0f);
|
||||
rightColumn->Add(rightColumnItems);
|
||||
|
||||
ScrollView *scrollRecentGames = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
ScrollView *scrollAllGames = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
|
||||
|
||||
@ -860,6 +866,9 @@ void UmdReplaceScreen::CreateViews() {
|
||||
tabRecentGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected);
|
||||
tabAllGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected);
|
||||
|
||||
rightColumnItems->Add(new Choice(m->T("Cancel")))->OnClick.Handle(this, &UmdReplaceScreen::OnCancel);
|
||||
rightColumnItems->Add(new Choice(m->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings);
|
||||
|
||||
if (g_Config.recentIsos.size() > 0) {
|
||||
leftColumn->SetCurrentTab(0);
|
||||
}else{
|
||||
@ -867,8 +876,8 @@ void UmdReplaceScreen::CreateViews() {
|
||||
}
|
||||
|
||||
root_ = new LinearLayout(ORIENT_HORIZONTAL);
|
||||
leftColumn->ReplaceLayoutParams(new LinearLayoutParams(1.0));
|
||||
root_->Add(leftColumn);
|
||||
root_->Add(rightColumn);
|
||||
}
|
||||
|
||||
void UmdReplaceScreen::update(InputState &input) {
|
||||
@ -882,6 +891,15 @@ UI::EventReturn UmdReplaceScreen::OnGameSelected(UI::EventParams &e) {
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn UmdReplaceScreen:: OnCancel(UI::EventParams &e) {
|
||||
screenManager()->finishDialog(this, DR_CANCEL);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn UmdReplaceScreen:: OnGameSettings(UI::EventParams &e) {
|
||||
screenManager()->push(new GameSettingsScreen(""));
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
UI::EventReturn UmdReplaceScreen:: OnGameSelectedInstant(UI::EventParams &e) {
|
||||
__UmdReplace(e.s);
|
||||
screenManager()->finishDialog(this, DR_OK);
|
||||
|
@ -101,4 +101,7 @@ protected:
|
||||
private:
|
||||
UI::EventReturn OnGameSelected(UI::EventParams &e);
|
||||
UI::EventReturn OnGameSelectedInstant(UI::EventParams &e);
|
||||
|
||||
UI::EventReturn OnCancel(UI::EventParams &e);
|
||||
UI::EventReturn OnGameSettings(UI::EventParams &e);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user