Slow down the marquee for longer names.

Let's not make anyone on a small screen dizzy.
This commit is contained in:
Unknown W. Brackets 2015-06-28 18:46:50 -07:00
parent 577beafeb3
commit c043b557ad

View File

@ -241,7 +241,8 @@ void SavedataButton::Draw(UIContext &dc) {
float tx = 150;
if (availableWidth < tw) {
tx -= (1.0f + sin(time_now_d() * 1.5f)) * sineWidth;
float overageRatio = 1.5f * availableWidth * 1.0f / tw;
tx -= (1.0f + sin(time_now_d() * overageRatio)) * sineWidth;
Bounds tb = bounds_;
tb.x = bounds_.x + 150;
tb.w = bounds_.w - 150;