mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Uses StickyChoice's Highlight() to highlight save slots in use
This commit is contained in:
parent
34f7109821
commit
4dba847ea4
@ -48,6 +48,8 @@
|
||||
#include <QDir>
|
||||
#endif
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#ifdef _WIN32
|
||||
namespace MainWindow {
|
||||
void BrowseAndBoot(std::string defaultPath, bool browseDirectory = false);
|
||||
@ -707,6 +709,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");
|
||||
@ -721,24 +725,23 @@ 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 ");
|
||||
|
||||
saveSlots_->SetSelection(g_Config.iCurrentStateSlot);
|
||||
saveSlots_->OnChoice.Handle(this, &GamePauseScreen::OnStateSelected);
|
||||
|
||||
for(int i = 0; i < 5; i++){
|
||||
if(SaveState::HasSaveInSlot(i)){
|
||||
for (int i = 0; i < NUM_SAVESLOTS; i++){
|
||||
std::stringstream saveSlotText;
|
||||
saveSlotText<<" "<<i + 1<<" ";
|
||||
|
||||
saveSlots_->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")));
|
||||
saveStateButton_->OnClick.Handle(this, &GamePauseScreen::OnSaveState);
|
||||
|
||||
|
@ -451,8 +451,8 @@ 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(0x22edc24c);
|
||||
ui_theme.itemHighlightedStyle.fgColor = 0xFFbd9939;
|
||||
ui_theme.itemHighlightedStyle.background = UI::Drawable(0xFFbdBB39);
|
||||
ui_theme.itemHighlightedStyle.fgColor = 0xFFFFFFFF;
|
||||
|
||||
ui_theme.buttonStyle = ui_theme.itemStyle;
|
||||
ui_theme.buttonFocusedStyle = ui_theme.itemFocusedStyle;
|
||||
|
Loading…
Reference in New Issue
Block a user