UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
ui_node_checkbox.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 2002-2025 UFO: Alien Invasion.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17
See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23
*/
24
25
#pragma once
26
27
#include "
ui_node_abstractvalue.h
"
28
29
class
uiCheckBoxNode
:
public
uiAbstractValueNode
{
30
public
:
31
void
draw
(
uiNode_t
* node)
override
;
32
void
onLoading
(
uiNode_t
* node)
override
;
33
void
onLeftClick
(
uiNode_t
* node,
int
x,
int
y)
override
;
34
void
onActivate
(
uiNode_t
* node)
override
;
35
void
toggle
(
uiNode_t
* node);
36
};
37
38
struct
checkboxExtraData_t
{
39
abstractValueExtraData_t
super
;
40
42
uiSprite_t
*
iconChecked
;
44
uiSprite_t
*
iconUnchecked
;
46
uiSprite_t
*
iconUnknown
;
48
uiSprite_t
*
background
;
49
};
50
51
void
UI_RegisterCheckBoxNode
(
uiBehaviour_t
* behaviour);
52
void
UI_CheckBox_SetBackgroundByName
(
uiNode_t
* node,
const
char
*
name
);
53
void
UI_CheckBox_SetIconCheckedByName
(
uiNode_t
* node,
const
char
*
name
);
54
void
UI_CheckBox_SetIconUncheckedByName
(
uiNode_t
* node,
const
char
*
name
);
55
void
UI_CheckBox_SetIconUnknownByName
(
uiNode_t
* node,
const
char
*
name
);
56
void
UI_CheckBox_Toggle
(
uiNode_t
* node);
57
58
bool
UI_CheckBox_ValueAsBoolean
(
uiNode_t
* node);
59
int
UI_CheckBox_ValueAsInteger
(
uiNode_t
* node);
uiAbstractValueNode
Definition
ui_node_abstractvalue.h:29
uiCheckBoxNode
Definition
ui_node_checkbox.h:29
uiCheckBoxNode::onActivate
void onActivate(uiNode_t *node) override
Activate the node. Can be used without the mouse (ie. a button will execute onClick).
Definition
ui_node_checkbox.cpp:91
uiCheckBoxNode::toggle
void toggle(uiNode_t *node)
Definition
ui_node_checkbox.cpp:96
uiCheckBoxNode::onLeftClick
void onLeftClick(uiNode_t *node, int x, int y) override
Handles checkboxes clicks.
Definition
ui_node_checkbox.cpp:116
uiCheckBoxNode::draw
void draw(uiNode_t *node) override
Definition
ui_node_checkbox.cpp:53
uiCheckBoxNode::onLoading
void onLoading(uiNode_t *node) override
Handled before the begin of the load of the node from the script.
Definition
ui_node_checkbox.cpp:134
name
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition
r_gl.h:110
abstractValueExtraData_t
extradata for common GUI widget which allow to edit a value (scrollbar, spinner, and more)
Definition
ui_node_abstractvalue.h:61
checkboxExtraData_t
Definition
ui_node_checkbox.h:38
checkboxExtraData_t::iconChecked
uiSprite_t * iconChecked
Definition
ui_node_checkbox.h:42
checkboxExtraData_t::background
uiSprite_t * background
Definition
ui_node_checkbox.h:48
checkboxExtraData_t::super
abstractValueExtraData_t super
Definition
ui_node_checkbox.h:39
checkboxExtraData_t::iconUnknown
uiSprite_t * iconUnknown
Definition
ui_node_checkbox.h:46
checkboxExtraData_t::iconUnchecked
uiSprite_t * iconUnchecked
Definition
ui_node_checkbox.h:44
uiBehaviour_t
node behaviour, how a node work
Definition
ui_behaviour.h:39
uiNode_t
Atomic structure used to define most of the UI.
Definition
ui_nodes.h:80
uiSprite_t
Definition
ui_sprite.h:41
ui_node_abstractvalue.h
Define common thing for GUI controls which allow to edit a value (scroolbar, spinner,...
UI_CheckBox_ValueAsInteger
int UI_CheckBox_ValueAsInteger(uiNode_t *node)
Definition
ui_node_checkbox.cpp:170
UI_CheckBox_Toggle
void UI_CheckBox_Toggle(uiNode_t *node)
Definition
ui_node_checkbox.cpp:155
UI_RegisterCheckBoxNode
void UI_RegisterCheckBoxNode(uiBehaviour_t *behaviour)
Definition
ui_node_checkbox.cpp:175
UI_CheckBox_SetIconUnknownByName
void UI_CheckBox_SetIconUnknownByName(uiNode_t *node, const char *name)
Definition
ui_node_checkbox.cpp:160
UI_CheckBox_SetIconCheckedByName
void UI_CheckBox_SetIconCheckedByName(uiNode_t *node, const char *name)
Definition
ui_node_checkbox.cpp:145
UI_CheckBox_ValueAsBoolean
bool UI_CheckBox_ValueAsBoolean(uiNode_t *node)
Definition
ui_node_checkbox.cpp:165
UI_CheckBox_SetBackgroundByName
void UI_CheckBox_SetBackgroundByName(uiNode_t *node, const char *name)
Definition
ui_node_checkbox.cpp:140
UI_CheckBox_SetIconUncheckedByName
void UI_CheckBox_SetIconUncheckedByName(uiNode_t *node, const char *name)
Definition
ui_node_checkbox.cpp:150
src
client
ui
node
ui_node_checkbox.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0