- added Zandronum's text input menu items.
This commit is contained in:
parent
0b3a22d6d2
commit
65cc361e9b
4 changed files with 273 additions and 2 deletions
|
|
@ -40,6 +40,8 @@
|
|||
#include "d_gui.h"
|
||||
#include "v_font.h"
|
||||
#include "v_palette.h"
|
||||
// [TP] New #includes
|
||||
#include "v_text.h"
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(DTextEnterMenu)
|
||||
|
||||
|
|
@ -64,7 +66,8 @@ CVAR(Bool, m_showinputgrid, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
//
|
||||
//=============================================================================
|
||||
|
||||
DTextEnterMenu::DTextEnterMenu(DMenu *parent, char *textbuffer, int maxlen, int sizemode, bool showgrid)
|
||||
// [TP] Added allowcolors
|
||||
DTextEnterMenu::DTextEnterMenu(DMenu *parent, char *textbuffer, int maxlen, int sizemode, bool showgrid, bool allowcolors)
|
||||
: DMenu(parent)
|
||||
{
|
||||
mEnterString = textbuffer;
|
||||
|
|
@ -83,6 +86,7 @@ DTextEnterMenu::DTextEnterMenu(DMenu *parent, char *textbuffer, int maxlen, int
|
|||
InputGridX = 0;
|
||||
InputGridY = 0;
|
||||
}
|
||||
AllowColors = allowcolors; // [TP]
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
@ -140,6 +144,10 @@ bool DTextEnterMenu::Responder(event_t *ev)
|
|||
{
|
||||
if (mEnterString[0])
|
||||
{
|
||||
// [TP] If we allow color codes, colorize the string now.
|
||||
if (AllowColors)
|
||||
strbin(mEnterString);
|
||||
|
||||
DMenu *parent = mParentMenu;
|
||||
Close();
|
||||
parent->MenuEvent(MKEY_Input, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue