mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- added the QAV drawer page.
This commit is contained in:
parent
2f8284f10b
commit
a10aacea3a
4 changed files with 85 additions and 13 deletions
|
@ -201,5 +201,35 @@ void GameInterface::QuitToTitle()
|
|||
gameaction = ga_mainmenu;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_ImageScrollerPageQavDrawer, LoadQav)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_STRING(str);
|
||||
auto qav = new CGameMenuItemQAV(160, 100, str, false, true);
|
||||
ACTION_RETURN_POINTER(qav);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_ImageScrollerPageQavDrawer, DestroyQav)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_POINTER(qav, CGameMenuItemQAV);
|
||||
if (qav) delete qav;
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_ImageScrollerPageQavDrawer, DrawQav)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_POINTER(qav, CGameMenuItemQAV);
|
||||
qav->Draw();
|
||||
return 0;
|
||||
}
|
||||
|
||||
END_BLD_NS
|
||||
|
||||
|
|
|
@ -212,19 +212,16 @@ ImageScroller "HelpMenu"
|
|||
}
|
||||
animatedtransition
|
||||
}
|
||||
/*
|
||||
ifgame(blood)
|
||||
{
|
||||
class "$.ImageScrollerMenu"
|
||||
// The duplication here is to integrate the alternating versions of HELP3
|
||||
QAVAnimationItem "Help4.qav"
|
||||
QAVAnimationItem "Help5.qav"
|
||||
QAVAnimationItem "Help3.qav"
|
||||
QAVAnimationItem "Help4.qav"
|
||||
QAVAnimationItem "Help5.qav"
|
||||
QAVAnimationItem "Help3b.qav"
|
||||
QAVDrawer "Help4.qav"
|
||||
QAVDrawer "Help5.qav"
|
||||
QAVDrawer "Help3.qav"
|
||||
QAVDrawer "Help4.qav"
|
||||
QAVDrawer "Help5.qav"
|
||||
QAVDrawer "Help3b.qav"
|
||||
}
|
||||
*/
|
||||
ifgame(ShadowWarrior)
|
||||
{
|
||||
// The menu has no default binding, but if someone tries to open it anyway show the cool retro ads that were shipped with the game. :D
|
||||
|
@ -341,13 +338,10 @@ ImageScroller "CreditsMenu"
|
|||
TextItem "REDNECK RAMPAGE RIDES AGAIN\n(c) 1998 XATRIX ENTERTAINMENT, INC.\n\nREDNECK RAMPAGE RIDES AGAIN\nIS A TRADEMARK OF\nINTERPLAY PRODUCTIONS" //, 70
|
||||
animatedtransition
|
||||
}
|
||||
/*
|
||||
ifgame(blood)
|
||||
{
|
||||
class "Blood.ImageScrollerMenu"
|
||||
QAVAnimationItem "Credits.qav"
|
||||
QAVDrawer "Credits.qav"
|
||||
}
|
||||
*/
|
||||
ifgame(ShadowWarrior)
|
||||
{
|
||||
ifgame (shareware)
|
||||
|
|
|
@ -90,3 +90,42 @@ class ListMenuItemBloodTextItem : ListMenuItemTextItem
|
|||
|
||||
}
|
||||
|
||||
|
||||
class ImageScrollerPageQavDrawer : ImageScrollerPage
|
||||
{
|
||||
String qavn;
|
||||
voidptr qav;
|
||||
|
||||
void Init(ImageScrollerDescriptor desc, String qavname)
|
||||
{
|
||||
Super.Init();
|
||||
qavn = qavname;
|
||||
qav = null;
|
||||
}
|
||||
|
||||
override void OnDestroy()
|
||||
{
|
||||
if (qav) DestroyQav(qav);
|
||||
Super.OnDestroy();
|
||||
}
|
||||
|
||||
override void Drawer(bool selected)
|
||||
{
|
||||
if (qav) DrawQav(qav);
|
||||
}
|
||||
|
||||
override void OnStartPage()
|
||||
{
|
||||
qav = LoadQav(qavn);
|
||||
}
|
||||
|
||||
override void OnEndPage()
|
||||
{
|
||||
if (qav) DestroyQav(qav);
|
||||
qav = null;
|
||||
}
|
||||
|
||||
native static voidptr LoadQav(string s);
|
||||
native static void DestroyQav(voidptr s);
|
||||
native static void DrawQav(voidptr s);
|
||||
}
|
||||
|
|
|
@ -56,6 +56,12 @@ class ImageScrollerPage : MenuItemBase
|
|||
{
|
||||
screen.DrawTexture(tex, true, x, y, DTA_VirtualWidth, virtWidth, DTA_VirtualHeight, virtHeight, DTA_FullscreenScale, FSMode_ScaleToFit43);
|
||||
}
|
||||
|
||||
virtual void OnStartPage()
|
||||
{}
|
||||
|
||||
virtual void OnEndPage()
|
||||
{}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -152,6 +158,7 @@ class ImageScrollerMenu : Menu
|
|||
dir = animtype;
|
||||
previous = current;
|
||||
}
|
||||
to.onStartPage();
|
||||
current = to;
|
||||
}
|
||||
|
||||
|
@ -162,6 +169,7 @@ class ImageScrollerMenu : Menu
|
|||
mDesc = desc;
|
||||
AnimatedTransition = desc.mAnimatedTransition;
|
||||
current = mDesc.mItems[0];
|
||||
current.onStartPage();
|
||||
previous = null;
|
||||
}
|
||||
|
||||
|
@ -250,6 +258,7 @@ class ImageScrollerMenu : Menu
|
|||
screen.SetOffset(0, 0);
|
||||
return true;
|
||||
}
|
||||
previous.OnEndPage();
|
||||
previous = null;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue