diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 46687dea91..eb4403adf1 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -48,6 +48,8 @@ #include #endif +#include + #ifdef _WIN32 namespace MainWindow { void BrowseAndBoot(std::string defaultPath, bool browseDirectory = false); @@ -708,6 +710,8 @@ GamePauseScreen::~GamePauseScreen() { } void GamePauseScreen::CreateViews() { + static const int NUM_SAVESLOTS = 5; + using namespace UI; Margins actionMenuMargins(0, 100, 15, 0); I18NCategory *gs = GetI18NCategory("Graphics"); @@ -722,14 +726,21 @@ void GamePauseScreen::CreateViews() { ViewGroup *leftColumnItems = new LinearLayout(ORIENT_VERTICAL); leftColumn->Add(leftColumnItems); - saveSlots_ = leftColumnItems->Add(new ChoiceStrip(ORIENT_HORIZONTAL, new LinearLayoutParams(300, WRAP_CONTENT))); - saveSlots_->AddChoice(" 1 "); - saveSlots_->AddChoice(" 2 "); - saveSlots_->AddChoice(" 3 "); - saveSlots_->AddChoice(" 4 "); - saveSlots_->AddChoice(" 5 "); + + + for (int i = 0; i < NUM_SAVESLOTS; i++){ + std::stringstream saveSlotText; + saveSlotText<<" "<AddChoice(saveSlotText.str()); + + if (SaveState::HasSaveInSlot(i)) { + saveSlots_->HighlightChoice(i); + } + } saveSlots_->SetSelection(g_Config.iCurrentStateSlot); + saveSlots_->OnChoice.Handle(this, &GamePauseScreen::OnStateSelected); saveStateButton_ = leftColumnItems->Add(new Choice(i->T("Save State"))); diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 40a29057f2..68db3042d7 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -451,11 +451,14 @@ void NativeInitGraphics() { ui_theme.itemDownStyle.fgColor = 0xFFFFFFFF; ui_theme.itemDisabledStyle.background = UI::Drawable(0x55E0D4AF); ui_theme.itemDisabledStyle.fgColor = 0xFFcccccc; + ui_theme.itemHighlightedStyle.background = UI::Drawable(0x55bdBB39); + ui_theme.itemHighlightedStyle.fgColor = 0xFFFFFFFF; ui_theme.buttonStyle = ui_theme.itemStyle; ui_theme.buttonFocusedStyle = ui_theme.itemFocusedStyle; ui_theme.buttonDownStyle = ui_theme.itemDownStyle; ui_theme.buttonDisabledStyle = ui_theme.itemDisabledStyle; + ui_theme.buttonHighlightedStyle = ui_theme.itemHighlightedStyle; ui_theme.popupTitle.fgColor = 0xFFE3BE59; ui_draw2d.Init();