- fix hide animation of game snapshots and main screen favorites star.

This commit is contained in:
Fledge68 2019-10-19 18:45:51 -05:00
parent d6a09bbc47
commit 8202b28a1a
4 changed files with 10 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

@ -258,6 +258,8 @@ void CButtonsMgr::setTexture(s16 id, TexData &bg, int width, int height)
lbl->h = height;
lbl->x = lbl->x + width / 2;// set to new center based on new w and h
lbl->y = lbl->y + height / 2;
lbl->targetPos = Vector3D((float)(lbl->x + lbl->hideParam.dx), (float)(lbl->y + lbl->hideParam.dy), 0.f);
lbl->pos = lbl->targetPos;
break;
case GUIELT_PROGRESS:
break;
@ -282,6 +284,8 @@ void CButtonsMgr::setTexture(s16 id, TexData &bg, int x_pos, int y_pos, int widt
lbl->h = height;
lbl->x = x_pos + width / 2;
lbl->y = y_pos + height / 2;
lbl->targetPos = Vector3D((float)(lbl->x + lbl->hideParam.dx), (float)(lbl->y + lbl->hideParam.dy), 0.f);
lbl->pos = lbl->targetPos;
break;
case GUIELT_PROGRESS:
break;

View File

@ -88,19 +88,19 @@ private:
SHideParam hideParam;
EltType t;
bool visible;
int x;
int x;// x & y center of element (x + (width/2))
int y;
int w;
int h;
Vector3D pos;
Vector3D targetPos;
Vector3D pos;// actual current position (x,y,z) as it moves from hide x,y to targetpos or vice versa
Vector3D targetPos;// position to move to (x,y,z) usually hide position or x,y of element
u8 alpha;
u8 targetAlpha;
float scaleX;
float scaleY;
float targetScaleX;
float targetScaleY;
int moveByX;
int moveByX;// keeps track of how much element has moved so when reset function is called x and y can be reset.
int moveByY;
public:
virtual ~SElement(void) { }

View File

@ -823,8 +823,8 @@ int CMenu::main(void)
m_btnMgr.show(m_mainBtnCategories);
m_btnMgr.show(m_mainBtnConfig);
m_btnMgr.show(m_mainBtnHome);
m_btnMgr.show(m_favorites ? m_mainBtnFavoritesOn : m_mainBtnFavoritesOff, true);
m_btnMgr.hide(m_favorites ? m_mainBtnFavoritesOff : m_mainBtnFavoritesOn, true);
m_btnMgr.show(m_favorites ? m_mainBtnFavoritesOn : m_mainBtnFavoritesOff);
m_btnMgr.hide(m_favorites ? m_mainBtnFavoritesOff : m_mainBtnFavoritesOn);
}
else
{