mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-31 10:40:33 +00:00
- scriptified PlayerMenu.Drawer
This commit is contained in:
parent
74c4748593
commit
416911587e
3 changed files with 28 additions and 36 deletions
|
@ -65,6 +65,7 @@ class DPlayerMenu : public DListMenu
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(DPlayerMenu, DListMenu)
|
DECLARE_CLASS(DPlayerMenu, DListMenu)
|
||||||
|
|
||||||
|
public:
|
||||||
int PlayerClassIndex;
|
int PlayerClassIndex;
|
||||||
FPlayerClass *PlayerClass;
|
FPlayerClass *PlayerClass;
|
||||||
TArray<int> PlayerColorSets;
|
TArray<int> PlayerColorSets;
|
||||||
|
@ -91,8 +92,6 @@ public:
|
||||||
bool Responder (event_t *ev);
|
bool Responder (event_t *ev);
|
||||||
bool MenuEvent (int mkey, bool fromcontroller);
|
bool MenuEvent (int mkey, bool fromcontroller);
|
||||||
bool MouseEvent(int type, int x, int y);
|
bool MouseEvent(int type, int x, int y);
|
||||||
void Ticker ();
|
|
||||||
void Drawer ();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DPlayerMenu, false, false)
|
IMPLEMENT_CLASS(DPlayerMenu, false, false)
|
||||||
|
@ -693,38 +692,5 @@ bool DPlayerMenu::MouseEvent(int type, int x, int y)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//=============================================================================
|
|
||||||
|
|
||||||
void DPlayerMenu::Ticker ()
|
DEFINE_FIELD(DPlayerMenu, mRotation)
|
||||||
{
|
|
||||||
|
|
||||||
Super::Ticker();
|
|
||||||
}
|
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//=============================================================================
|
|
||||||
|
|
||||||
void DPlayerMenu::Drawer ()
|
|
||||||
{
|
|
||||||
|
|
||||||
Super::Drawer();
|
|
||||||
|
|
||||||
const char *str = "PRESS " TEXTCOLOR_WHITE "SPACE";
|
|
||||||
screen->DrawText (SmallFont, CR_GOLD, 320 - 32 - 32 -
|
|
||||||
SmallFont->StringWidth (str)/2,
|
|
||||||
50 + 48 + 70, str,
|
|
||||||
DTA_Clean, true, TAG_DONE);
|
|
||||||
str = mRotation ? "TO SEE FRONT" : "TO SEE BACK";
|
|
||||||
screen->DrawText (SmallFont, CR_GOLD, 320 - 32 - 32 -
|
|
||||||
SmallFont->StringWidth (str)/2,
|
|
||||||
50 + 48 + 70 + SmallFont->GetHeight (), str,
|
|
||||||
DTA_Clean, true, TAG_DONE);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "zscript/menu/optionmenuitems.txt"
|
#include "zscript/menu/optionmenuitems.txt"
|
||||||
#include "zscript/menu/colorpickermenu.txt"
|
#include "zscript/menu/colorpickermenu.txt"
|
||||||
#include "zscript/menu/joystickmenu.txt"
|
#include "zscript/menu/joystickmenu.txt"
|
||||||
|
#include "zscript/menu/playermenu.txt"
|
||||||
#include "zscript/menu/playerdisplay.txt"
|
#include "zscript/menu/playerdisplay.txt"
|
||||||
#include "zscript/menu/playercontrols.txt"
|
#include "zscript/menu/playercontrols.txt"
|
||||||
#include "zscript/menu/textentermenu.txt"
|
#include "zscript/menu/textentermenu.txt"
|
||||||
|
|
25
wadsrc/static/zscript/menu/playermenu.txt
Normal file
25
wadsrc/static/zscript/menu/playermenu.txt
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
|
||||||
|
class PlayerMenu : ListMenu native
|
||||||
|
{
|
||||||
|
native int mRotation;
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
override void Drawer ()
|
||||||
|
{
|
||||||
|
|
||||||
|
Super.Drawer();
|
||||||
|
|
||||||
|
String str = "PRESS " .. TEXTCOLOR_WHITE .. "SPACE";
|
||||||
|
screen.DrawText (SmallFont, Font.CR_GOLD, 320 - 32 - 32 - SmallFont.StringWidth (str)/2, 50 + 48 + 70, str, DTA_Clean, true);
|
||||||
|
str = mRotation ? "TO SEE FRONT" : "TO SEE BACK";
|
||||||
|
screen.DrawText (SmallFont, Font.CR_GOLD, 320 - 32 - 32 - SmallFont.StringWidth (str)/2, 50 + 48 + 70 + SmallFont.GetHeight (), str, DTA_Clean, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue