mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Clean up save state preview fade.
Now it mostly matches the save slot text fade.
This commit is contained in:
parent
e6cf296d1a
commit
ac21d2e84d
@ -811,8 +811,14 @@ void EmuScreen::update(InputState &input) {
|
||||
}
|
||||
}
|
||||
|
||||
if (time_now_d() - saveStatePreviewShownTime_ > 2 && saveStatePreview_->GetVisibility() == UI::V_VISIBLE) {
|
||||
saveStatePreview_->SetVisibility(UI::V_GONE);
|
||||
if (saveStatePreview_->GetVisibility() == UI::V_VISIBLE) {
|
||||
double endTime = saveStatePreviewShownTime_ + 2.0;
|
||||
float alpha = clamp_value((endTime - time_now_d()) * 4.0, 0.0, 1.0);
|
||||
saveStatePreview_->SetColor(colorAlpha(0x00FFFFFF, alpha));
|
||||
|
||||
if (time_now_d() - saveStatePreviewShownTime_ > 2) {
|
||||
saveStatePreview_->SetVisibility(UI::V_GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -769,7 +769,8 @@ void HandleGlobalMessage(const std::string &msg, const std::string &value) {
|
||||
if (msg == "savestate_displayslot") {
|
||||
I18NCategory *sy = GetI18NCategory("System");
|
||||
std::string msg = StringFromFormat("%s: %d", sy->T("Savestate Slot"), SaveState::GetCurrentSlot() + 1);
|
||||
osm.Show(msg);
|
||||
// Show for the same duration as the preview.
|
||||
osm.Show(msg, 2.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user