Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gui Struct Reference
Inheritance diagram for gui:
g3d_gui

Classes

struct  list
 
struct  patch
 

Public Member Functions

bool allowautotab (bool on) override
 
void autotab ()
 
bool shouldtab () override
 
bool visible ()
 
void tab (const char *name, int color) override
 
bool ishorizontal () const
 
bool isvertical () const
 
void pushlist () override
 
void poplist () override
 
int text (const char *text, int color, const char *icon) override
 
int button (const char *text, int color, const char *icon) override
 
int title (const char *text, int color, const char *icon) override
 
void separator () override
 
void progress (float percent) override
 
void strut (float size) override
 
void space (float size) override
 
void spring (int weight) override
 
void column (int col) override
 
int layout (int w, int h)
 
bool mergehits (bool on) override
 
bool ishit (int w, int h, int x=curx, int y=cury)
 
int image (Texture *t, float scale, bool overlaid) override
 
int texture (VSlot &vslot, float scale, bool overlaid) override
 
int playerpreview (int model, int team, int weap, float sizescale, bool overlaid) override
 
int modelpreview (const char *name, int anim, float sizescale, bool overlaid) override
 
int prefabpreview (const char *prefab, const vec &color, float sizescale, bool overlaid) override
 
void slider (int &val, int vmin, int vmax, int color, const char *label) override
 
char * field (const char *name, int color, int length, int height, const char *initval, int initmode) override
 
char * keyfield (const char *name, int color, int length, int height, const char *initval, int initmode) override
 
char * field_ (const char *name, int color, int length, int height, const char *initval, int initmode, int fieldtype=FIELDEDIT)
 
void rect_ (float x, float y, float w, float h, bool lines=false)
 
void rect_ (float x, float y, float w, float h, int usetc)
 
void text_ (const char *text, int x, int y, int color, bool shadow, bool force=false)
 
void background (int color, int inheritw, int inherith) override
 
void icon_ (Texture *t, bool overlaid, int x, int y, int size, bool hit)
 
void previewslot (VSlot &vslot, bool overlaid, int x, int y, int size, bool hit)
 
void line_ (int size, float percent=1.0f)
 
void textbox (const char *text, int width, int height, int color) override
 
int button_ (const char *text, int color, const char *icon, bool clickable, bool center)
 
void adjustscale ()
 
void start (int starttime, float initscale, int *tab, bool allowinput) override
 
void adjusthorizontalcolumn (int col, int i)
 
void adjustverticalcolumn (int col, int i)
 
void adjustcolumns ()
 
void end () override
 
void draw ()
 
int return text (str, color, icon)
 
