ui_node_custombutton.c File Reference

Custombutton is a button using a skin with a fixed size. We can define every pixels into the texture. It can't be bigger than 256x64, because each row of 64 pixels are used for the button status (normal, hovered, disabled, and the last is not used). More...

#include "../ui_main.h"
#include "../ui_icon.h"
#include "../ui_parse.h"
#include "../ui_font.h"
#include "../ui_input.h"
#include "../ui_render.h"
#include "ui_node_custombutton.h"
#include "ui_node_button.h"
#include "ui_node_abstractnode.h"
Include dependency graph for ui_node_custombutton.c:

Go to the source code of this file.

Defines

#define UI_CUSTOMBUTTON_TEX_HEIGHT   64
#define UI_CUSTOMBUTTON_TEX_WIDTH   256
#define EXTRADATA_TYPE   customButtonExtraData_t
#define EXTRADATA(node)   UI_EXTRADATA(node, EXTRADATA_TYPE)
#define EXTRADATACONST(node)   UI_EXTRADATACONST(node, EXTRADATA_TYPE)

Functions

static void UI_CustomButtonNodeDraw (uiNode_t *node)
 Handles CustomButton draw.
void UI_RegisterCustomButtonNode (uiBehaviour_t *behaviour)

Variables

static const value_t properties []

Detailed Description

Custombutton is a button using a skin with a fixed size. We can define every pixels into the texture. It can't be bigger than 256x64, because each row of 64 pixels are used for the button status (normal, hovered, disabled, and the last is not used).

 // the button use all the size allowed
 custombutton button_load
 {
    pos "780 130"
    size    "128 64"
    click   { cmd "echo click;" }
    image   ui/multi_buttons2
    font    f_menubig
    color   "0 0.5 0 1"
    selectcolor "1 1 1 1"
    string  "_Load"
 }

Definition in file ui_node_custombutton.c.


Define Documentation

#define EXTRADATA ( node   )     UI_EXTRADATA(node, EXTRADATA_TYPE)

Definition at line 57 of file ui_node_custombutton.c.

#define EXTRADATA_TYPE   customButtonExtraData_t

Definition at line 56 of file ui_node_custombutton.c.

#define EXTRADATACONST ( node   )     UI_EXTRADATACONST(node, EXTRADATA_TYPE)

Definition at line 58 of file ui_node_custombutton.c.

#define UI_CUSTOMBUTTON_TEX_HEIGHT   64

Definition at line 53 of file ui_node_custombutton.c.

Referenced by UI_CustomButtonNodeDraw().

#define UI_CUSTOMBUTTON_TEX_WIDTH   256

Definition at line 54 of file ui_node_custombutton.c.


Function Documentation

static void UI_CustomButtonNodeDraw ( uiNode_t node  )  [static]
void UI_RegisterCustomButtonNode ( uiBehaviour_t behaviour  ) 

Variable Documentation

const value_t properties[] [static]
Initial value:

Definition at line 113 of file ui_node_custombutton.c.


Generated by  doxygen 1.6.2