- script side support for menu transitions.

This commit is contained in:
Christoph Oelckers 2020-10-08 17:44:23 +02:00
parent cf7518fe43
commit fa4ab53e7c
4 changed files with 7 additions and 4 deletions

View file

@ -458,7 +458,6 @@ void M_DoStartControlPanel (bool scaleoverride)
delete CurrentScaleOverrider;
CurrentScaleOverrider = nullptr;
}
}
//=============================================================================

View file

@ -21,6 +21,7 @@ class ListMenuDescriptor : MenuDescriptor native
native int mFontColor;
native int mFontColor2;
native bool mCenter;
native bool mAnimatedTransition;
native int mVirtWidth, mVirtHeight;
native void Reset();
@ -51,6 +52,7 @@ class ListMenu : Menu
{
Super.Init(parent);
mDesc = desc;
AnimatedTransition = mDesc.mAnimatedTransition;
if (desc.mCenter)
{
double center = 160;

View file

@ -94,6 +94,7 @@ class Menu : Object native ui version("2.4")
native bool mBackbuttonSelected;
native bool DontDim;
native bool DontBlur;
native bool AnimatedTransition;
native static int MenuTime();
native static Menu GetCurrentMenu();
@ -116,6 +117,7 @@ class Menu : Object native ui version("2.4")
mBackbuttonSelected = false;
DontDim = false;
DontBlur = false;
AnimatedTransition = false;
}
//=============================================================================
@ -241,11 +243,11 @@ class Menu : Object native ui version("2.4")
int y = (!(m_show_backbutton&2))? 0:screen.GetHeight() - h;
if (mBackbuttonSelected && (mMouseCapture || m_use_mouse == 1))
{
screen.DrawTexture(tex, true, x, y, DTA_CleanNoMove, true, DTA_ColorOverlay, Color(40, 255,255,255));
screen.DrawTexture(tex, true, x, y, DTA_CleanNoMove, true, DTA_ColorOverlay, Color(40, 255,255,255), DTA_NOOFFSET, true);
}
else
{
screen.DrawTexture(tex, true, x, y, DTA_CleanNoMove, true, DTA_Alpha, BackbuttonAlpha);
screen.DrawTexture(tex, true, x, y, DTA_CleanNoMove, true, DTA_Alpha, BackbuttonAlpha, DTA_NOOFFSET, true);
}
}
}

View file

@ -1,6 +1,6 @@
// This class allows global customization of certain menu aspects, e.g. replacing the menu caption.
class MenuDelegateBase
class MenuDelegateBase ui
{
virtual int DrawCaption(String title, Font fnt, int y, bool drawit)
{