36#define EXTRADATA_TYPE tbarExtraData_t
37#define EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE)
38#define EXTRADATACONST(node) UI_EXTRADATACONST(node, EXTRADATA_TYPE)
40#define TEXTURE_WIDTH 250.0
61 const float min =
getMin(node);
62 const float max =
getMax(node);
69 ps = (value - min) / (max - min) * 100;
71 shx += round(ps * pointWidth);
87 behaviour->
name =
"tbar";
88 behaviour->
extends =
"abstractvalue";
float getValue(uiNode_t const *node)
float getMax(uiNode_t const *node)
float getMin(uiNode_t const *node)
void draw(uiNode_t *node) override
#define Mem_PoolStrDup(in, pool, tagNum)
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Header for lua script functions.
bool Q_strnull(const char *string)
node behaviour, how a node work
Atomic structure used to define most of the UI.
void UI_FreeStringProperty(void *pointer)
Free a string property if it is allocated into ui_dynStringPool.
#define UI_RegisterExtradataNodeProperty(BEHAVIOUR, NAME, TYPE, EXTRADATATYPE, ATTRIBUTE)
Initialize a property from extradata of node.
void * UI_SWIG_TypeQuery(const char *name)
This function queries the SWIG type table for a type information structure. It is used in combination...
void UI_GetNodeAbsPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node.
SharedPtr< uiNode > UINodePtr
Define common thing for GUI controls which allow to edit a value (scroolbar, spinner,...
memPool_t * ui_dynStringPool
void UI_RegisterTBarNode(uiBehaviour_t *behaviour)
void UI_TBar_SetImage(uiNode_t *node, const char *name)
const char * UI_GetReferenceString(const uiNode_t *const node, const char *ref)
const image_t * UI_DrawNormImageByName(bool flip, float x, float y, float w, float h, float sh, float th, float sl, float tl, const char *name)
Draws an image or parts of it.