Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Enumerations | Functions | Variables
3dgui.cpp File Reference
#include <boost/algorithm/clamp.hpp>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <string>
#include "SDL_keycode.h"
#include "SDL_opengl.h"
#include "inexor/engine/console.hpp"
#include "inexor/engine/glemu.hpp"
#include "inexor/engine/lightmap.hpp"
#include "inexor/engine/octaedit.hpp"
#include "inexor/engine/rendergl.hpp"
#include "inexor/engine/rendertext.hpp"
#include "inexor/engine/shader.hpp"
#include "inexor/fpsgame/player.hpp"
#include "inexor/fpsgame/render.hpp"
#include "inexor/fpsgame/scoreboard.hpp"
#include "inexor/io/filesystem/mediadirs.hpp"
#include "inexor/io/filesystem/path.hpp"
#include "inexor/io/input/InputRouter.hpp"
#include "inexor/model/model.hpp"
#include "inexor/network/SharedVar.hpp"
#include "inexor/shared/command.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/cube_types.hpp"
#include "inexor/shared/cube_vector.hpp"
#include "inexor/shared/ents.hpp"
#include "inexor/shared/geom.hpp"
#include "inexor/shared/tools.hpp"
#include "inexor/texture/slot.hpp"
#include "inexor/texture/texture.hpp"
#include "inexor/ui/legacy/3dgui.hpp"
#include "inexor/ui/legacy/menus.hpp"
#include "inexor/ui/legacy/textedit.hpp"
#include "inexor/ui/screen/ScreenManager.hpp"
#include "inexor/util/legacy_time.hpp"

Classes

struct  gui
 
struct  gui::list
 
struct  gui::patch
 

Macros

#define SHADOW   4
 
#define ICON_SIZE   (FONTH-SHADOW)
 
#define SKIN_W   256
 
#define SKIN_H   128
 
#define SKIN_SCALE   4
 
#define INSERT   (3*SKIN_SCALE)
 
#define MAXCOLUMNS   16
 

Enumerations

enum  {
  FIELDCOMMIT, FIELDABORT, FIELDEDIT, FIELDSHOW,
  FIELDKEY
}
 

Functions

 VARP (guiautotab, 6, 16, 40)
 
 VARP (guiclicktab, 0, 0, 1)
 
 VARP (guifadein, 0, 1, 1)
 
 VARP (guipushdist, 1, 4, 64)
 
bool g3d_input (const char *str, int len)
 
bool g3d_key (int code, bool isdown)
 
void g3d_cursorpos (float &x, float &y)
 
void g3d_resetcursor ()
 
 FVARP (guisens, 1e-3f, 1, 1e3f)
 
bool g3d_movecursor (int dx, int dy)
 
 VARNP (guifollow, useguifollow, 0, 1, 1)
 
 VARNP (gui2d, usegui2d, 0, 1, 1)
 
void g3d_addgui (g3d_callback *cb, vec &origin, int flags)
 
void g3d_limitscale (float scale)
 
static bool g3d_sort (const gui &a, const gui &b)
 
bool g3d_windowhit (bool on, bool act)
 
void g3d_render ()
 
void consolebox (int x1, int y1, int x2, int y2)
 

Variables

static struct guiwindowhit = nullptr
 
static bool layoutpass
 
static bool actionon = false
 
static float firstx
 
static float firsty
 
static int mousebuttons = 0
 
int hudannounce_begin = 0
 Bomberman HUD. More...
 
int hudannounce_timeout = 0
 
int hudannounce_effect = 0
 
char * hudannounce_text
 
static int fieldmode = FIELDSHOW
 
static bool fieldsactive = false
 
static bool hascursor
 
static float cursorx = 0.5f
 
static float cursory = 0.5f
 
static vector< guiguis2d
 
static vector< guiguis3d
 

Class Documentation

struct gui::list
Class Members
int column
int curspring
int h
int parent
int springs
int w
struct gui::patch
Class Members
ushort bottom
uchar flags
ushort left
ushort right
ushort top

Macro Definition Documentation

#define ICON_SIZE   (FONTH-SHADOW)

Referenced by gui::button_().

#define INSERT   (3*SKIN_SCALE)
#define MAXCOLUMNS   16

Referenced by gui::column().

#define SHADOW   4
#define SKIN_H   128

Referenced by consolebox(), and gui::drawskin().

#define SKIN_SCALE   4
#define SKIN_W   256

Referenced by gui::drawskin().

Enumeration Type Documentation

anonymous enum
Enumerator
FIELDCOMMIT 
FIELDABORT 
FIELDEDIT 
FIELDSHOW 
FIELDKEY 

Function Documentation

void consolebox ( int  x1,
int  y1,
int  x2,
int  y2 
)
FVARP ( guisens  ,
1e-  3f,
,
1e3f   
)
void g3d_addgui ( g3d_callback cb,
vec origin,
int  flags 
)
void g3d_cursorpos ( float &  x,
float &  y 
)

References cursorx, cursory, and guis2d.

Referenced by draw_g3d_cursor().

bool g3d_input ( const char *  str,
int  len 
)
bool g3d_key ( int  code,
bool  isdown 
)
void g3d_limitscale ( float  scale)

References gui::maxscale.

Referenced by gl_drawhud().

bool g3d_movecursor ( int  dx,
int  dy 
)
void g3d_render ( )
void g3d_resetcursor ( )

References cursorx, and cursory.

Referenced by pushgui().

static bool g3d_sort ( const gui a,
const gui b 
)
inlinestatic

References gui::dist.

Referenced by g3d_render().

bool g3d_windowhit ( bool  on,
bool  act 
)
VARNP ( guifollow  ,
useguifollow  ,
,
,
 
)
VARNP ( gui2d  ,
usegui2d  ,
,
,
 
)
VARP ( guiautotab  ,
,
16  ,
40   
)
VARP ( guiclicktab  ,
,
,
 
)
VARP ( guifadein  ,
,
,
 
)
VARP ( guipushdist  ,
,
,
64   
)

Variable Documentation

bool actionon = false
static
float cursorx = 0.5f
static
float cursory = 0.5f
static
int fieldmode = FIELDSHOW
static
bool fieldsactive = false
static

Referenced by gui::field_(), and g3d_render().

float firstx
static

Referenced by gui::end(), and g3d_windowhit().

float firsty
static

Referenced by gui::end(), and g3d_windowhit().

vector<gui> guis2d
static
vector<gui> guis3d
static

Referenced by g3d_addgui(), and g3d_render().

bool hascursor
static
int hudannounce_begin = 0

Bomberman HUD.

Referenced by game::drawhudannounce(), and game::parsemessages().

int hudannounce_effect = 0
char* hudannounce_text
int hudannounce_timeout = 0
bool layoutpass
static
int mousebuttons = 0
static
struct gui* windowhit = nullptr
static