mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- removed all native remnants of TextEnterMenu.
This commit is contained in:
parent
f5a0f6b3bf
commit
de1e7661eb
5 changed files with 46 additions and 94 deletions
|
@ -848,7 +848,6 @@ set( FASTMATH_PCH_SOURCES
|
||||||
menu/loadsavemenu.cpp
|
menu/loadsavemenu.cpp
|
||||||
menu/menu.cpp
|
menu/menu.cpp
|
||||||
menu/menudef.cpp
|
menu/menudef.cpp
|
||||||
menu/menuinput.cpp
|
|
||||||
menu/messagebox.cpp
|
menu/messagebox.cpp
|
||||||
menu/optionmenu.cpp
|
menu/optionmenu.cpp
|
||||||
menu/playermenu.cpp
|
menu/playermenu.cpp
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
CVAR (Float, mouse_sensitivity, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR (Float, mouse_sensitivity, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
CVAR (Bool, show_messages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CVAR (Bool, show_messages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
CVAR (Bool, show_obituaries, true, CVAR_ARCHIVE)
|
CVAR (Bool, show_obituaries, true, CVAR_ARCHIVE)
|
||||||
|
CVAR(Bool, m_showinputgrid, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
|
|
||||||
CVAR (Float, snd_menuvolume, 0.6f, CVAR_ARCHIVE)
|
CVAR (Float, snd_menuvolume, 0.6f, CVAR_ARCHIVE)
|
||||||
|
|
|
@ -348,34 +348,10 @@ extern FOptionMap OptionValues;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//
|
//
|
||||||
// Input some text
|
//
|
||||||
//
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
class DTextEnterMenu : public DMenu
|
|
||||||
{
|
|
||||||
DECLARE_CLASS(DTextEnterMenu, DMenu)
|
|
||||||
|
|
||||||
public:
|
|
||||||
FString mEnterString;
|
|
||||||
unsigned int mEnterSize;
|
|
||||||
unsigned int mEnterPos;
|
|
||||||
int mSizeMode; // 1: size is length in chars. 2: also check string width
|
|
||||||
bool mInputGridOkay;
|
|
||||||
|
|
||||||
int InputGridX;
|
|
||||||
int InputGridY;
|
|
||||||
|
|
||||||
// [TP]
|
|
||||||
bool AllowColors;
|
|
||||||
|
|
||||||
|
|
||||||
DTextEnterMenu() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct event_t;
|
struct event_t;
|
||||||
void M_EnableMenu (bool on) ;
|
void M_EnableMenu (bool on) ;
|
||||||
bool M_Responder (event_t *ev);
|
bool M_Responder (event_t *ev);
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
/*
|
|
||||||
** menuinput.cpp
|
|
||||||
** The string input code
|
|
||||||
**
|
|
||||||
**---------------------------------------------------------------------------
|
|
||||||
** Copyright 2001-2010 Randy Heit
|
|
||||||
** Copyright 2010 Christoph Oelckers
|
|
||||||
** All rights reserved.
|
|
||||||
**
|
|
||||||
** Redistribution and use in source and binary forms, with or without
|
|
||||||
** modification, are permitted provided that the following conditions
|
|
||||||
** are met:
|
|
||||||
**
|
|
||||||
** 1. Redistributions of source code must retain the above copyright
|
|
||||||
** notice, this list of conditions and the following disclaimer.
|
|
||||||
** 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
** notice, this list of conditions and the following disclaimer in the
|
|
||||||
** documentation and/or other materials provided with the distribution.
|
|
||||||
** 3. The name of the author may not be used to endorse or promote products
|
|
||||||
** derived from this software without specific prior written permission.
|
|
||||||
**
|
|
||||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
||||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
||||||
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
||||||
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
||||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
||||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
**---------------------------------------------------------------------------
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "menu/menu.h"
|
|
||||||
#include "v_video.h"
|
|
||||||
#include "c_cvars.h"
|
|
||||||
#include "d_event.h"
|
|
||||||
#include "d_gui.h"
|
|
||||||
#include "v_font.h"
|
|
||||||
#include "v_palette.h"
|
|
||||||
#include "cmdlib.h"
|
|
||||||
// [TP] New #includes
|
|
||||||
#include "v_text.h"
|
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DTextEnterMenu, false, false)
|
|
||||||
|
|
||||||
CVAR(Bool, m_showinputgrid, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|
||||||
|
|
||||||
DEFINE_FIELD(DTextEnterMenu, mEnterString);
|
|
||||||
DEFINE_FIELD(DTextEnterMenu, mEnterSize);
|
|
||||||
DEFINE_FIELD(DTextEnterMenu, mEnterPos);
|
|
||||||
DEFINE_FIELD(DTextEnterMenu, mSizeMode); // 1: size is length in chars. 2: also check string width
|
|
||||||
DEFINE_FIELD(DTextEnterMenu, mInputGridOkay);
|
|
||||||
DEFINE_FIELD(DTextEnterMenu, InputGridX);
|
|
||||||
DEFINE_FIELD(DTextEnterMenu, InputGridY);
|
|
||||||
DEFINE_FIELD(DTextEnterMenu, AllowColors);
|
|
|
@ -1,20 +1,54 @@
|
||||||
|
/*
|
||||||
|
** menuinput.cpp
|
||||||
|
** The string input code
|
||||||
|
**
|
||||||
|
**---------------------------------------------------------------------------
|
||||||
|
** Copyright 2001-2010 Randy Heit
|
||||||
|
** Copyright 2010-2017 Christoph Oelckers
|
||||||
|
** All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
**
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
**---------------------------------------------------------------------------
|
||||||
|
**
|
||||||
|
*/
|
||||||
|
|
||||||
// This is only the parts that are needed to make the menu fully work right now. More to come later.
|
|
||||||
class TextEnterMenu : Menu native
|
class TextEnterMenu : Menu
|
||||||
{
|
{
|
||||||
const INPUTGRID_WIDTH = 13;
|
const INPUTGRID_WIDTH = 13;
|
||||||
const INPUTGRID_HEIGHT = 5;
|
const INPUTGRID_HEIGHT = 5;
|
||||||
|
|
||||||
const Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-=.,!?@'\":;[]()<>^#$%&*/_ \b";
|
const Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-=.,!?@'\":;[]()<>^#$%&*/_ \b";
|
||||||
|
|
||||||
native String mEnterString;
|
String mEnterString;
|
||||||
native int mEnterSize;
|
int mEnterSize;
|
||||||
native int mEnterPos;
|
int mEnterPos;
|
||||||
native int mSizeMode; // 1: size is length in chars. 2: also check string width
|
int mSizeMode; // 1: size is length in chars. 2: also check string width
|
||||||
native bool mInputGridOkay;
|
bool mInputGridOkay;
|
||||||
native int InputGridX;
|
int InputGridX;
|
||||||
native int InputGridY;
|
int InputGridY;
|
||||||
native bool AllowColors;
|
bool AllowColors;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue