Initial commit
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Normalize EOL for all files that Git considers text files.
|
||||||
|
* text=auto eol=lf
|
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Godot 4+ specific ignores
|
||||||
|
.godot/
|
BIN
DemoCharacter.vs
Normal file
121
LICENSE
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
Creative Commons Legal Code
|
||||||
|
|
||||||
|
CC0 1.0 Universal
|
||||||
|
|
||||||
|
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||||
|
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||||
|
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||||
|
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||||
|
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||||
|
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||||
|
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||||
|
HEREUNDER.
|
||||||
|
|
||||||
|
Statement of Purpose
|
||||||
|
|
||||||
|
The laws of most jurisdictions throughout the world automatically confer
|
||||||
|
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||||
|
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||||
|
authorship and/or a database (each, a "Work").
|
||||||
|
|
||||||
|
Certain owners wish to permanently relinquish those rights to a Work for
|
||||||
|
the purpose of contributing to a commons of creative, cultural and
|
||||||
|
scientific works ("Commons") that the public can reliably and without fear
|
||||||
|
of later claims of infringement build upon, modify, incorporate in other
|
||||||
|
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||||
|
and for any purposes, including without limitation commercial purposes.
|
||||||
|
These owners may contribute to the Commons to promote the ideal of a free
|
||||||
|
culture and the further production of creative, cultural and scientific
|
||||||
|
works, or to gain reputation or greater distribution for their Work in
|
||||||
|
part through the use and efforts of others.
|
||||||
|
|
||||||
|
For these and/or other purposes and motivations, and without any
|
||||||
|
expectation of additional consideration or compensation, the person
|
||||||
|
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||||
|
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||||
|
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||||
|
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||||
|
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||||
|
|
||||||
|
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||||
|
protected by copyright and related or neighboring rights ("Copyright and
|
||||||
|
Related Rights"). Copyright and Related Rights include, but are not
|
||||||
|
limited to, the following:
|
||||||
|
|
||||||
|
i. the right to reproduce, adapt, distribute, perform, display,
|
||||||
|
communicate, and translate a Work;
|
||||||
|
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||||
|
iii. publicity and privacy rights pertaining to a person's image or
|
||||||
|
likeness depicted in a Work;
|
||||||
|
iv. rights protecting against unfair competition in regards to a Work,
|
||||||
|
subject to the limitations in paragraph 4(a), below;
|
||||||
|
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||||
|
in a Work;
|
||||||
|
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||||
|
European Parliament and of the Council of 11 March 1996 on the legal
|
||||||
|
protection of databases, and under any national implementation
|
||||||
|
thereof, including any amended or successor version of such
|
||||||
|
directive); and
|
||||||
|
vii. other similar, equivalent or corresponding rights throughout the
|
||||||
|
world based on applicable law or treaty, and any national
|
||||||
|
implementations thereof.
|
||||||
|
|
||||||
|
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||||
|
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||||
|
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||||
|
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||||
|
of action, whether now known or unknown (including existing as well as
|
||||||
|
future claims and causes of action), in the Work (i) in all territories
|
||||||
|
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||||
|
treaty (including future time extensions), (iii) in any current or future
|
||||||
|
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||||
|
including without limitation commercial, advertising or promotional
|
||||||
|
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||||
|
member of the public at large and to the detriment of Affirmer's heirs and
|
||||||
|
successors, fully intending that such Waiver shall not be subject to
|
||||||
|
revocation, rescission, cancellation, termination, or any other legal or
|
||||||
|
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||||
|
as contemplated by Affirmer's express Statement of Purpose.
|
||||||
|
|
||||||
|
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||||
|
be judged legally invalid or ineffective under applicable law, then the
|
||||||
|
Waiver shall be preserved to the maximum extent permitted taking into
|
||||||
|
account Affirmer's express Statement of Purpose. In addition, to the
|
||||||
|
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||||
|
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||||
|
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||||
|
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||||
|
maximum duration provided by applicable law or treaty (including future
|
||||||
|
time extensions), (iii) in any current or future medium and for any number
|
||||||
|
of copies, and (iv) for any purpose whatsoever, including without
|
||||||
|
limitation commercial, advertising or promotional purposes (the
|
||||||
|
"License"). The License shall be deemed effective as of the date CC0 was
|
||||||
|
applied by Affirmer to the Work. Should any part of the License for any
|
||||||
|
reason be judged legally invalid or ineffective under applicable law, such
|
||||||
|
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||||
|
of the License, and in such case Affirmer hereby affirms that he or she
|
||||||
|
will not (i) exercise any of his or her remaining Copyright and Related
|
||||||
|
Rights in the Work or (ii) assert any associated claims and causes of
|
||||||
|
action with respect to the Work, in either case contrary to Affirmer's
|
||||||
|
express Statement of Purpose.
|
||||||
|
|
||||||
|
4. Limitations and Disclaimers.
|
||||||
|
|
||||||
|
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||||
|
surrendered, licensed or otherwise affected by this document.
|
||||||
|
b. Affirmer offers the Work as-is and makes no representations or
|
||||||
|
warranties of any kind concerning the Work, express, implied,
|
||||||
|
statutory or otherwise, including without limitation warranties of
|
||||||
|
title, merchantability, fitness for a particular purpose, non
|
||||||
|
infringement, or the absence of latent or other defects, accuracy, or
|
||||||
|
the present or absence of errors, whether or not discoverable, all to
|
||||||
|
the greatest extent permissible under applicable law.
|
||||||
|
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||||
|
that may apply to the Work or any use thereof, including without
|
||||||
|
limitation any person's Copyright and Related Rights in the Work.
|
||||||
|
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||||
|
consents, permissions or other rights required for any use of the
|
||||||
|
Work.
|
||||||
|
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||||
|
party to this document and has no duty or obligation with respect to
|
||||||
|
this CC0 or use of the Work.
|
2
README.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# G4-Ultimate-Touch-Joypad
|
||||||
|
The ultimate touch joypad for Godot 4.
|
BIN
icon.png
Normal file
After Width: | Height: | Size: 68 KiB |
33
icon.png.import
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://ft0lm6qk8r3y"
|
||||||
|
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://icon.png"
|
||||||
|
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
22
main.tscn
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
[gd_scene load_steps=5 format=3 uid="uid://cegfpgpwmw6nv"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://3ww56gmi7h66" path="res://touch_dpad.tscn" id="1_ufq36"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://ft0lm6qk8r3y" path="res://icon.png" id="2_hnn2g"]
|
||||||
|
[ext_resource type="Script" uid="uid://rkv4inxw8sb1" path="res://DemoCharacter.vs" id="3_bjq6u"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://gwjoq3vcqsni" path="res://touch_buttons.tscn" id="4_8homj"]
|
||||||
|
|
||||||
|
[node name="Main" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="TouchDPad" parent="." instance=ExtResource( "1_ufq36" )]
|
||||||
|
|
||||||
|
[node name="TouchButtons" parent="." instance=ExtResource( "4_8homj" )]
|
||||||
|
offset_left = 618.0
|
||||||
|
offset_top = 264.0
|
||||||
|
offset_right = 1018.0
|
||||||
|
offset_bottom = 564.0
|
||||||
|
|
||||||
|
[node name="DemoCharacter" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(493, 268)
|
||||||
|
scale = Vector2(0.15, 0.15)
|
||||||
|
texture = ExtResource( "2_hnn2g" )
|
||||||
|
script = ExtResource( "3_bjq6u" )
|
26
project.godot
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
; Engine configuration file.
|
||||||
|
; It's best edited using the editor UI and not directly,
|
||||||
|
; since the parameters that go here are not all obvious.
|
||||||
|
;
|
||||||
|
; Format:
|
||||||
|
; [section] ; section goes between []
|
||||||
|
; param=value ; assign values to parameters
|
||||||
|
|
||||||
|
config_version=5
|
||||||
|
|
||||||
|
[application]
|
||||||
|
|
||||||
|
config/name="G4 Ultimate Touch Joypad"
|
||||||
|
run/main_scene="res://main.tscn"
|
||||||
|
config/icon="res://icon.png"
|
||||||
|
config/features=PackedStringArray("4.0", "Vulkan Clustered")
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/borderless=true
|
||||||
|
window/size/fullscreen=true
|
||||||
|
window/stretch/mode="canvas_items"
|
||||||
|
|
||||||
|
[input_devices]
|
||||||
|
|
||||||
|
pointing/emulate_touch_from_mouse=true
|
82
touch_buttons.tscn
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
[gd_scene load_steps=6 format=3 uid="uid://gwjoq3vcqsni"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://cgjvcle4674g" path="res://touch_control_materials/touch_buttons.vs" id="1_bxvxe"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cja0xaweyls40" path="res://touch_control_materials/plus_button.png" id="1_pw8hk"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://crqssu0d25i6p" path="res://touch_control_materials/plus_button_active.png" id="2_3ybbg"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c4i6oqp466jj1" path="res://touch_control_materials/minus_button.png" id="3_5l21p"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://1x7xepsv8gd7" path="res://touch_control_materials/minus_button_active.png" id="4_ffsku"]
|
||||||
|
|
||||||
|
[node name="TouchButtons" type="BaseButton"]
|
||||||
|
_import_path = NodePath("")
|
||||||
|
process_mode = 0
|
||||||
|
process_priority = 0
|
||||||
|
editor_description = ""
|
||||||
|
visible = true
|
||||||
|
modulate = Color(1, 1, 1, 1)
|
||||||
|
self_modulate = Color(1, 1, 1, 1)
|
||||||
|
show_behind_parent = false
|
||||||
|
top_level = false
|
||||||
|
clip_children = false
|
||||||
|
light_mask = 1
|
||||||
|
texture_filter = 0
|
||||||
|
texture_repeat = 0
|
||||||
|
material = null
|
||||||
|
use_parent_material = false
|
||||||
|
clip_contents = false
|
||||||
|
minimum_size = Vector2(0, 0)
|
||||||
|
layout_direction = 0
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = -400.0
|
||||||
|
offset_top = -300.0
|
||||||
|
offset_right = 0.0
|
||||||
|
offset_bottom = 0.0
|
||||||
|
grow_horizontal = 1
|
||||||
|
grow_vertical = 1
|
||||||
|
rotation = 0.0
|
||||||
|
scale = Vector2(1, 1)
|
||||||
|
pivot_offset = Vector2(0, 0)
|
||||||
|
size_flags_horizontal = 1
|
||||||
|
size_flags_vertical = 1
|
||||||
|
size_flags_stretch_ratio = 1.0
|
||||||
|
auto_translate = true
|
||||||
|
hint_tooltip = ""
|
||||||
|
focus_neighbor_left = NodePath("")
|
||||||
|
focus_neighbor_top = NodePath("")
|
||||||
|
focus_neighbor_right = NodePath("")
|
||||||
|
focus_neighbor_bottom = NodePath("")
|
||||||
|
focus_next = NodePath("")
|
||||||
|
focus_previous = NodePath("")
|
||||||
|
focus_mode = 2
|
||||||
|
mouse_filter = 0
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
theme = null
|
||||||
|
theme_type_variation = &""
|
||||||
|
disabled = false
|
||||||
|
toggle_mode = false
|
||||||
|
shortcut_in_tooltip = true
|
||||||
|
button_pressed = false
|
||||||
|
action_mode = 1
|
||||||
|
button_mask = 1
|
||||||
|
keep_pressed_outside = false
|
||||||
|
shortcut = null
|
||||||
|
button_group = null
|
||||||
|
shortcut_context = null
|
||||||
|
script = ExtResource( "1_bxvxe" )
|
||||||
|
|
||||||
|
[node name="plus" type="TouchScreenButton" parent="."]
|
||||||
|
position = Vector2(220, 120)
|
||||||
|
scale = Vector2(0.15, 0.15)
|
||||||
|
texture_normal = ExtResource( "1_pw8hk" )
|
||||||
|
texture_pressed = ExtResource( "2_3ybbg" )
|
||||||
|
|
||||||
|
[node name="minus" type="TouchScreenButton" parent="."]
|
||||||
|
position = Vector2(70, 119)
|
||||||
|
scale = Vector2(0.15, 0.15)
|
||||||
|
texture_normal = ExtResource( "3_5l21p" )
|
||||||
|
texture_pressed = ExtResource( "4_ffsku" )
|
||||||
|
|
||||||
|
[connection signal="pressed" from="plus" to="." method="_on_plus_pressed"]
|
||||||
|
[connection signal="pressed" from="minus" to="." method="_on_minus_pressed"]
|
BIN
touch_control_materials/AnalogDirectionalStick.vs
Normal file
BIN
touch_control_materials/analog_directional_circle.png
Normal file
After Width: | Height: | Size: 28 KiB |
33
touch_control_materials/analog_directional_circle.png.import
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://djjmor6xgy5uu"
|
||||||
|
path="res://.godot/imported/analog_directional_circle.png-9afd673abb8c1aecb4a2089160210ff1.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://touch_control_materials/analog_directional_circle.png"
|
||||||
|
dest_files=["res://.godot/imported/analog_directional_circle.png-9afd673abb8c1aecb4a2089160210ff1.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
BIN
touch_control_materials/analog_directional_stick_active.png
Normal file
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,33 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://d37msfk7y370n"
|
||||||
|
path="res://.godot/imported/analog_directional_stick_active.png-7da854c9a85ce399acb2db6db81d19cd.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://touch_control_materials/analog_directional_stick_active.png"
|
||||||
|
dest_files=["res://.godot/imported/analog_directional_stick_active.png-7da854c9a85ce399acb2db6db81d19cd.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
BIN
touch_control_materials/analog_directional_stick_inactive.png
Normal file
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,33 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://e8x57phqorru"
|
||||||
|
path="res://.godot/imported/analog_directional_stick_inactive.png-ce8366f764ea389967b0bd01e81209a3.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://touch_control_materials/analog_directional_stick_inactive.png"
|
||||||
|
dest_files=["res://.godot/imported/analog_directional_stick_inactive.png-ce8366f764ea389967b0bd01e81209a3.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
BIN
touch_control_materials/minus_button.png
Normal file
After Width: | Height: | Size: 18 KiB |
33
touch_control_materials/minus_button.png.import
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c4i6oqp466jj1"
|
||||||
|
path="res://.godot/imported/minus_button.png-dc3370b2ab2457b2dbb7ef2de28affbf.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://touch_control_materials/minus_button.png"
|
||||||
|
dest_files=["res://.godot/imported/minus_button.png-dc3370b2ab2457b2dbb7ef2de28affbf.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
BIN
touch_control_materials/minus_button_active.png
Normal file
After Width: | Height: | Size: 18 KiB |
33
touch_control_materials/minus_button_active.png.import
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://1x7xepsv8gd7"
|
||||||
|
path="res://.godot/imported/minus_button_active.png-8744b1358b7a5c155715704614536905.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://touch_control_materials/minus_button_active.png"
|
||||||
|
dest_files=["res://.godot/imported/minus_button_active.png-8744b1358b7a5c155715704614536905.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
BIN
touch_control_materials/plus_button.png
Normal file
After Width: | Height: | Size: 18 KiB |
33
touch_control_materials/plus_button.png.import
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cja0xaweyls40"
|
||||||
|
path="res://.godot/imported/plus_button.png-66c0c91267bf4dda90f7b6efdc7c84f2.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://touch_control_materials/plus_button.png"
|
||||||
|
dest_files=["res://.godot/imported/plus_button.png-66c0c91267bf4dda90f7b6efdc7c84f2.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
BIN
touch_control_materials/plus_button_active.png
Normal file
After Width: | Height: | Size: 18 KiB |
33
touch_control_materials/plus_button_active.png.import
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://crqssu0d25i6p"
|
||||||
|
path="res://.godot/imported/plus_button_active.png-e15890255c901f24c181fa8a77edc88f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://touch_control_materials/plus_button_active.png"
|
||||||
|
dest_files=["res://.godot/imported/plus_button_active.png-e15890255c901f24c181fa8a77edc88f.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
BIN
touch_control_materials/touch_buttons.vs
Normal file
86
touch_dpad.tscn
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
[gd_scene load_steps=6 format=3 uid="uid://3ww56gmi7h66"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://djjmor6xgy5uu" path="res://touch_control_materials/analog_directional_circle.png" id="1_dd88t"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://e8x57phqorru" path="res://touch_control_materials/analog_directional_stick_inactive.png" id="2_sg7hl"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d37msfk7y370n" path="res://touch_control_materials/analog_directional_stick_active.png" id="3_hgws5"]
|
||||||
|
[ext_resource type="Script" uid="uid://bihh8ym1dbjay" path="res://touch_control_materials/AnalogDirectionalStick.vs" id="4_mm8hm"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_kawjc"]
|
||||||
|
radius = 150.0
|
||||||
|
|
||||||
|
[node name="TouchDPad" type="BaseButton"]
|
||||||
|
_import_path = NodePath("")
|
||||||
|
process_mode = 0
|
||||||
|
process_priority = 0
|
||||||
|
editor_description = ""
|
||||||
|
visible = true
|
||||||
|
modulate = Color(1, 1, 1, 1)
|
||||||
|
self_modulate = Color(1, 1, 1, 1)
|
||||||
|
show_behind_parent = false
|
||||||
|
top_level = false
|
||||||
|
clip_children = false
|
||||||
|
light_mask = 1
|
||||||
|
texture_filter = 0
|
||||||
|
texture_repeat = 0
|
||||||
|
material = null
|
||||||
|
use_parent_material = false
|
||||||
|
clip_contents = false
|
||||||
|
minimum_size = Vector2(0, 0)
|
||||||
|
layout_direction = 0
|
||||||
|
anchor_left = 0.0
|
||||||
|
anchor_top = 0.0
|
||||||
|
anchor_right = 0.0
|
||||||
|
anchor_bottom = 0.0
|
||||||
|
offset_left = 0.0
|
||||||
|
offset_top = 280.0
|
||||||
|
offset_right = 400.0
|
||||||
|
offset_bottom = 600.0
|
||||||
|
grow_horizontal = 1
|
||||||
|
grow_vertical = 0
|
||||||
|
rotation = 0.0
|
||||||
|
scale = Vector2(1, 1)
|
||||||
|
pivot_offset = Vector2(0, 0)
|
||||||
|
size_flags_horizontal = 1
|
||||||
|
size_flags_vertical = 1
|
||||||
|
size_flags_stretch_ratio = 1.0
|
||||||
|
auto_translate = true
|
||||||
|
hint_tooltip = ""
|
||||||
|
focus_neighbor_left = NodePath("")
|
||||||
|
focus_neighbor_top = NodePath("")
|
||||||
|
focus_neighbor_right = NodePath("")
|
||||||
|
focus_neighbor_bottom = NodePath("")
|
||||||
|
focus_next = NodePath("")
|
||||||
|
focus_previous = NodePath("")
|
||||||
|
focus_mode = 2
|
||||||
|
mouse_filter = 0
|
||||||
|
mouse_default_cursor_shape = 0
|
||||||
|
theme = null
|
||||||
|
theme_type_variation = &""
|
||||||
|
disabled = false
|
||||||
|
toggle_mode = false
|
||||||
|
shortcut_in_tooltip = true
|
||||||
|
button_pressed = false
|
||||||
|
action_mode = 1
|
||||||
|
button_mask = 1
|
||||||
|
keep_pressed_outside = false
|
||||||
|
shortcut = null
|
||||||
|
button_group = null
|
||||||
|
shortcut_context = null
|
||||||
|
script = null
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_custom_anchors": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="AnalogDirectionalCircle" type="Sprite2D" parent="."]
|
||||||
|
position = Vector2(190, 160)
|
||||||
|
scale = Vector2(0.25, 0.25)
|
||||||
|
texture = ExtResource( "1_dd88t" )
|
||||||
|
|
||||||
|
[node name="AnalogDirectionalStickInactive" type="TouchScreenButton" parent="AnalogDirectionalCircle"]
|
||||||
|
texture_normal = ExtResource( "2_sg7hl" )
|
||||||
|
texture_pressed = ExtResource( "3_hgws5" )
|
||||||
|
shape = SubResource( "CircleShape2D_kawjc" )
|
||||||
|
script = ExtResource( "4_mm8hm" )
|
||||||
|
|
||||||
|
[connection signal="button_down" from="." to="AnalogDirectionalCircle/AnalogDirectionalStickInactive" method="_on_touch_d_pad_button_down"]
|
||||||
|
[connection signal="button_up" from="." to="AnalogDirectionalCircle/AnalogDirectionalStickInactive" method="_on_touch_d_pad_button_up"]
|