UI: Add "overscroll" when keyboard navigating, to show a bit of the next item. Add some shadows.

This commit is contained in:
Henrik Rydgard 2015-02-15 11:21:17 +01:00
parent 8fa7a9cd41
commit c9e6938801
3 changed files with 12 additions and 3 deletions

View File

@ -66,12 +66,17 @@ void GameScreen::CreateViews() {
if (info) {
texvGameIcon_ = leftColumn->Add(new Thin3DTextureView(0, IS_DEFAULT, new AnchorLayoutParams(144 * 2, 80 * 2, 10, 10, NONE, NONE)));
tvTitle_ = leftColumn->Add(new TextView(info->title, ALIGN_LEFT, false, new AnchorLayoutParams(10, 200, NONE, NONE)));
tvTitle_->SetShadow(true);
// This one doesn't need to be updated.
leftColumn->Add(new TextView(gamePath_, ALIGN_LEFT, true, new AnchorLayoutParams(10, 250, NONE, NONE)));
leftColumn->Add(new TextView(gamePath_, ALIGN_LEFT, true, new AnchorLayoutParams(10, 250, NONE, NONE)))->SetShadow(true);
tvGameSize_ = leftColumn->Add(new TextView("...", ALIGN_LEFT, true, new AnchorLayoutParams(10, 290, NONE, NONE)));
tvGameSize_->SetShadow(true);
tvSaveDataSize_ = leftColumn->Add(new TextView("...", ALIGN_LEFT, true, new AnchorLayoutParams(10, 320, NONE, NONE)));
tvSaveDataSize_->SetShadow(true);
tvInstallDataSize_ = leftColumn->Add(new TextView("", ALIGN_LEFT, true, new AnchorLayoutParams(10, 350, NONE, NONE)));
tvInstallDataSize_->SetShadow(true);
tvRegion_ = leftColumn->Add(new TextView("", ALIGN_LEFT, true, new AnchorLayoutParams(10, 380, NONE, NONE)));
tvRegion_->SetShadow(true);
}
ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins));

View File

@ -172,7 +172,7 @@ public:
LinearLayout *strs = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
Add(strs);
for (size_t i = 0; i < dateStrs.size(); i++) {
strs->Add(new TextView(dateStrs[i], new LinearLayoutParams(0.0, G_VCENTER)));
strs->Add(new TextView(dateStrs[i], new LinearLayoutParams(0.0, G_VCENTER)))->SetShadow(true);
}
}
} else {
@ -186,6 +186,7 @@ public:
void Draw(UIContext &dc) {
if (g_Config.iCurrentStateSlot == slot_) {
dc.FillRect(UI::Drawable(0x70000000), GetBounds().Expand(3));
dc.FillRect(UI::Drawable(0x70FFFFFF), GetBounds().Expand(3));
}
UI::LinearLayout::Draw(dc);
@ -276,12 +277,14 @@ void GamePauseScreen::CreateViews() {
ViewGroup *leftColumnItems = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
leftColumn->Add(leftColumnItems);
leftColumnItems->Add(new Spacer(0.0));
for (int i = 0; i < NUM_SAVESLOTS; i++) {
SaveSlotView *slot = leftColumnItems->Add(new SaveSlotView(i, new LayoutParams(FILL_PARENT, WRAP_CONTENT)));
slot->OnStateLoaded.Handle(this, &GamePauseScreen::OnState);
slot->OnStateSaved.Handle(this, &GamePauseScreen::OnState);
slot->OnScreenshotClicked.Handle(this, &GamePauseScreen::OnScreenshotClicked);
}
leftColumnItems->Add(new Spacer(0.0));
if (g_Config.iRewindFlipFrequency > 0) {
UI::Choice *rewindButton = leftColumnItems->Add(new Choice(i->T("Rewind")));
@ -361,6 +364,7 @@ UI::EventReturn GamePauseScreen::OnScreenshotClicked(UI::EventParams &e) {
I18NCategory *p = GetI18NCategory("Pause");
Screen *screen = new ScreenshotViewScreen(fn, title, v->GetSlot(), p);
screenManager()->push(screen);
g_Config.iCurrentStateSlot = v->GetSlot();
return UI::EVENT_DONE;
}

2
native

@ -1 +1 @@
Subproject commit 26bc250e9b0c18f442eec64cf7cd3d6342caf5d8
Subproject commit d2acef3a3b15683d553a593d1c4ca3decd3b0c41