save states with data on them are now highlighted

This commit is contained in:
Siddharth 2013-10-07 21:46:02 +05:30
parent c4b44d3a39
commit 630201017b
2 changed files with 15 additions and 0 deletions

View File

@ -202,6 +202,10 @@ void GameButton::Draw(UIContext &dc) {
dc.RebindTexture();
}
class SaveChoice : public UI::Choice{
};
// Abstraction above path that lets you navigate easily.
// "/" is a special path that means the root of the file system. On Windows,
// listing this will yield drives.
@ -723,14 +727,22 @@ void GamePauseScreen::CreateViews() {
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)){
saveSlots_->HighlightChoice(i);
}
}
saveStateButton_ = leftColumnItems->Add(new Choice(i->T("Save State")));
saveStateButton_->OnClick.Handle(this, &GamePauseScreen::OnSaveState);

View File

@ -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(0x22edc24c);
ui_theme.itemHighlightedStyle.fgColor = 0xFFbd9939;
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();