added text input, started adding label button
This commit is contained in:
1 parent
6c38b05832
commit
2e31012447
27 files changed
+163
-19
No files matched your search
@@ -1,7 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://icaxptclt0rm"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dwbx108724v25" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Bases.Button3D.gd" id="1_1du0n"]
|
||||
[ext_resource type="Script" uid="uid://cbexo34ybb17a" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Bases.Button3D.Collider.gd" id="2_xjbij"]
|
||||
[ext_resource type="Script" uid="uid://dwbx108724v25" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Root/AGUI.Bases.Button3D.gd" id="1_1du0n"]
|
||||
[ext_resource type="Script" uid="uid://cbexo34ybb17a" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Collider/AGUI.Bases.Button3D.Collider.gd" id="2_xjbij"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xeeyd"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://bcm2gnlwsvvd3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://3m5f4lxd2x3c" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.CharacterButton3D.gd" id="1_glpbs"]
|
||||
[ext_resource type="Script" uid="uid://dbv4hr2h4cfug" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.CharacterButton3D.Collider.gd" id="2_708ma"]
|
||||
[ext_resource type="Script" uid="uid://3m5f4lxd2x3c" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Root/AGUI.CharacterButton3D.gd" id="1_4h73y"]
|
||||
[ext_resource type="Script" uid="uid://dbv4hr2h4cfug" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Collider/AGUI.CharacterButton3D.Collider.gd" id="2_wcsv0"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xeeyd"]
|
||||
|
||||
@@ -33,7 +33,7 @@ _data = {
|
||||
}
|
||||
|
||||
[node name="AGUIIconButton3D" type="Node3D" unique_id=81597797]
|
||||
script = ExtResource("1_glpbs")
|
||||
script = ExtResource("1_4h73y")
|
||||
baseColor = Color(0.52195215, 0.08105264, 0.9999997, 1)
|
||||
pressedColor = Color(0.3094211, 0.50286317, 1, 1)
|
||||
char = "?"
|
||||
@@ -41,7 +41,7 @@ char = "?"
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=1473098479]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
script = ExtResource("2_708ma")
|
||||
script = ExtResource("2_wcsv0")
|
||||
|
||||
[node name="Collider" type="CollisionShape3D" parent="StaticBody3D" unique_id=335334790]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.011110017, 0, 0, 0, 1, 0, 0, 0)
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://f4tj743a8ym3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dkmw6hfq1nkrk" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.IconButton3D.gd" id="1_rhqs2"]
|
||||
[ext_resource type="Script" uid="uid://crq0dvryyehig" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.IconButton3D.Collider.gd" id="2_e4tim"]
|
||||
[ext_resource type="Texture2D" uid="uid://lu0kocwkk08d" path="res://assets/inquire.svg" id="3_rhqs2"]
|
||||
[ext_resource type="Script" uid="uid://dkmw6hfq1nkrk" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Root/AGUI.IconButton3D.gd" id="1_0vm27"]
|
||||
[ext_resource type="Script" uid="uid://crq0dvryyehig" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Collider/AGUI.IconButton3D.Collider.gd" id="2_ldfx3"]
|
||||
[ext_resource type="Texture2D" uid="uid://lu0kocwkk08d" path="res://assets/inquire.svg" id="3_8k0il"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xeeyd"]
|
||||
|
||||
@@ -34,12 +34,12 @@ _data = {
|
||||
}
|
||||
|
||||
[node name="AGUIIconButton3D" type="Node3D" unique_id=81597797]
|
||||
script = ExtResource("1_rhqs2")
|
||||
script = ExtResource("1_0vm27")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=1473098479]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
script = ExtResource("2_e4tim")
|
||||
script = ExtResource("2_ldfx3")
|
||||
|
||||
[node name="Collider" type="CollisionShape3D" parent="StaticBody3D" unique_id=335334790]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.011110017, 0, 0, 0, 1, 0, 0, 0)
|
||||
@@ -66,4 +66,4 @@ libraries/ = SubResource("AnimationLibrary_7pntp")
|
||||
[node name="Sprite3D" type="Sprite3D" parent="StaticBody3D" unique_id=1459504000]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, 1, 0, -1, -4.371139e-08, 0, 0.014697313, 0)
|
||||
pixel_size = 0.001
|
||||
texture = ExtResource("3_rhqs2")
|
||||
texture = ExtResource("3_8k0il")
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene format=3 uid="uid://bigr5fyb4o6pr"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d0up8mkp431mn" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.ToggleCharacterButton3D.gd" id="1_i1u37"]
|
||||
[ext_resource type="Script" uid="uid://dfdsr0t25d4ha" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.ToggleCharacterButton3D.Collider.gd" id="2_i1u37"]
|
||||
[ext_resource type="Script" uid="uid://d0up8mkp431mn" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Root/AGUI.ToggleCharacterButton3D.gd" id="1_yh8o1"]
|
||||
[ext_resource type="Script" uid="uid://dfdsr0t25d4ha" path="res://AgainstGravityUI/AGUI.Scripts/AGUI.Collider/AGUI.ToggleCharacterButton3D.Collider.gd" id="2_runkp"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xeeyd"]
|
||||
|
||||
@@ -33,12 +33,12 @@ _data = {
|
||||
}
|
||||
|
||||
[node name="AGUIIconButton3D" type="Node3D" unique_id=81597797]
|
||||
script = ExtResource("1_i1u37")
|
||||
script = ExtResource("1_yh8o1")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=1473098479]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
script = ExtResource("2_i1u37")
|
||||
script = ExtResource("2_runkp")
|
||||
|
||||
[node name="Collider" type="CollisionShape3D" parent="StaticBody3D" unique_id=335334790]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.011110017, 0, 0, 0, 1, 0, 0, 0)
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://cmjkjm6xol5kq" path="res://AgainstGravityUI/AGUI.Panels/AGUIKeyboard.gd" id="1_53dpa"]
|
||||
[ext_resource type="Script" uid="uid://bghaddibpt6f1" path="res://addons/crt/crt.gd" id="1_lvoud"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcm2gnlwsvvd3" path="res://AgainstGravityUI/AGUI.CharacterButton3D.tscn" id="2_igafl"]
|
||||
[ext_resource type="PackedScene" uid="uid://bigr5fyb4o6pr" path="res://AgainstGravityUI/AGUI.ToggleCharacterButton3D.tscn" id="4_2q8pl"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcm2gnlwsvvd3" path="res://AgainstGravityUI/AGUI.Buttons/AGUI.CharacterButton3D.tscn" id="2_igafl"]
|
||||
[ext_resource type="PackedScene" uid="uid://bigr5fyb4o6pr" path="res://AgainstGravityUI/AGUI.Buttons/AGUI.ToggleCharacterButton3D.tscn" id="4_2q8pl"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_igafl"]
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,35 @@
|
||||
@tool
|
||||
extends StaticBody3D
|
||||
|
||||
var baseColor : Color
|
||||
var pressedColor : Color
|
||||
@onready var Animator = $Animator
|
||||
var pressed : bool = false
|
||||
var ButtonMaterial : StandardMaterial3D = StandardMaterial3D.new()
|
||||
|
||||
func _initButton(BaseColor:Color,PressedColor:Color):
|
||||
baseColor=BaseColor
|
||||
pressedColor=PressedColor
|
||||
ButtonMaterial.albedo_color = BaseColor
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
$MeshRoot.material_override = ButtonMaterial
|
||||
ButtonMaterial.albedo_color = baseColor
|
||||
Animator.get_animation("interact").loop_mode = Animation.LOOP_NONE
|
||||
|
||||
func press():
|
||||
if !pressed:
|
||||
$"..".buttonPressed.emit()
|
||||
$"..".buttonUpdated.emit()
|
||||
Animator.play("interact")
|
||||
ButtonMaterial.albedo_color = pressedColor
|
||||
pressed=true
|
||||
|
||||
func release():
|
||||
if pressed:
|
||||
$"..".buttonReleased.emit()
|
||||
$"..".buttonUpdated.emit()
|
||||
Animator.play_backwards("interact")
|
||||
ButtonMaterial.albedo_color = baseColor
|
||||
pressed=false
|
||||
@@ -0,0 +1 @@
|
||||
uid://thynii4x8c6v
|
||||
@@ -0,0 +1,88 @@
|
||||
[gd_scene format=3 uid="uid://5b3mm6x4dkcc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://nfi6xrly38aw" path="res://AgainstGravityUI/AGUI.StackedUI/agui.text_input.gd" id="1_qfj7f"]
|
||||
[ext_resource type="Script" uid="uid://thynii4x8c6v" path="res://AgainstGravityUI/AGUI.StackedUI/AGUI.TextInput.Collider.gd" id="2_qfj7f"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xeeyd"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1du0n"]
|
||||
length = 0.001
|
||||
tracks/0/type = "position_3d"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("StaticBody3D/MeshRoot")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_xjbij"]
|
||||
resource_name = "interact"
|
||||
length = 0.1
|
||||
tracks/0/type = "position_3d"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("StaticBody3D/MeshRoot")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = PackedFloat32Array(0, 1, 0, 0, 0, 0.03333334, 1, 0, -0.05, 0)
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7pntp"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_1du0n"),
|
||||
&"interact": SubResource("Animation_xjbij")
|
||||
}
|
||||
|
||||
[node name="AGUITextInput3D" type="Node3D" unique_id=81597797]
|
||||
script = ExtResource("1_qfj7f")
|
||||
baseColor = Color(0.20579061, 0.44805384, 1, 1)
|
||||
pressedColor = Color(0, 0.5334508, 0.8641794, 1)
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=1473098479]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
script = ExtResource("2_qfj7f")
|
||||
|
||||
[node name="Collider" type="CollisionShape3D" parent="StaticBody3D" unique_id=335334790]
|
||||
transform = Transform3D(7.8185873, 0, 0, 0, 0.37179297, 0, 0, 0, 1, 0, 0, 0)
|
||||
shape = SubResource("BoxShape3D_xeeyd")
|
||||
|
||||
[node name="MeshRoot" type="CSGCombiner3D" parent="StaticBody3D" unique_id=1112723183]
|
||||
transform = Transform3D(7.8185873, 0, 0, 0, 0.024529457, 0, 0, 0, 1, 0, 0, 0)
|
||||
operation = 2
|
||||
|
||||
[node name="MainMesh" type="CSGBox3D" parent="StaticBody3D/MeshRoot" unique_id=1438018078]
|
||||
|
||||
[node name="Subtractor_Box" type="CSGBox3D" parent="StaticBody3D/MeshRoot/MainMesh" unique_id=842962794]
|
||||
operation = 2
|
||||
|
||||
[node name="Subtractor_Cylinder" type="CSGCylinder3D" parent="StaticBody3D/MeshRoot/MainMesh/Subtractor_Box" unique_id=1951089581]
|
||||
transform = Transform3D(0.9, 0, 0, 0, 0.9, 0, 0, 0, 0.9, 0, 0, 0)
|
||||
operation = 2
|
||||
radius = 0.734
|
||||
|
||||
[node name="Animator" type="AnimationPlayer" parent="StaticBody3D" unique_id=53081295]
|
||||
root_node = NodePath("../..")
|
||||
libraries/ = SubResource("AnimationLibrary_7pntp")
|
||||
|
||||
[node name="MeshRoot2" type="CSGCombiner3D" parent="StaticBody3D" unique_id=1127109007]
|
||||
transform = Transform3D(7.122161, 0, 0, 0, 0.024529457, 0, 0, 0, 0.73947906, 0, 0.037864685, 0)
|
||||
operation = 2
|
||||
|
||||
[node name="MainMesh" type="CSGBox3D" parent="StaticBody3D/MeshRoot2" unique_id=916935335]
|
||||
|
||||
[node name="Subtractor_Box" type="CSGBox3D" parent="StaticBody3D/MeshRoot2/MainMesh" unique_id=59198445]
|
||||
operation = 2
|
||||
|
||||
[node name="Subtractor_Cylinder" type="CSGCylinder3D" parent="StaticBody3D/MeshRoot2/MainMesh/Subtractor_Box" unique_id=459666208]
|
||||
transform = Transform3D(0.9, 0, 0, 0, 0.9, 0, 0, 0, 0.9, 0, 0, 0)
|
||||
operation = 2
|
||||
radius = 0.734
|
||||
|
||||
[node name="Label3D" type="Label3D" parent="StaticBody3D" unique_id=442460324]
|
||||
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, 1, 0, -1, -4.371139e-08, -3.547236, 0.06489611, 0)
|
||||
pixel_size = 0.01
|
||||
modulate = Color(0, 0, 0, 1)
|
||||
outline_modulate = Color(1, 1, 1, 1)
|
||||
text = "Label"
|
||||
outline_size = 0
|
||||
horizontal_alignment = 0
|
||||
@@ -0,0 +1,19 @@
|
||||
@tool
|
||||
extends Node3D
|
||||
|
||||
signal buttonPressed
|
||||
signal buttonReleased
|
||||
signal buttonUpdated
|
||||
|
||||
@export_category("Visuals")
|
||||
@export var baseColor : Color
|
||||
@export var pressedColor : Color
|
||||
@export var text : String
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
$StaticBody3D/Label3D.text = text
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$StaticBody3D._initButton(baseColor,pressedColor)
|
||||
print(baseColor,pressedColor)
|
||||
@@ -0,0 +1 @@
|
||||
uid://nfi6xrly38aw
|
||||
@@ -2,7 +2,7 @@ extends Node
|
||||
|
||||
var GUIScreens : Dictionary = {
|
||||
"Main": load("res://Player/AGUI.WatchPanels/AGUI.Watch.Main.tscn"),
|
||||
"Settings": load("res://Player/AGUI.WatchPanels/AGUI.Watch.Settings.tscn")
|
||||
"Login": load("res://Player/AGUI.WatchPanels/AGUI.Watch.Login.tscn")
|
||||
}
|
||||
var CurrentScreen : String = ""
|
||||
|
||||
|
||||
Reference in new issue
Block a user