summaryrefslogtreecommitdiff
path: root/doc/classes/TouchScreenButton.xml
blob: 975cef99771c90896dbc17e5eefb60dc61385521 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<?xml version="1.0" encoding="UTF-8" ?>
<class name="TouchScreenButton" inherits="Node2D" category="Core" version="3.0-beta">
	<brief_description>
		Button for touch screen devices.
	</brief_description>
	<description>
		Button for touch screen devices. You can set it to be visible on all screens, or only on touch devices.
	</description>
	<tutorials>
	</tutorials>
	<demos>
	</demos>
	<methods>
		<method name="get_action" qualifiers="const">
			<return type="String">
			</return>
			<description>
				Returns the button's action.
			</description>
		</method>
		<method name="get_bitmask" qualifiers="const">
			<return type="BitMap">
			</return>
			<description>
				Returns the button's bitmask.
			</description>
		</method>
		<method name="get_shape" qualifiers="const">
			<return type="Shape2D">
			</return>
			<description>
				Returns the button's shape.
			</description>
		</method>
		<method name="get_texture" qualifiers="const">
			<return type="Texture">
			</return>
			<description>
				Returns the button's texture for the normal state.
			</description>
		</method>
		<method name="get_texture_pressed" qualifiers="const">
			<return type="Texture">
			</return>
			<description>
				Returns the button's texture for the pressed state.
			</description>
		</method>
		<method name="get_visibility_mode" qualifiers="const">
			<return type="int" enum="TouchScreenButton.VisibilityMode">
			</return>
			<description>
				Sets the button's visibility mode. See [code]VISIBILITY_*[/code] constants.
			</description>
		</method>
		<method name="is_passby_press_enabled" qualifiers="const">
			<return type="bool">
			</return>
			<description>
			</description>
		</method>
		<method name="is_pressed" qualifiers="const">
			<return type="bool">
			</return>
			<description>
				Returns [code]true[/code] if this button is currently pressed.
			</description>
		</method>
		<method name="is_shape_centered" qualifiers="const">
			<return type="bool">
			</return>
			<description>
			</description>
		</method>
		<method name="is_shape_visible" qualifiers="const">
			<return type="bool">
			</return>
			<description>
			</description>
		</method>
		<method name="set_action">
			<return type="void">
			</return>
			<argument index="0" name="action" type="String">
			</argument>
			<description>
				Sets the button's action.
			</description>
		</method>
		<method name="set_bitmask">
			<return type="void">
			</return>
			<argument index="0" name="bitmask" type="BitMap">
			</argument>
			<description>
				Sets the button's [BitMap] bitmask.
			</description>
		</method>
		<method name="set_passby_press">
			<return type="void">
			</return>
			<argument index="0" name="enabled" type="bool">
			</argument>
			<description>
				If [code]true[/code] passby presses are enabled for this button.
			</description>
		</method>
		<method name="set_shape">
			<return type="void">
			</return>
			<argument index="0" name="shape" type="Shape2D">
			</argument>
			<description>
				Sets the button's shape.
			</description>
		</method>
		<method name="set_shape_centered">
			<return type="void">
			</return>
			<argument index="0" name="bool" type="bool">
			</argument>
			<description>
				If [code]true[/code] the button's shape is centered.
			</description>
		</method>
		<method name="set_shape_visible">
			<return type="void">
			</return>
			<argument index="0" name="bool" type="bool">
			</argument>
			<description>
				If [code]true[/code] the button's shape is visible.
			</description>
		</method>
		<method name="set_texture">
			<return type="void">
			</return>
			<argument index="0" name="texture" type="Texture">
			</argument>
			<description>
				Sets the button's [Texture] for the normal state.
			</description>
		</method>
		<method name="set_texture_pressed">
			<return type="void">
			</return>
			<argument index="0" name="texture_pressed" type="Texture">
			</argument>
			<description>
				Sets the button's [Texture] for the pressed state.
			</description>
		</method>
		<method name="set_visibility_mode">
			<return type="void">
			</return>
			<argument index="0" name="mode" type="int" enum="TouchScreenButton.VisibilityMode">
			</argument>
			<description>
				Sets the button's visibility mode. See the [code]VISIBILITY_*[/code] constants.
			</description>
		</method>
	</methods>
	<members>
		<member name="action" type="String" setter="set_action" getter="get_action">
			The button's action. Actions can be handled with [InputEventAction].
		</member>
		<member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask">
			The button's bitmask.
		</member>
		<member name="normal" type="Texture" setter="set_texture" getter="get_texture">
			The button's texture for the normal state.
		</member>
		<member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled">
			If [code]true[/code] passby presses are enabled.
		</member>
		<member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed">
			The button's texture for the pressed state.
		</member>
		<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
			The button's shape.
		</member>
		<member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered">
			If [code]true[/code] the button's shape is centered.
		</member>
		<member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible">
			If [code]true[/code] the button's shape is visible.
		</member>
		<member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode">
			The button's visibility mode. See [code]VISIBILITY_*[/code] constants.
		</member>
	</members>
	<signals>
		<signal name="pressed">
			<description>
				Emitted when the button is pressed (down).
			</description>
		</signal>
		<signal name="released">
			<description>
				Emitted when the button is released (up).
			</description>
		</signal>
	</signals>
	<constants>
		<constant name="VISIBILITY_ALWAYS" value="0">
			Always visible.
		</constant>
		<constant name="VISIBILITY_TOUCHSCREEN_ONLY" value="1">
			Visible on touch screens only.
		</constant>
	</constants>
</class>