diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 2dab018b9b..0aa63d250b 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -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); diff --git a/UI/MainScreen.h b/UI/MainScreen.h index 0a7c432b7f..8bb4a36312 100644 --- a/UI/MainScreen.h +++ b/UI/MainScreen.h @@ -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); };