2017-09-12 20:42:36 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2020-02-01 01:03:48 +00:00
|
|
|
<class name="TouchScreenButton" inherits="Node2D" version="4.0">
|
2017-09-12 20:42:36 +00:00
|
|
|
<brief_description>
|
2017-10-10 21:31:04 +00:00
|
|
|
Button for touch screen devices.
|
2017-09-12 20:42:36 +00:00
|
|
|
</brief_description>
|
|
|
|
<description>
|
2017-10-10 21:31:04 +00:00
|
|
|
Button for touch screen devices. You can set it to be visible on all screens, or only on touch devices.
|
2017-09-12 20:42:36 +00:00
|
|
|
</description>
|
|
|
|
<tutorials>
|
|
|
|
</tutorials>
|
|
|
|
<methods>
|
|
|
|
<method name="is_pressed" qualifiers="const">
|
|
|
|
<return type="bool">
|
|
|
|
</return>
|
|
|
|
<description>
|
2017-10-10 21:31:04 +00:00
|
|
|
Returns [code]true[/code] if this button is currently pressed.
|
2017-09-12 20:42:36 +00:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
</methods>
|
|
|
|
<members>
|
2019-06-29 10:38:01 +00:00
|
|
|
<member name="action" type="String" setter="set_action" getter="get_action" default="""">
|
2017-10-10 21:31:04 +00:00
|
|
|
The button's action. Actions can be handled with [InputEventAction].
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2019-07-15 18:42:47 +00:00
|
|
|
<member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask">
|
2017-10-10 21:31:04 +00:00
|
|
|
The button's bitmask.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2020-02-12 08:59:06 +00:00
|
|
|
<member name="normal" type="Texture2D" setter="set_texture" getter="get_texture">
|
2017-10-10 21:31:04 +00:00
|
|
|
The button's texture for the normal state.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2019-06-29 10:38:01 +00:00
|
|
|
<member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" default="false">
|
2019-06-21 23:04:47 +00:00
|
|
|
If [code]true[/code], pass-by presses are enabled.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2020-02-12 08:59:06 +00:00
|
|
|
<member name="pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed">
|
2017-10-10 21:31:04 +00:00
|
|
|
The button's texture for the pressed state.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2019-07-15 18:42:47 +00:00
|
|
|
<member name="shape" type="Shape2D" setter="set_shape" getter="get_shape">
|
2017-10-10 21:31:04 +00:00
|
|
|
The button's shape.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2019-06-29 10:38:01 +00:00
|
|
|
<member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered" default="true">
|
2019-11-08 10:02:22 +00:00
|
|
|
If [code]true[/code], the button's shape is centered in the provided texture. If no texture is used, this property has no effect.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2019-06-29 10:38:01 +00:00
|
|
|
<member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible" default="true">
|
2018-12-20 12:46:54 +00:00
|
|
|
If [code]true[/code], the button's shape is visible.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
2019-06-29 10:38:01 +00:00
|
|
|
<member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode" default="0">
|
2019-06-21 23:04:47 +00:00
|
|
|
The button's visibility mode. See [enum VisibilityMode] for possible values.
|
2017-09-12 20:42:36 +00:00
|
|
|
</member>
|
|
|
|
</members>
|
|
|
|
<signals>
|
|
|
|
<signal name="pressed">
|
|
|
|
<description>
|
2017-10-10 21:31:04 +00:00
|
|
|
Emitted when the button is pressed (down).
|
2017-09-12 20:42:36 +00:00
|
|
|
</description>
|
|
|
|
</signal>
|
|
|
|
<signal name="released">
|
|
|
|
<description>
|
2017-10-10 21:31:04 +00:00
|
|
|
Emitted when the button is released (up).
|
2017-09-12 20:42:36 +00:00
|
|
|
</description>
|
|
|
|
</signal>
|
|
|
|
</signals>
|
|
|
|
<constants>
|
2017-11-24 22:16:30 +00:00
|
|
|
<constant name="VISIBILITY_ALWAYS" value="0" enum="VisibilityMode">
|
2017-10-10 21:31:04 +00:00
|
|
|
Always visible.
|
2017-09-15 23:46:14 +00:00
|
|
|
</constant>
|
2017-11-24 22:16:30 +00:00
|
|
|
<constant name="VISIBILITY_TOUCHSCREEN_ONLY" value="1" enum="VisibilityMode">
|
2017-10-10 21:31:04 +00:00
|
|
|
Visible on touch screens only.
|
2017-09-15 23:46:14 +00:00
|
|
|
</constant>
|
2017-09-12 20:42:36 +00:00
|
|
|
</constants>
|
|
|
|
</class>
|