Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/client/ui/node/ui_node_spinner.c b/src/client/ui/node/ui_node_s
- index d67ba5a..2148cfa 100644
- --- a/src/client/ui/node/ui_node_spinner.c
- +++ b/src/client/ui/node/ui_node_spinner.c
- @@ -43,8 +43,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021
- static const uiBehaviour_t const *localBehaviour;
- static const int TILE_SIZE = 32;
- -static const int SPINNER_WIDTH = 15;
- -static const int SPINNER_HEIGHT = 19;
- +static int SPINNER_WIDTH = 15;
- +static int SPINNER_HEIGHT = 19;
- static const int BUTTON_TOP_SIZE = 9;
- static const int BUTTON_BOTTOM_SIZE = 10;
- @@ -182,6 +182,13 @@ static void UI_SpinnerNodeDraw (uiNode_t *node)
- UI_GetNodeAbsPos(node, pos);
- + if (EXTRADATACONST(node).width) {
- + SPINNER_WIDTH = EXTRADATACONST(node).width;
- + }
- + if (EXTRADATACONST(node).height) {
- + SPINNER_HEIGHT = EXTRADATACONST(node).height;
- + }
- +
- if (disabled || delta == 0) {
- topTexX = TILE_SIZE;
- topTexY = TILE_SIZE;
- @@ -247,6 +254,14 @@ static const value_t properties[] = {
- * @brief Defines a factor that is applied to the delta value when the s
- */
- {"shiftincreasefactor", V_FLOAT, UI_EXTRADATA_OFFSETOF(spinnerExtraData_
- + /**
- + * Width of the spinner
- + */
- + {"width", V_FLOAT, UI_EXTRADATA_OFFSETOF(spinnerExtraData_t, width), MEM
- + /**
- + * Height of the spinner
- + */
- + {"height", V_FLOAT, UI_EXTRADATA_OFFSETOF(spinnerExtraData_t, height), M
- {NULL, V_NULL, 0, 0}
- };
- diff --git a/src/client/ui/node/ui_node_spinner.h b/src/client/ui/node/ui_node_s
- index b4500a4..c808a5f 100644
- --- a/src/client/ui/node/ui_node_spinner.h
- +++ b/src/client/ui/node/ui_node_spinner.h
- @@ -31,6 +31,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021
- typedef struct spinnerExtraData_s {
- abstractValueExtraData_t super;
- float shiftIncreaseFactor;
- + float width; /**< Optional width of the button */
- + float height; /**< Optional height of the button */
- } spinnerExtraData_t;
- void UI_RegisterSpinnerNode(uiBehaviour_t *behaviour);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement