- allow menu's back button and the pause sign to be animated.

This commit is contained in:
Christoph Oelckers 2013-08-12 22:46:45 +02:00
parent 61c94648dc
commit 3518b4dd28
2 changed files with 3 additions and 3 deletions

View file

@ -855,7 +855,7 @@ void D_Display ()
FTexture *tex; FTexture *tex;
int x; int x;
tex = TexMan[gameinfo.PauseSign]; tex = TexMan(gameinfo.PauseSign);
x = (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac)/2 + x = (SCREENWIDTH - tex->GetScaledWidth() * CleanXfac)/2 +
tex->GetScaledLeftOffset() * CleanXfac; tex->GetScaledLeftOffset() * CleanXfac;
screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE); screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE);

View file

@ -207,7 +207,7 @@ bool DMenu::MouseEventBack(int type, int x, int y)
{ {
if (m_show_backbutton >= 0) if (m_show_backbutton >= 0)
{ {
FTexture *tex = TexMan[gameinfo.mBackButton]; FTexture *tex = TexMan(gameinfo.mBackButton);
if (tex != NULL) if (tex != NULL)
{ {
if (m_show_backbutton&1) x -= screen->GetWidth() - tex->GetScaledWidth() * CleanXfac; if (m_show_backbutton&1) x -= screen->GetWidth() - tex->GetScaledWidth() * CleanXfac;
@ -263,7 +263,7 @@ void DMenu::Drawer ()
{ {
if (this == DMenu::CurrentMenu && BackbuttonAlpha > 0 && m_show_backbutton >= 0 && m_use_mouse) if (this == DMenu::CurrentMenu && BackbuttonAlpha > 0 && m_show_backbutton >= 0 && m_use_mouse)
{ {
FTexture *tex = TexMan[gameinfo.mBackButton]; FTexture *tex = TexMan(gameinfo.mBackButton);
int w = tex->GetScaledWidth() * CleanXfac; int w = tex->GetScaledWidth() * CleanXfac;
int h = tex->GetScaledHeight() * CleanYfac; int h = tex->GetScaledHeight() * CleanYfac;
int x = (!(m_show_backbutton&1))? 0:screen->GetWidth() - w; int x = (!(m_show_backbutton&1))? 0:screen->GetWidth() - w;