UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_node_abstractvalue.h
Go to the documentation of this file.
1
6
7/*
8Copyright (C) 2002-2025 UFO: Alien Invasion.
9
10This program is free software; you can redistribute it and/or
11modify it under the terms of the GNU General Public License
12as published by the Free Software Foundation; either version 2
13of the License, or (at your option) any later version.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19See the GNU General Public License for more details.
20
21You should have received a copy of the GNU General Public License
22along with this program; if not, write to the Free Software
23Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
25*/
26
27#pragma once
28
30public:
31 void onLoaded(uiNode_t* node) override;
32 void onLoading(uiNode_t* node) override;
33 void clone(uiNode_t const* source, uiNode_t* clone) override;
34 void initNode(uiNode_t* node) override;
35 void initNodeDynamic(uiNode_t* node) override;
36 void deleteNode(uiNode_t* node) override;
37
38 void setRange(uiNode_t* node, float min, float max);
39 bool setValue(uiNode_t* node, float value);
40 bool setDelta(uiNode_t* node, float delta);
41 bool setMax(uiNode_t* node, float max);
42 bool setMin(uiNode_t* node, float min);
43 bool incValue(uiNode_t* node);
44 bool decValue(uiNode_t* node);
45
46 float getFactorFloat(uiNode_t const* node);
47 float getMin(uiNode_t const* node);
48 float getMax(uiNode_t const* node);
49 float getDelta(uiNode_t const* node);
50 float getValue(uiNode_t const* node);
51 float getLastDiff (uiNode_t const* node);
52 float getShiftIncreaseFactor (uiNode_t* const node);
53};
54
61typedef struct abstractValueExtraData_s {
62 void* min;
63 void* max;
64 void* value;
65 void* delta;
66 float lastdiff;
69
70struct uiBehaviour_t; /* prototype */
71
73
80
83
84void UI_AbstractValue_SetRange (uiNode_t* node, float min, float max);
85void UI_AbstractValue_SetMin (uiNode_t* node, float min);
86void UI_AbstractValue_SetMax (uiNode_t* node, float max);
87void UI_AbstractValue_SetValue (uiNode_t* node, float value);
88void UI_AbstractValue_SetDelta (uiNode_t* node, float delta);
89
90void UI_AbstractValue_SetRangeCvar (uiNode_t* node, const char* min, const char* max);
91void UI_AbstractValue_SetMinCvar (uiNode_t* node, const char* min);
92void UI_AbstractValue_SetMaxCvar (uiNode_t* node, const char* max);
93void UI_AbstractValue_SetValueCvar (uiNode_t* node, const char* value);
94void UI_AbstractValue_SetShiftIncreaseFactor (uiNode_t* node, float factor);
bool setDelta(uiNode_t *node, float delta)
void onLoaded(uiNode_t *node) override
bool setMin(uiNode_t *node, float min)
bool setMax(uiNode_t *node, float max)
void initNode(uiNode_t *node) override
float getValue(uiNode_t const *node)
void onLoading(uiNode_t *node) override
float getShiftIncreaseFactor(uiNode_t *const node)
bool setValue(uiNode_t *node, float value)
float getLastDiff(uiNode_t const *node)
bool decValue(uiNode_t *node)
bool incValue(uiNode_t *node)
void deleteNode(uiNode_t *node) override
float getDelta(uiNode_t const *node)
void initNodeDynamic(uiNode_t *node) override
float getFactorFloat(uiNode_t const *node)
float getMax(uiNode_t const *node)
float getMin(uiNode_t const *node)
void clone(uiNode_t const *source, uiNode_t *clone) override
Call to update a cloned node.
void setRange(uiNode_t *node, float min, float max)
extradata for common GUI widget which allow to edit a value (scrollbar, spinner, and more)
node behaviour, how a node work
Atomic structure used to define most of the UI.
Definition ui_nodes.h:80
void UI_AbstractValue_SetMin(uiNode_t *node, float min)
void UI_AbstractValue_SetValueCvar(uiNode_t *node, const char *value)
float UI_AbstractValue_GetLastDiff(uiNode_t *node)
void UI_AbstractValue_SetRange(uiNode_t *node, float min, float max)
float UI_AbstractValue_GetDelta(uiNode_t *node)
void UI_AbstractValue_SetRangeCvar(uiNode_t *node, const char *min, const char *max)
void UI_AbstractValue_SetMaxCvar(uiNode_t *node, const char *max)
void UI_AbstractValue_DecValue(uiNode_t *node)
float UI_AbstractValue_GetMin(uiNode_t *node)
float UI_AbstractValue_GetValue(uiNode_t *node)
void UI_AbstractValue_SetShiftIncreaseFactor(uiNode_t *node, float factor)
void UI_AbstractValue_SetMax(uiNode_t *node, float max)
void UI_AbstractValue_IncValue(uiNode_t *node)
void UI_AbstractValue_SetValue(uiNode_t *node, float value)
float UI_AbstractValue_GetMax(uiNode_t *node)
void UI_AbstractValue_SetMinCvar(uiNode_t *node, const char *min)
float UI_AbstractValue_GetShiftIncreaseFactor(uiNode_t *node)
void UI_RegisterAbstractValueNode(uiBehaviour_t *behaviour)
void UI_AbstractValue_SetDelta(uiNode_t *node, float delta)