int textf (const char *fmt, int color, const char *icon=nullptr,...) PRINTFARGS(2
 
int return button (str, color, icon)
 
int buttonf (const char *fmt, int color, const char *icon=nullptr,...) PRINTFARGS(2
 
int return title (str, color, icon)
 
int titlef (const char *fmt, int color, const char *icon=nullptr,...) PRINTFARGS(2
 

Static Public Member Functions

static void reset ()
 
static void drawskin (int x, int y, int gapw, int gaph, int start, int n, int passes=1, const vec &light=vec(1, 1, 1), float alpha=0.80f)
 

Public Attributes

int firstlist
 
int nextlist
 
int columns [MAXCOLUMNS]
 
vec origin
 
vec scale
 
vecsavedorigin
 
float dist
 
g3d_callbackcb
 
bool gui2d
 

Static Public Attributes

static vector< listlists
 
static float hitx
 
static float hity
 
static int curdepth
 
static int curlist
 
static int xsize
 
static int ysize
 
static int curx
 
static int cury
 
static bool shouldmergehits = false
 
static bool shouldautotab = true
 
static int ty
 
static int tx
 
static int tpos
 
static int * tcurrent
 
static int tcolor
 
static Textureskintex = nullptr
 
static Textureoverlaytex = nullptr
 
static Textureslidertex = nullptr
 
static const int skinx [] = {0, 11, 23, 37, 105, 119, 137, 151, 215, 229, 246, 256}
 
static const int skiny [] = {0, 7, 21, 34, 43, 48, 56, 104, 111, 117, 128}
 
static const struct gui::patch patches []
 
static float basescale
 
static float maxscale = 1
 
static bool passthrough
 
static float alpha
 
static vec light
 

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

Member Function Documentation

void gui::adjustcolumns ( )
inline
void gui::adjusthorizontalcolumn ( int  col,
int  i 
)
inline
void gui::adjustscale ( )
inline
void gui::adjustverticalcolumn ( int  col,
int  i 
)
inline
bool gui::allowautotab ( bool  on)
inlineoverridevirtual

Implements g3d_gui.

void gui::autotab ( )
inline

References FONTH, and layoutpass.

void gui::background ( int  color,
int  inheritw,
int  inherith 
)
inlineoverridevirtual
int return g3d_gui::button ( str  ,
color  ,
icon   
)
inherited
int gui::button ( const char *  text,
int  color,
const char *  icon 
)
inlineoverridevirtual

Implements g3d_gui.

int gui::button_ ( const char *  text,
int  color,
const char *  icon,
bool  clickable,
bool  center 
)
inline
int g3d_gui::buttonf ( const char *  fmt,
int  color,
const char *  icon = nullptr,
  ... 
)
inherited
void gui::column ( int  col)
inlineoverridevirtual

Implements g3d_gui.

References gui::list::column, layoutpass, and MAXCOLUMNS.

void gui::draw ( )
inline

References layoutpass.

static void gui::drawskin ( int  x,
int  y,
int  gapw,
int  gaph,
int  start,
int  n,
int  passes = 1,
const vec light = vec(1, 1, 1),
float  alpha = 0.80f 
)
inlinestatic
void gui::end ( )
inlineoverridevirtual
char* gui::field ( const char *  name,
int  color,
int  length,
int  height,
const char *  initval,
int  initmode 
)
inlineoverridevirtual

Implements g3d_gui.

References FIELDEDIT.

char* gui::field_ ( const char *  name,
int  color,
int  length,
int  height,
const char *  initval,
int  initmode,
int  fieldtype = FIELDEDIT 
)
inline
void gui::icon_ ( Texture t,
bool  overlaid,
int  x,
int  y,
int  size,
bool  hit 
)
inline
int gui::image ( Texture t,
float  scale,
bool  overlaid 
)
inlineoverridevirtual

Implements g3d_gui.

References FONTH, and SHADOW.

bool gui::ishit ( int  w,
int  h,
int  x = curx,
int  y = cury 
)
inline

References windowhit.

bool gui::ishorizontal ( ) const
inline
bool gui::isvertical ( ) const
inline
char* gui::keyfield ( const char *  name,
int  color,
int  length,
int  height,
const char *  initval,
int  initmode 
)
inlineoverridevirtual

Implements g3d_gui.

References FIELDKEY.

int gui::layout ( int  w,
int  h 
)
inline
void gui::line_ ( int  size,
float  percent = 1.0f 
)
inline
bool gui::mergehits ( bool  on)
inlineoverridevirtual

Implements g3d_gui.

int gui::modelpreview ( const char *  name,
int  anim,
float  sizescale,
bool  overlaid 
)
inlineoverridevirtual
int gui::playerpreview ( int  model,
int  team,
int  weap,
float  sizescale,
bool  overlaid 
)
inlineoverridevirtual
void gui::poplist ( )
inlineoverridevirtual
int gui::prefabpreview ( const char *  prefab,
const vec color,
float  sizescale,
bool  overlaid 
)
inlineoverridevirtual
void gui::previewslot ( VSlot vslot,
bool  overlaid,
int  x,
int  y,
int  size,
bool  hit 
)
inline
void gui::progress ( float  percent)
inlineoverridevirtual

Implements g3d_gui.

References FONTH.

void gui::pushlist ( )
inlineoverridevirtual
void gui::rect_ ( float  x,
float  y,
float  w,
float  h,
bool  lines = false 
)
inline

References gle::begin(), gle::end(), and xtraverts.

void gui::rect_ ( float  x,
float  y,
float  w,
float  h,
int  usetc 
)
inline
static void gui::reset ( )
inlinestatic

Referenced by g3d_render().

void gui::separator ( )
inlineoverridevirtual

Implements g3d_gui.

References FONTH.

bool gui::shouldtab ( )
inlineoverridevirtual

Reimplemented from g3d_gui.

References FONTH, and layoutpass.

void gui::slider ( int &  val,
int  vmin,
int  vmax,
int  color,
const char *  label 
)
inlineoverridevirtual

Implements g3d_gui.

References actionon, FONTH, game::hit(), intstr(), and text_width().

void gui::space ( float  size)
inlineoverridevirtual

Implements g3d_gui.

References FONTH, and FONTW.

void gui::spring ( int  weight)
inlineoverridevirtual
void gui::start ( int  starttime,
float  initscale,
int *  tab,
bool  allowinput 
)
inlineoverridevirtual
void gui::strut ( float  size)
inlineoverridevirtual

Implements g3d_gui.

References FONTH, and FONTW.

void gui::tab ( const char *  name,
int  color 
)
inlineoverridevirtual
int return g3d_gui::text ( str  ,
color  ,
icon   
)
inherited
int gui::text ( const char *  text,
int  color,
const char *  icon 
)
inlineoverridevirtual

Implements g3d_gui.

void gui::text_ ( const char *  text,
int  x,
int  y,
int  color,
bool  shadow,
bool  force = false 
)
inline

References draw_text(), and SHADOW.

void gui::textbox ( const char *  text,
int  width,
int  height,
int  color 
)
inlineoverridevirtual

Implements g3d_gui.

References draw_text(), FONTH, FONTW, and text_bounds().

int g3d_gui::textf ( const char *  fmt,
int  color,
const char *  icon = nullptr,
  ... 
)
inherited
int gui::texture ( VSlot vslot,
float  scale,
bool  overlaid 
)
inlineoverridevirtual

Implements g3d_gui.

References FONTH, and SHADOW.

int return g3d_gui::title ( str  ,
color  ,
icon   
)
inherited
int gui::title ( const char *  text,
int  color,
const char *  icon 
)
inlineoverridevirtual

Implements g3d_gui.

int g3d_gui::titlef ( const char *  fmt,
int  color,
const char *  icon = nullptr,
  ... 
)
inherited

Referenced by game::renderscoreboard().

bool gui::visible ( )
inline

References layoutpass.

Member Data Documentation

float gui::alpha
static
float gui::basescale
static
g3d_callback* gui::cb

Referenced by g3d_addgui().

int gui::columns[MAXCOLUMNS]
int gui::curdepth
static
int gui::curlist
static
int gui::curx
static
int gui::cury
static
float gui::dist

Referenced by g3d_addgui(), and g3d_sort().

int gui::firstlist
bool gui::gui2d

Referenced by g3d_addgui(), g3d_key(), and g3d_windowhit().

float gui::hitx
static

Referenced by g3d_windowhit().

float gui::hity
static

Referenced by g3d_windowhit().

vec gui::light
static
vector< gui::list > gui::lists
static
float gui::maxscale = 1
static

Referenced by g3d_limitscale().

int gui::nextlist
vec gui::origin

Referenced by g3d_addgui().

Texture * gui::overlaytex = nullptr
static
bool gui::passthrough
static
const gui::patch gui::patches
static
vec * gui::savedorigin

Referenced by g3d_addgui(), and g3d_key().

vec gui::scale
bool gui::shouldautotab = true
static
bool gui::shouldmergehits = false
static
Texture * gui::skintex = nullptr
static
const int gui::skinx = {0, 11, 23, 37, 105, 119, 137, 151, 215, 229, 246, 256}
static

Referenced by consolebox().

const int gui::skiny = {0, 7, 21, 34, 43, 48, 56, 104, 111, 117, 128}
static

Referenced by consolebox().

Texture * gui::slidertex = nullptr
static
int gui::tcolor
static
int * gui::tcurrent
static
int gui::tpos
static
int gui::tx
static
int gui::ty
static
int gui::xsize
static
int gui::ysize
static

The documentation for this struct was generated from the following file: