From 376bbc9d892d925189704435782b8d31a9ccf28d Mon Sep 17 00:00:00 2001 From: Lean Mendoza Date: Thu, 13 Jul 2023 12:12:38 -0300 Subject: [PATCH] feat: fixes and improvements (read info) (#26) * fix: min-floor-step fix: multi tooltips feat: prettier tooltip feat: add fade when panels change feat: add some particles to walk fix: typo in actions (3,4,5,6) feat: prepare global config script (and advance settings) chore: disable CI build for PRs feat: add text command (/goto or /go) * fix: map shader and popup window * fix clippy --- .github/workflows/ci.yml | 2 +- ....png-cf999ebe1471a8a24d149682e664ab61.ctex | Bin 13116 -> 0 bytes godot/assets/test_player/player.gd | 47 ++++- godot/assets/test_player/player.tscn | 77 ++++++- godot/project.godot | 18 +- godot/src/global.gd | 58 ++++++ godot/src/logic/content_manager.gd | 2 +- .../advance_settings/advance_settings.gd | 62 ++++++ .../advance_settings/advance_settings.tscn | 192 ++++++++++++++++++ godot/src/ui/components/map/map.gd | 31 +-- godot/src/ui/components/map/map.tscn | 9 +- .../src/ui/components/map_shader/map_data.png | Bin 22866 -> 0 bytes .../components/map_shader/map_data.png.import | 34 ---- .../ui/components/map_shader/map_shader.gd | 34 ++-- .../ui/components/map_shader/map_shader.tscn | 21 +- .../menu/button_group_menu_tabs.tres | 4 + godot/src/ui/components/menu/menu.gd | 133 ++++++++---- godot/src/ui/components/menu/menu.tscn | 55 +++-- godot/src/ui/components/panel_bottom_left.gd | 2 +- .../pointer_tooltip/pointer_tooltip.gd | 25 +++ .../pointer_tooltip/pointer_tooltip.tscn | 48 +++++ .../pointer_tooltip/tooltip_label.gd | 28 +++ .../pointer_tooltip/tooltip_label.tscn | 66 ++++++ .../src/ui/components/settings/settings.tscn | 59 +++++- godot/src/ui/explorer.gd | 68 +++++-- godot/src/ui/explorer.tscn | 42 +++- .../components/transform_and_parent.rs | 2 +- .../src/scene_runner/input.rs | 8 +- .../src/scene_runner/scene_manager.rs | 4 +- .../src/scene_runner/update_scene.rs | 2 +- 30 files changed, 942 insertions(+), 191 deletions(-) delete mode 100644 godot/.godot/imported/map_data.png-cf999ebe1471a8a24d149682e664ab61.ctex create mode 100644 godot/src/ui/components/advance_settings/advance_settings.gd create mode 100644 godot/src/ui/components/advance_settings/advance_settings.tscn delete mode 100644 godot/src/ui/components/map_shader/map_data.png delete mode 100644 godot/src/ui/components/map_shader/map_data.png.import create mode 100644 godot/src/ui/components/menu/button_group_menu_tabs.tres create mode 100644 godot/src/ui/components/pointer_tooltip/pointer_tooltip.gd create mode 100644 godot/src/ui/components/pointer_tooltip/pointer_tooltip.tscn create mode 100644 godot/src/ui/components/pointer_tooltip/tooltip_label.gd create mode 100644 godot/src/ui/components/pointer_tooltip/tooltip_label.tscn diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 426b167c..c6534cb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,7 +100,7 @@ jobs: build: name: Build and test - # Commented to test if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' }} strategy: matrix: os: [windows-latest, ubuntu-latest] diff --git a/godot/.godot/imported/map_data.png-cf999ebe1471a8a24d149682e664ab61.ctex b/godot/.godot/imported/map_data.png-cf999ebe1471a8a24d149682e664ab61.ctex deleted file mode 100644 index 50e278301a2df958d232ab233b6301ec63e73f2e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13116 zcmZ8{2|yE9*Y=&s0$D&35CVvVVMIW|NDAUsBMy*QR1id8Kpd(@T2K+KitDg8QG_IF zO|%P&FU37pM6{?Av976#Z55SPP(WI3Mci=zPqg2^C1jGYgu9%3&a<5Oqvu=vPH-zL_X)J$UrlY}4q7bAIO~K5xE5?;dY_ z`RIlFo68ITy8e91>w6atJe)SxXEA^Fg>H-Y;!DwU5N)?$dEEGNiv?q=PeybO+EOiG zxM3S}Cad$*rYS7VSDG!h|C%UMckdMsNyvp)|HbNc&crgg#8k#Ulm|$p0TM||`n_2L zT^bZ@nAw6hcKETm%kdV1*0%6w4a}9KNU@`4GlAo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f87cd7..e1f77c03 100644 --- a/godot/assets/test_player/player.gd +++ b/godot/assets/test_player/player.gd @@ -5,15 +5,30 @@ extends CharacterBody3D @onready var animation_player: AnimationPlayer = $PlayerVisuals/AnimationPlayer @onready var direction: Vector3 = Vector3(0, 0, 0) @onready var visuals = $PlayerVisuals +@onready var particles_move = $PlayerVisuals/GPUParticles3D_Move +@onready var particles_jump = $PlayerVisuals/GPUParticles3D_Jump +@onready var particles_land = $PlayerVisuals/GPUParticles3D_Land var first_person: bool = true var _mouse_position = Vector2(0.0, 0.0) +var captured: bool = true + +var is_on_air: bool @export var vertical_sens: float = 0.5 @export var horizontal_sens: float = 0.5 func _ready(): + camera.current = true + + if is_on_floor(): + is_on_air = false + particles_move.emitting = false + if captured: + Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) + + first_person = false var tween_out = create_tween() tween_out.tween_property(camera, "position", Vector3(0.5, 0, 4), 0.25).set_ease( Tween.EASE_IN_OUT @@ -26,15 +41,6 @@ func _ready(): floor_snap_length = 0.2 - # Fix the Idle animation - - -# var idle_anim := animation_player.get_animation("Idle") -# for i in range(idle_anim.get_track_count()): -# var original_path: NodePath = idle_anim.track_get_path(i) -# var bone_name: StringName = original_path.get_name(original_path.get_name_count() - 1) -# idle_anim.track_set_path(i, NodePath("Armature/Skeleton3D:" + bone_name)) - func _input(event): # Receives mouse motion @@ -45,10 +51,12 @@ func _input(event): mount_camera.rotate_x(deg_to_rad(-_mouse_position.y) * vertical_sens) if first_person: mount_camera.rotation.x = clamp( - mount_camera.rotation.x, deg_to_rad(-60), deg_to_rad(60) + mount_camera.rotation.x, deg_to_rad(-60), deg_to_rad(90) ) else: - mount_camera.rotation.x = clamp(mount_camera.rotation.x, deg_to_rad(-60), deg_to_rad(5)) + mount_camera.rotation.x = clamp( + mount_camera.rotation.x, deg_to_rad(-70), deg_to_rad(45) + ) # Release mouse if event is InputEventKey: @@ -87,15 +95,31 @@ func _physics_process(delta: float) -> void: var input_dir := Input.get_vector("ia_left", "ia_right", "ia_forward", "ia_backward") direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized() + if is_on_floor(): + if not is_on_floor() == is_on_air: + particles_jump.emitting = true + is_on_air = is_on_floor() + else: + if not is_on_floor() == is_on_air: + particles_land.emitting = true + is_on_air = is_on_floor() + if not is_on_floor(): + particles_move.emitting = false if Input.is_action_pressed("double_gravity"): velocity.y -= GRAVITY * delta * .5 else: velocity.y -= GRAVITY * delta + elif Input.is_action_just_pressed("ia_jump"): velocity.y = JUMP_VELOCITY_0 if direction: + if is_on_floor(): + particles_move.emitting = true + else: + particles_move.emitting = false + if Input.is_action_pressed("ia_walk"): if animation_player.current_animation != "Walk": animation_player.play("Walk") @@ -111,6 +135,7 @@ func _physics_process(delta: float) -> void: visuals.look_at(direction + position) else: + particles_move.emitting = false if animation_player.current_animation != "Idle": animation_player.play("Idle") velocity.x = move_toward(velocity.x, 0, WALK_SPEED) diff --git a/godot/assets/test_player/player.tscn b/godot/assets/test_player/player.tscn index 8055e23b..51d3a217 100644 --- a/godot/assets/test_player/player.tscn +++ b/godot/assets/test_player/player.tscn @@ -1,19 +1,57 @@ -[gd_scene load_steps=4 format=3 uid="uid://blv7r5folt1d5"] +[gd_scene load_steps=10 format=3 uid="uid://blv7r5folt1d5"] [ext_resource type="Script" path="res://assets/test_player/player.gd" id="1_5bfm2"] [ext_resource type="PackedScene" uid="uid://n0dpindtmshg" path="res://assets/test_player/player_visuals.tscn" id="2_0hdg3"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_pxti1"] +margin = 0.05 radius = 0.25 +height = 1.50214 + +[sub_resource type="SeparationRayShape3D" id="SeparationRayShape3D_3217e"] +length = 1.0779 + +[sub_resource type="Curve" id="Curve_ps6qo"] +_data = [Vector2(0, 0.190909), 0.0, 0.0, 0, 0, Vector2(0.623809, 0.390909), 0.0, 0.0, 0, 0, Vector2(1, 0.0636363), 0.0, 0.0, 0, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_lroyk"] +curve = SubResource("Curve_ps6qo") + +[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_c6405"] +emission_shape = 3 +emission_box_extents = Vector3(0.1, 0, 0.1) +direction = Vector3(0, 0, 0) +spread = 90.0 +gravity = Vector3(0, 0.1, 0) +initial_velocity_max = 0.2 +radial_accel_min = 0.5 +radial_accel_max = 1.0 +damping_max = 0.85 +scale_min = 0.0 +scale_max = 1.5 +scale_curve = SubResource("CurveTexture_lroyk") + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_6htl0"] +albedo_color = Color(0.913725, 0.886275, 0.839216, 1) + +[sub_resource type="SphereMesh" id="SphereMesh_e8vgg"] +material = SubResource("StandardMaterial3D_6htl0") +radius = 0.1 +height = 0.1 [node name="Player" type="CharacterBody3D"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.11208, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1, 0) script = ExtResource("1_5bfm2") -[node name="CollisionShape3D" type="CollisionShape3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.1, 0) +[node name="CollisionShape3D_Body" type="CollisionShape3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.053255, 0) shape = SubResource("CapsuleShape3D_pxti1") +[node name="CollisionShape3D_ContactPoint" type="CollisionShape3D" parent="."] +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0) +shape = SubResource("SeparationRayShape3D_3217e") + [node name="Mount" type="Node3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.610448, 0) @@ -22,3 +60,34 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.85493e-08, 0, -0.212179) current = true [node name="PlayerVisuals" parent="." instance=ExtResource("2_0hdg3")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0441519, 0) + +[node name="GPUParticles3D_Move" type="GPUParticles3D" parent="PlayerVisuals"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.02931, -0.00253904) +amount = 2 +lifetime = 0.5 +visibility_aabb = AABB(-4, -3.88281, -4, 8, 8, 8) +process_material = SubResource("ParticleProcessMaterial_c6405") +draw_pass_1 = SubResource("SphereMesh_e8vgg") + +[node name="GPUParticles3D_Jump" type="GPUParticles3D" parent="PlayerVisuals"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.02931, -0.00253904) +emitting = false +amount = 10 +lifetime = 0.5 +one_shot = true +explosiveness = 1.0 +visibility_aabb = AABB(-4, -3.88281, -4, 8, 8, 8) +process_material = SubResource("ParticleProcessMaterial_c6405") +draw_pass_1 = SubResource("SphereMesh_e8vgg") + +[node name="GPUParticles3D_Land" type="GPUParticles3D" parent="PlayerVisuals"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.02931, -0.00253904) +emitting = false +amount = 10 +lifetime = 0.5 +one_shot = true +explosiveness = 1.0 +visibility_aabb = AABB(-4, -3.88281, -4, 8, 8, 8) +process_material = SubResource("ParticleProcessMaterial_c6405") +draw_pass_1 = SubResource("SphereMesh_e8vgg") diff --git a/godot/project.godot b/godot/project.godot index 86ee9587..a9682633 100644 --- a/godot/project.godot +++ b/godot/project.godot @@ -88,22 +88,22 @@ ia_secondary={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"echo":false,"script":null) ] } -ia_action3={ +ia_action_3={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":49,"key_label":0,"unicode":49,"echo":false,"script":null) ] } -ia_action4={ +ia_action_4={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":50,"key_label":0,"unicode":50,"echo":false,"script":null) ] } -ia_action5={ +ia_action_5={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":51,"key_label":0,"unicode":51,"echo":false,"script":null) ] } -ia_action6={ +ia_action_6={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":52,"key_label":0,"unicode":52,"echo":false,"script":null) ] @@ -118,6 +118,16 @@ double_gravity={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194326,"key_label":0,"unicode":0,"echo":false,"script":null) ] } +interact={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":101,"echo":false,"script":null) +] +} +use={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":85,"key_label":0,"unicode":117,"echo":false,"script":null) +] +} [layer_names] diff --git a/godot/src/global.gd b/godot/src/global.gd index 698cfb7c..19d5e0d8 100644 --- a/godot/src/global.gd +++ b/godot/src/global.gd @@ -11,5 +11,63 @@ func add_raycast(id: int, time: float, from: Vector3, to: Vector3) -> void: raycast_debugger.add_raycast(id, time, from, to) +var config_dictionary: Dictionary = { + "gravity": 55.0, + "jump_velocity": 12.0, + "walk_velocity": 12.0, + "run_velocity": 20.0, + "process_tick_quota": 1, + "scene_radius": 1, +} + +signal config_changed + + +func _load(): + pass + + +func _save(): + emit_signal("config_changed") + pass + + +func _default(): + pass + + +func get_resolution(): + return ( + config_dictionary + . get( + "resolution", + ) + ) + + +func get_gravity(): + return config_dictionary.get("gravity", 55.0) + + +func get_jump_velocity(): + return config_dictionary.get("jump_velocity", 12.0) + + +func get_walk_velocity(): + return config_dictionary.get("walk_velocity", 12.0) + + +func get_run_velocity(): + return config_dictionary.get("run_velocity", 20.0) + + +func get_process_tick_quota(): + return config_dictionary.get("process_tick_quota", 1) + + +func get_scene_radius(): + return config_dictionary.get("scene_radius", 1) + + func get_tls_client(): return TLSOptions.client_unsafe() diff --git a/godot/src/logic/content_manager.gd b/godot/src/logic/content_manager.gd index a53e4c3e..1974d9f7 100644 --- a/godot/src/logic/content_manager.gd +++ b/godot/src/logic/content_manager.gd @@ -221,7 +221,7 @@ func process_loading_gltf(content: Dictionary, finished_downloads: Array[Request return true -func split_animations(gltf_node: Node) -> void: +func split_animations(_gltf_node: Node) -> void: pass diff --git a/godot/src/ui/components/advance_settings/advance_settings.gd b/godot/src/ui/components/advance_settings/advance_settings.gd new file mode 100644 index 00000000..7c163b1b --- /dev/null +++ b/godot/src/ui/components/advance_settings/advance_settings.gd @@ -0,0 +1,62 @@ +extends Control + +@onready +var h_slider_process_tick_quota = $VBoxContainer_General/VBoxContainer_ProcessTickQuota/HBoxContainer/HSlider_ProcessTickQuota +@onready +var label_process_tick_quota_value = $VBoxContainer_General/VBoxContainer_ProcessTickQuota/HBoxContainer/Label_ProcessTickQuotaValue +@onready +var h_slider_scene_radius = $VBoxContainer_General/VBoxContainer_SceneRadius/HBoxContainer/HSlider_SceneRadius +@onready +var label_scene_radius_value = $VBoxContainer_General/VBoxContainer_SceneRadius/HBoxContainer/Label_SceneRadiusValue +@onready +var line_edit_gravity = $VBoxContainer_General/HBoxContainer/HBoxContainer_Gravity/LineEdit_Gravity +@onready +var line_edit_jump_velocity = $VBoxContainer_General/HBoxContainer/HBoxContainer_JumpVelocity/LineEdit_JumpVelocity +@onready +var line_edit_run_speed = $VBoxContainer_General/HBoxContainer2/HBoxContainer_RunSpeed/LineEdit_RunSpeed +@onready +var line_edit_walk_speed = $VBoxContainer_General/HBoxContainer2/HBoxContainer_WalkSpeed/LineEdit_WalkSpeed + +var gravity: float +var walk_velocity: float +var run_velocity: float +var jump_velocity: float +var scene_radius: int +var process_tick_quota: int + + +func _ready(): + get_config_dictionary() + refresh_values() + + +func get_config_dictionary(): + gravity = Global.get_gravity() + walk_velocity = Global.get_walk_velocity() + run_velocity = Global.get_run_velocity() + jump_velocity = Global.get_jump_velocity() + scene_radius = Global.get_scene_radius() + process_tick_quota = Global.get_process_tick_quota() + + +func refresh_values(): + line_edit_gravity.text = str(gravity).pad_decimals(1) + line_edit_walk_speed.text = str(walk_velocity).pad_decimals(1) + line_edit_run_speed.text = str(run_velocity).pad_decimals(1) + line_edit_jump_velocity.text = str(jump_velocity).pad_decimals(1) + h_slider_process_tick_quota.set_value_no_signal(process_tick_quota) + h_slider_scene_radius.set_value_no_signal(scene_radius) + label_process_tick_quota_value.text = str(process_tick_quota) + label_scene_radius_value.text = str(scene_radius) + + +func apply_changes(): + pass + + +func _on_h_slider_process_tick_quota_value_changed(value): + label_process_tick_quota_value.text = str(value) + + +func _on_h_slider_scene_radius_value_changed(value): + label_scene_radius_value.text = str(value) diff --git a/godot/src/ui/components/advance_settings/advance_settings.tscn b/godot/src/ui/components/advance_settings/advance_settings.tscn new file mode 100644 index 00000000..626129ed --- /dev/null +++ b/godot/src/ui/components/advance_settings/advance_settings.tscn @@ -0,0 +1,192 @@ +[gd_scene load_steps=4 format=3 uid="uid://c8v1b3owo26xt"] + +[ext_resource type="Script" path="res://src/ui/components/advance_settings/advance_settings.gd" id="1_mo2dv"] + +[sub_resource type="Theme" id="Theme_fdw13"] +Label/colors/font_color = Color(0.164706, 0.164706, 0.164706, 1) + +[sub_resource type="Theme" id="Theme_o8ri3"] + +[node name="Control_AdvanceSettings" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_mo2dv") + +[node name="ColorRect_Background" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.85098, 0.843137, 0.866667, 1) + +[node name="VBoxContainer_General" type="VBoxContainer" parent="."] +layout_mode = 0 +offset_left = 120.0 +offset_top = 120.0 +offset_right = 624.0 +offset_bottom = 402.0 +theme = SubResource("Theme_fdw13") +theme_type_variation = &"2" +theme_override_constants/separation = 15 + +[node name="VBoxContainer_ProcessTickQuota" type="VBoxContainer" parent="VBoxContainer_General"] +layout_mode = 2 +size_flags_vertical = 4 +theme_override_constants/separation = 10 +alignment = 1 + +[node name="Label_ProcessTickQuota" type="Label" parent="VBoxContainer_General/VBoxContainer_ProcessTickQuota"] +layout_mode = 2 +theme = SubResource("Theme_o8ri3") +text = "Process Tick Quota" + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer_General/VBoxContainer_ProcessTickQuota"] +layout_mode = 2 + +[node name="HSlider_ProcessTickQuota" type="HSlider" parent="VBoxContainer_General/VBoxContainer_ProcessTickQuota/HBoxContainer"] +custom_minimum_size = Vector2(500, 30) +layout_mode = 2 +focus_mode = 0 +min_value = 1.0 +max_value = 16.0 +value = 1.0 + +[node name="Label_ProcessTickQuotaValue" type="Label" parent="VBoxContainer_General/VBoxContainer_ProcessTickQuota/HBoxContainer"] +custom_minimum_size = Vector2(50, 0) +layout_mode = 2 +text = "1" +horizontal_alignment = 1 + +[node name="HSeparator" type="HSeparator" parent="VBoxContainer_General"] +layout_mode = 2 + +[node name="VBoxContainer_SceneRadius" type="VBoxContainer" parent="VBoxContainer_General"] +layout_mode = 2 +size_flags_vertical = 4 +theme_override_constants/separation = 10 +alignment = 1 + +[node name="Label_SceneRadius" type="Label" parent="VBoxContainer_General/VBoxContainer_SceneRadius"] +layout_mode = 2 +theme = SubResource("Theme_o8ri3") +text = "Scene Radius" + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer_General/VBoxContainer_SceneRadius"] +layout_mode = 2 + +[node name="HSlider_SceneRadius" type="HSlider" parent="VBoxContainer_General/VBoxContainer_SceneRadius/HBoxContainer"] +custom_minimum_size = Vector2(500, 30) +layout_mode = 2 +focus_mode = 0 +min_value = 1.0 +max_value = 16.0 +value = 1.0 + +[node name="Label_SceneRadiusValue" type="Label" parent="VBoxContainer_General/VBoxContainer_SceneRadius/HBoxContainer"] +custom_minimum_size = Vector2(50, 0) +layout_mode = 2 +text = "1" +horizontal_alignment = 1 + +[node name="HSeparator2" type="HSeparator" parent="VBoxContainer_General"] +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer_General"] +layout_mode = 2 +size_flags_stretch_ratio = 0.0 + +[node name="HBoxContainer_Gravity" type="HBoxContainer" parent="VBoxContainer_General/HBoxContainer"] +custom_minimum_size = Vector2(250, 0) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_constants/separation = 10 + +[node name="Label_Gravity" type="Label" parent="VBoxContainer_General/HBoxContainer/HBoxContainer_Gravity"] +custom_minimum_size = Vector2(100, 0) +layout_mode = 2 +theme = SubResource("Theme_o8ri3") +text = "Gravity +" + +[node name="LineEdit_Gravity" type="LineEdit" parent="VBoxContainer_General/HBoxContainer/HBoxContainer_Gravity"] +layout_mode = 2 +focus_mode = 0 +text = "55.0" +editable = false + +[node name="HBoxContainer_JumpVelocity" type="HBoxContainer" parent="VBoxContainer_General/HBoxContainer"] +custom_minimum_size = Vector2(250, 0) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_constants/separation = 10 + +[node name="Label_JumpVelocity" type="Label" parent="VBoxContainer_General/HBoxContainer/HBoxContainer_JumpVelocity"] +custom_minimum_size = Vector2(100, 0) +layout_mode = 2 +theme = SubResource("Theme_o8ri3") +text = "Jump Velocity +" + +[node name="LineEdit_JumpVelocity" type="LineEdit" parent="VBoxContainer_General/HBoxContainer/HBoxContainer_JumpVelocity"] +layout_mode = 2 +focus_mode = 0 +text = "12.0" +editable = false + +[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer_General"] +layout_mode = 2 +size_flags_stretch_ratio = 0.0 + +[node name="HBoxContainer_RunSpeed" type="HBoxContainer" parent="VBoxContainer_General/HBoxContainer2"] +custom_minimum_size = Vector2(250, 0) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_constants/separation = 10 + +[node name="Label_RunSpeed" type="Label" parent="VBoxContainer_General/HBoxContainer2/HBoxContainer_RunSpeed"] +custom_minimum_size = Vector2(100, 0) +layout_mode = 2 +theme = SubResource("Theme_o8ri3") +text = "Run Speed +" + +[node name="LineEdit_RunSpeed" type="LineEdit" parent="VBoxContainer_General/HBoxContainer2/HBoxContainer_RunSpeed"] +layout_mode = 2 +focus_mode = 0 +text = "20.0" +editable = false + +[node name="HBoxContainer_WalkSpeed" type="HBoxContainer" parent="VBoxContainer_General/HBoxContainer2"] +custom_minimum_size = Vector2(250, 0) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_constants/separation = 10 + +[node name="Label_WalkSpeed" type="Label" parent="VBoxContainer_General/HBoxContainer2/HBoxContainer_WalkSpeed"] +custom_minimum_size = Vector2(100, 0) +layout_mode = 2 +theme = SubResource("Theme_o8ri3") +text = "Walk Speed" + +[node name="LineEdit_WalkSpeed" type="LineEdit" parent="VBoxContainer_General/HBoxContainer2/HBoxContainer_WalkSpeed"] +layout_mode = 2 +focus_mode = 0 +text = "12.0" +editable = false + +[node name="ColorRect_Navbar" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_bottom = 59.0 +grow_horizontal = 2 +color = Color(0.0862745, 0.0862745, 0.0862745, 1) + +[connection signal="value_changed" from="VBoxContainer_General/VBoxContainer_ProcessTickQuota/HBoxContainer/HSlider_ProcessTickQuota" to="." method="_on_h_slider_process_tick_quota_value_changed"] +[connection signal="value_changed" from="VBoxContainer_General/VBoxContainer_SceneRadius/HBoxContainer/HSlider_SceneRadius" to="." method="_on_h_slider_scene_radius_value_changed"] diff --git a/godot/src/ui/components/map/map.gd b/godot/src/ui/components/map/map.gd index 03e39d27..a33fcdad 100644 --- a/godot/src/ui/components/map/map.gd +++ b/godot/src/ui/components/map/map.gd @@ -14,17 +14,8 @@ var mouse_tile: Vector2i var last_mouse_tile: Vector2i -func _on_control_map_shader_gui_input(event): +func _gui_input(event): if event is InputEventMouseButton: - if event.button_index == MOUSE_BUTTON_LEFT: - if event.double_click: - mouse_tile = control_map_shader.get_parcel_from_mouse() - mouse_tile = Vector2i(floor(mouse_tile.x), floor(mouse_tile.y)) - parcel_to_jump = mouse_tile - control_jump_to.position = event.position - label_parcel_position.text = str(mouse_tile) - control_jump_to.show() - if not event.pressed: var zoom_value = control_map_shader.zoom_value @@ -47,13 +38,23 @@ func _on_control_map_shader_gui_input(event): func _on_button_pressed(): emit_signal("jump_to", parcel_to_jump) + control_jump_to.hide() -func _on_visibility_changed(): - #control_tooltip.show() - #control_jump_to.hide() - pass +func _on_control_map_shader_on_move(): + control_jump_to.hide() -func _on_control_map_shader_on_move(): +#function to call when menu is closed +func clear(): + control_tooltip.show() control_jump_to.hide() + + +func _on_control_map_shader_parcel_click(_parcel_position): + mouse_tile = control_map_shader.get_parcel_from_mouse() + mouse_tile = Vector2i(floor(mouse_tile.x), floor(mouse_tile.y)) + parcel_to_jump = mouse_tile + control_jump_to.position = get_global_mouse_position() + label_parcel_position.text = str(mouse_tile) + control_jump_to.show() diff --git a/godot/src/ui/components/map/map.tscn b/godot/src/ui/components/map/map.tscn index 6031d043..06327f2a 100644 --- a/godot/src/ui/components/map/map.tscn +++ b/godot/src/ui/components/map/map.tscn @@ -18,6 +18,8 @@ layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +offset_right = 0.0 +offset_bottom = 0.0 grow_horizontal = 2 grow_vertical = 2 @@ -75,6 +77,7 @@ offset_right = 31.5 offset_bottom = -24.0 grow_horizontal = 2 grow_vertical = 0 +focus_mode = 0 text = "JUMP IN" [node name="VBoxContainer" type="VBoxContainer" parent="Control_JumpTo/Panel_JumpTo"] @@ -115,11 +118,7 @@ theme_override_constants/outline_size = 0 text = "Created by: Decentraland" horizontal_alignment = 1 -[node name="Sprite2D" type="Sprite2D" parent="Control_JumpTo/Panel_JumpTo"] -position = Vector2(90, 64) -scale = Vector2(0.3, 0.3) - -[connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"] [connection signal="gui_input" from="Control_MapShader" to="." method="_on_control_map_shader_gui_input"] [connection signal="on_move" from="Control_MapShader" to="." method="_on_control_map_shader_on_move"] +[connection signal="parcel_click" from="Control_MapShader" to="." method="_on_control_map_shader_parcel_click"] [connection signal="pressed" from="Control_JumpTo/Panel_JumpTo/Button_JumpTo" to="." method="_on_button_pressed"] diff --git a/godot/src/ui/components/map_shader/map_data.png b/godot/src/ui/components/map_shader/map_data.png deleted file mode 100644 index 60ea3aa1f92eef797949012429bd3fe54944db0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22866 zcmV)=K!m@EP)PyA07*naRCt{2y={*yx0NRNl)Jn|HEbvbaIeBf16?1Ct<;Q-oBefv|8^@qLi^^m zxBI5YZa6fsM|m-JD{5u+jj|-vexT3sLmraBh>Wba%m;-+B!gry7(6_$BrkBr8IObu zpn2>zJR^JoTt0Ri&Ny8-VD;E-ct-dH_|9Xu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9Q^JF+J~QA zbXr!+*A;O*zU2cA^gcA0Ga3=ghvEPmGMaYsF8|!ndPANf2O+jxoiLmx;@h3nvq^Qx zq;Sh)an~8xkUZwGO396uJNa2WIlPjY%d+Sw_ZzLDP{}GaL$}7W;$in{VzJFeHL-U` zQP`^~dhS#;vOI#zcRdEtmXnSK%l!3vsaEmNByX&NEy!%yL+>8Q44#T*co3&K%S)Bf z=aYie=S8$HRYS6D2ViVz4#fYlk|F+<<>HF3^)gH`znfSzio=_UKnN3=W* zw1Uqzeh>*iS1^Z&qwdUfv!+8yMsbO!p)NX#_C7&qsC{zwRU!5Y_#F5gfJ6o7s?we)Qyx~8Woe=lcaEE689tD<(Z2WIC`K(oKduZA@a1Glo6~Zj_}C;nR%990iDUN|TOzKH z!^vlp)d+We*}CXb!rOu<2*V3vM`WO^Rj>Vj^;g+R+{5Z-pw$ZzaZZ|xlVK83oud`z zNJ4EqoA756$;r`4dkRk}H)HmYOYAdT4`(L4XT%}3@s;ez+V={I-{Gx-*>+eTu_8aS zk0o3KZ_Gx-7FYR|>rW6)9DChkx8&Gx!0+pF{{OYu>iIaGcqjk>002ovPDHLkV1jPk B%`gA} diff --git a/godot/src/ui/components/map_shader/map_data.png.import b/godot/src/ui/components/map_shader/map_data.png.import deleted file mode 100644 index f083014e..00000000 --- a/godot/src/ui/components/map_shader/map_data.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://b02g1pu1eepyv" -path="res://.godot/imported/map_data.png-cf999ebe1471a8a24d149682e664ab61.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://src/ui/components/map_shader/map_data.png" -dest_files=["res://.godot/imported/map_data.png-cf999ebe1471a8a24d149682e664ab61.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -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/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/godot/src/ui/components/map_shader/map_shader.gd b/godot/src/ui/components/map_shader/map_shader.gd index 59a3ae79..e12c6159 100644 --- a/godot/src/ui/components/map_shader/map_shader.gd +++ b/godot/src/ui/components/map_shader/map_shader.gd @@ -1,17 +1,17 @@ extends Control signal on_move +signal parcel_click(parcel_position: Vector2i) @onready var color_rect_map = %ColorRect_Map -@onready var sub_viewport = $SubViewportContainer_MapShader/SubViewport - @export var drag_enabled: bool = true @export var zoom_value: int = 20 # Draging variables var is_dragging = false -var _is_dragging = false +var dirty_is_dragging = false var drag_position: Vector2 +var start_dragging_position: Vector2 # The size of the map in parcels var map_parcel_size: Vector2 @@ -64,13 +64,14 @@ func read_binary_file(file_path: String) -> void: var texture = ImageTexture.create_from_image(image) color_rect_map.material.set_shader_parameter("map_data", texture) - image.save_png("res://src/ui/components/map_shader/map_data.png") + # This is not required for now (static map_data.png) + # image.save_png("res://src/ui/components/map_shader/map_data.png") func _ready(): color_rect_map.material = color_rect_map.material.duplicate() read_binary_file("res://src/ui/components/map_shader/map_data.bin") - _on_resized() +# _on_resized() set_zoom(zoom_value) set_center_position(Vector2(0, 0)) @@ -114,24 +115,28 @@ func _on_color_rect_map_gui_input(event): if event is InputEventMouseButton: if event.button_index == MOUSE_BUTTON_LEFT: if event.pressed: - _is_dragging = true - drag_position = ( - get_global_mouse_position() - color_rect_map.get_global_rect().position - ) + dirty_is_dragging = true + drag_position = get_global_mouse_position() - color_rect_map.position + start_dragging_position = get_global_mouse_position() self.reflect_dragging.call_deferred() else: - _is_dragging = false + dirty_is_dragging = false self.reflect_dragging.call_deferred() + var diff: Vector2 = ( + (get_global_mouse_position() - start_dragging_position) / zoom_value + ) + if diff.length() < 1: + parcel_click.emit(get_parcel_from_mouse()) if event is InputEventMouseMotion: - if drag_enabled and _is_dragging: + if drag_enabled and dirty_is_dragging: var new_pos = get_global_mouse_position() - drag_position color_rect_map.position = new_pos emit_signal("on_move") func reflect_dragging(): - is_dragging = _is_dragging + is_dragging = dirty_is_dragging func get_parcel_from_mouse_real() -> Vector2: @@ -153,8 +158,3 @@ func set_selected_parcel(parcel_position: Vector2): Vector2(parcel_position.x, -parcel_position.y) - map_topleft_parcel_position ) color_rect_map.material.set_shader_parameter("selected_tile", color_rect_position) - - -func _on_resized(): - if is_instance_valid(sub_viewport): - sub_viewport.size = self.size diff --git a/godot/src/ui/components/map_shader/map_shader.tscn b/godot/src/ui/components/map_shader/map_shader.tscn index ed0d11ed..49b8b6c2 100644 --- a/godot/src/ui/components/map_shader/map_shader.tscn +++ b/godot/src/ui/components/map_shader/map_shader.tscn @@ -11,25 +11,20 @@ shader_parameter/line_width_px = 1.0 shader_parameter/selected_tile = Vector2(20, 20) [node name="Control_Map" type="Control"] +clip_contents = true layout_mode = 3 anchors_preset = 0 +offset_right = 50.0 +offset_bottom = 50.0 script = ExtResource("1_yemwb") -[node name="SubViewportContainer_MapShader" type="SubViewportContainer" parent="."] -layout_mode = 0 -offset_right = 120.0 -offset_bottom = 120.0 - -[node name="SubViewport" type="SubViewport" parent="SubViewportContainer_MapShader"] -handle_input_locally = false -size = Vector2i(120, 120) -render_target_update_mode = 4 - -[node name="ColorRect_Map" type="ColorRect" parent="SubViewportContainer_MapShader/SubViewport"] +[node name="ColorRect_Map" type="ColorRect" parent="."] unique_name_in_owner = true texture_filter = 1 texture_repeat = 3 material = SubResource("ShaderMaterial_fnml8") +layout_mode = 1 +offset_right = 200.0 +offset_bottom = 200.0 -[connection signal="resized" from="." to="." method="_on_resized"] -[connection signal="gui_input" from="SubViewportContainer_MapShader/SubViewport/ColorRect_Map" to="." method="_on_color_rect_map_gui_input"] +[connection signal="gui_input" from="ColorRect_Map" to="." method="_on_color_rect_map_gui_input"] diff --git a/godot/src/ui/components/menu/button_group_menu_tabs.tres b/godot/src/ui/components/menu/button_group_menu_tabs.tres new file mode 100644 index 00000000..31a06a00 --- /dev/null +++ b/godot/src/ui/components/menu/button_group_menu_tabs.tres @@ -0,0 +1,4 @@ +[gd_resource type="ButtonGroup" format=3 uid="uid://73odg1nwdkof"] + +[resource] +resource_name = "Tabs" diff --git a/godot/src/ui/components/menu/menu.gd b/godot/src/ui/components/menu/menu.gd index 8d6fd7ae..a67de96c 100644 --- a/godot/src/ui/components/menu/menu.gd +++ b/godot/src/ui/components/menu/menu.gd @@ -1,18 +1,28 @@ extends Control +@export var group: ButtonGroup +var buttons_quantity: int = 0 +var pressed_index: int = 0 + signal hide_menu signal jump_to(Vector2i) signal toggle_minimap signal toggle_fps signal toggle_ram +@onready var color_rect_header = $ColorRect_Header + +@onready var control_discover = $ColorRect_Background/Control_Discover +@onready var control_settings = $ColorRect_Background/Control_Settings +@onready var control_map = $ColorRect_Background/Control_Map +@onready var control_advance_settings = $ColorRect_Background/Control_AdvanceSettings +var selected_node: Control + @onready var button_discover = $ColorRect_Header/HBoxContainer_ButtonsPanel/Button_Discover @onready var button_map = $ColorRect_Header/HBoxContainer_ButtonsPanel/Button_Map @onready var button_settings = $ColorRect_Header/HBoxContainer_ButtonsPanel/Button_Settings - -@onready var control_settings = $Control_Settings -@onready var control_map = $Control_Map -@onready var control_discover = $Control_Discover +@onready +var button_advance_settings = $ColorRect_Header/HBoxContainer_ButtonsPanel/Button_AdvanceSettings var resolutions := [ Vector2i(1920, 1080), Vector2i(1280, 720), Vector2i(800, 600), Vector2i(400, 300) @@ -21,56 +31,52 @@ var sizes := [Vector2i(1152, 648), Vector2i(576, 324)] func _ready(): + self.modulate = Color(1, 1, 1, 0) button_settings.set_pressed(true) + selected_node = control_settings control_map.hide() control_settings.show() control_discover.hide() - + control_advance_settings.hide() control_map.jump_to.connect(_jump_to) func _unhandled_input(event): - if event is InputEventKey: + if event is InputEventKey and visible: + if event.pressed and event.keycode == KEY_TAB: + pressed_index = group.get_pressed_button().get_index() + buttons_quantity = group.get_buttons().size() - 1 + control_map.clear() + + if pressed_index < buttons_quantity: + group.get_buttons()[pressed_index + 1].set_pressed(true) + group.get_buttons()[pressed_index + 1].emit_signal("pressed") + else: + #change index to 0 to include "Control Discover" + group.get_buttons()[1].set_pressed(true) + group.get_buttons()[1].emit_signal("pressed") if event.pressed and event.keycode == KEY_ESCAPE: emit_signal("hide_menu") - - if visible and event.pressed and event.keycode == KEY_TAB: - if button_settings.button_pressed: - button_map.set_pressed(true) - hide_all() - control_map.show() -# elif button_map.button_pressed: + if event.pressed and event.keycode == KEY_M: + if selected_node == control_map: + emit_signal("hide_menu") else: - button_settings.set_pressed(true) - hide_all() - control_settings.show() - + show_map() -# else: -# button_discover.set_pressed(true) -# hide_all() -# control_discover.show() - -func _on_button_settings_pressed(): - hide_all() - control_settings.show() - - -func _on_button_map_pressed(): - hide_all() - control_map.show() - - -func _on_button_discover_pressed(): - hide_all() - control_discover.show() +func modulate_all(): + var tween_m = create_tween() + tween_m.tween_property(control_discover, "modulate", Color(1, 1, 1, 0), 0.125) + tween_m.tween_property(control_map, "modulate", Color(1, 1, 1, 0), 0.125) + tween_m.tween_property(control_settings, "modulate", Color(1, 1, 1, 0), 0.125) + tween_m.tween_property(control_advance_settings, "modulate", Color(1, 1, 1, 0), 0.125) func hide_all(): control_discover.hide() control_map.hide() control_settings.hide() + control_advance_settings.hide() func _on_button_close_pressed(): @@ -81,10 +87,29 @@ func _jump_to(parcel: Vector2i): emit_signal("jump_to", parcel) +func close(): + color_rect_header.hide() + var tween_m = create_tween() + tween_m.tween_property(self, "modulate", Color(1, 1, 1, 0), 0.3).set_ease(Tween.EASE_IN_OUT) + var tween_h = create_tween() + tween_h.tween_callback(hide).set_delay(0.3) + + +func show_last(): + self.show() + var tween = create_tween() + tween.tween_property(self, "modulate", Color(1, 1, 1), 0.3).set_ease(Tween.EASE_IN_OUT) + color_rect_header.show() + + func show_map(): self.show() - self._on_button_map_pressed() - button_map.set_pressed(true) + if selected_node != control_map: + self._on_button_map_pressed() + button_map.set_pressed(true) + var tween = create_tween() + tween.tween_property(self, "modulate", Color(1, 1, 1), 0.25).set_ease(Tween.EASE_IN_OUT) + color_rect_header.show() func _on_control_settings_toggle_fps_visibility(visibility): @@ -97,3 +122,37 @@ func _on_control_settings_toggle_map_visibility(visibility): func _on_control_settings_toggle_ram_usage_visibility(visibility): emit_signal("toggle_ram", visibility) + + +func _on_button_advance_settings_pressed(): + fade_out(selected_node) + fade_in(control_advance_settings) + + +func _on_button_settings_pressed(): + fade_out(selected_node) + fade_in(control_settings) + + +func _on_button_map_pressed(): + fade_out(selected_node) + fade_in(control_map) + + +func _on_button_discover_pressed(): + fade_out(selected_node) + fade_in(control_discover) + + +func fade_in(node: Control): + selected_node = node + node.show() + var tween_m = create_tween() + tween_m.tween_property(node, "modulate", Color(1, 1, 1), 0.3) + + +func fade_out(node: Control): + var tween_m = create_tween() + tween_m.tween_property(node, "modulate", Color(1, 1, 1, 0), 0.3) + var tween_h = create_tween() + tween_h.tween_callback(node.hide).set_delay(0.3) diff --git a/godot/src/ui/components/menu/menu.tscn b/godot/src/ui/components/menu/menu.tscn index 7545be1e..3121c56b 100644 --- a/godot/src/ui/components/menu/menu.tscn +++ b/godot/src/ui/components/menu/menu.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=3 uid="uid://co44hxd7jbcjs"] +[gd_scene load_steps=10 format=3 uid="uid://co44hxd7jbcjs"] [ext_resource type="Theme" uid="uid://bm1rvmngc833v" path="res://assets/themes/theme.tres" id="1_ji0pe"] [ext_resource type="Script" path="res://src/ui/components/menu/menu.gd" id="2_cgghr"] @@ -6,6 +6,8 @@ [ext_resource type="PackedScene" uid="uid://bp6yn0qw2s6ua" path="res://src/ui/components/discover/discover.tscn" id="4_5qyiw"] [ext_resource type="PackedScene" uid="uid://dkqc3of3acx2i" path="res://src/ui/components/map/map.tscn" id="4_jtsir"] [ext_resource type="Shader" path="res://src/ui/components/menu/menu_rainbow.gdshader" id="5_k4wpn"] +[ext_resource type="PackedScene" uid="uid://c8v1b3owo26xt" path="res://src/ui/components/advance_settings/advance_settings.tscn" id="6_dtnry"] +[ext_resource type="ButtonGroup" uid="uid://73odg1nwdkof" path="res://src/ui/components/menu/button_group_menu_tabs.tres" id="8_ao4hb"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_t4bn8"] shader = ExtResource("5_k4wpn") @@ -13,9 +15,6 @@ shader_parameter/strength = 0.9 shader_parameter/speed = 0.025 shader_parameter/angle = 0.0 -[sub_resource type="ButtonGroup" id="ButtonGroup_p3dor"] -resource_name = "Tabs" - [node name="Control_Menu" type="Control"] layout_mode = 3 anchors_preset = 15 @@ -26,19 +25,33 @@ grow_vertical = 2 mouse_force_pass_scroll_events = false theme = ExtResource("1_ji0pe") script = ExtResource("2_cgghr") +group = ExtResource("8_ao4hb") -[node name="Control_Discover" parent="." instance=ExtResource("4_5qyiw")] -visible = false +[node name="ColorRect_Background" type="ColorRect" parent="."] layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.85098, 0.843137, 0.866667, 1) -[node name="Control_Settings" parent="." instance=ExtResource("3_1stdy")] +[node name="Control_Discover" parent="ColorRect_Background" instance=ExtResource("4_5qyiw")] visible = false layout_mode = 1 -[node name="Control_Map" parent="." instance=ExtResource("4_jtsir")] +[node name="Control_Settings" parent="ColorRect_Background" instance=ExtResource("3_1stdy")] +layout_mode = 1 + +[node name="Control_Map" parent="ColorRect_Background" instance=ExtResource("4_jtsir")] visible = false layout_mode = 1 offset_top = 61.0 +offset_bottom = -1.0 + +[node name="Control_AdvanceSettings" parent="ColorRect_Background" instance=ExtResource("6_dtnry")] +visible = false +layout_mode = 1 [node name="ColorRect_Header" type="ColorRect" parent="."] layout_mode = 1 @@ -72,6 +85,7 @@ offset_right = 117.5 offset_bottom = 20.0 grow_horizontal = 2 grow_vertical = 2 +focus_mode = 2 theme_override_constants/separation = 50 [node name="Button_Discover" type="Button" parent="ColorRect_Header/HBoxContainer_ButtonsPanel"] @@ -82,8 +96,9 @@ size_flags_horizontal = 4 size_flags_vertical = 4 focus_mode = 0 theme_type_variation = &"ButtonFlat_Tab" +disabled = true toggle_mode = true -button_group = SubResource("ButtonGroup_p3dor") +button_group = ExtResource("8_ao4hb") text = "Discover" [node name="Button_Map" type="Button" parent="ColorRect_Header/HBoxContainer_ButtonsPanel"] @@ -94,7 +109,7 @@ size_flags_vertical = 4 focus_mode = 0 theme_type_variation = &"ButtonFlat_Tab" toggle_mode = true -button_group = SubResource("ButtonGroup_p3dor") +button_group = ExtResource("8_ao4hb") text = "Map" [node name="Button_Settings" type="Button" parent="ColorRect_Header/HBoxContainer_ButtonsPanel"] @@ -105,9 +120,20 @@ size_flags_vertical = 4 focus_mode = 0 theme_type_variation = &"ButtonFlat_Tab" toggle_mode = true -button_group = SubResource("ButtonGroup_p3dor") +button_group = ExtResource("8_ao4hb") text = "Settings" +[node name="Button_AdvanceSettings" type="Button" parent="ColorRect_Header/HBoxContainer_ButtonsPanel"] +custom_minimum_size = Vector2(75, 0) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +focus_mode = 0 +theme_type_variation = &"ButtonFlat_Tab" +toggle_mode = true +button_group = ExtResource("8_ao4hb") +text = "Advance Settings" + [node name="Button_Close" type="Button" parent="."] custom_minimum_size = Vector2(75, 0) layout_mode = 1 @@ -124,10 +150,11 @@ size_flags_vertical = 4 focus_mode = 0 text = "CLOSE" -[connection signal="toggle_fps_visibility" from="Control_Settings" to="." method="_on_control_settings_toggle_fps_visibility"] -[connection signal="toggle_map_visibility" from="Control_Settings" to="." method="_on_control_settings_toggle_map_visibility"] -[connection signal="toggle_ram_usage_visibility" from="Control_Settings" to="." method="_on_control_settings_toggle_ram_usage_visibility"] +[connection signal="toggle_fps_visibility" from="ColorRect_Background/Control_Settings" to="." method="_on_control_settings_toggle_fps_visibility"] +[connection signal="toggle_map_visibility" from="ColorRect_Background/Control_Settings" to="." method="_on_control_settings_toggle_map_visibility"] +[connection signal="toggle_ram_usage_visibility" from="ColorRect_Background/Control_Settings" to="." method="_on_control_settings_toggle_ram_usage_visibility"] [connection signal="pressed" from="ColorRect_Header/HBoxContainer_ButtonsPanel/Button_Discover" to="." method="_on_button_discover_pressed"] [connection signal="pressed" from="ColorRect_Header/HBoxContainer_ButtonsPanel/Button_Map" to="." method="_on_button_map_pressed"] [connection signal="pressed" from="ColorRect_Header/HBoxContainer_ButtonsPanel/Button_Settings" to="." method="_on_button_settings_pressed"] +[connection signal="pressed" from="ColorRect_Header/HBoxContainer_ButtonsPanel/Button_AdvanceSettings" to="." method="_on_button_advance_settings_pressed"] [connection signal="pressed" from="Button_Close" to="." method="_on_button_close_pressed"] diff --git a/godot/src/ui/components/panel_bottom_left.gd b/godot/src/ui/components/panel_bottom_left.gd index a1ce9b34..5f585cb1 100644 --- a/godot/src/ui/components/panel_bottom_left.gd +++ b/godot/src/ui/components/panel_bottom_left.gd @@ -118,7 +118,7 @@ func set_ws_state(connected: bool) -> void: label_ws_state.add_theme_color_override("font_color", Color.RED) -func _process(delta): +func _process(_delta): preview_ws.poll() var state = preview_ws.get_ready_state() diff --git a/godot/src/ui/components/pointer_tooltip/pointer_tooltip.gd b/godot/src/ui/components/pointer_tooltip/pointer_tooltip.gd new file mode 100644 index 00000000..00c84c39 --- /dev/null +++ b/godot/src/ui/components/pointer_tooltip/pointer_tooltip.gd @@ -0,0 +1,25 @@ +extends Control + +var angles: Array = [0, 60, 90, 120, 180] +var initial_angle: float + +var tooltip_scene = preload("res://src/ui/components/pointer_tooltip/tooltip_label.tscn") + +@onready var control_center = $Control_Center + + +func set_pointer_data(interacts_array: Array): + for child in control_center.get_children(): + child.queue_free() + var i = 0 + for interact in interacts_array: + var tooltip_scene_instance = tooltip_scene.instantiate() + tooltip_scene_instance.set_position(Vector2(0, -95).rotated(deg_to_rad(angles[i]))) + var tooltip_position = tooltip_scene_instance.get_position() + tooltip_scene_instance.set_position(Vector2(tooltip_position.x, tooltip_position.y - 20)) + control_center.add_child(tooltip_scene_instance) + tooltip_scene_instance.set_tooltip_data( + interact.get("text", ""), interact.get("action", "") + ) + + i = i + 1 diff --git a/godot/src/ui/components/pointer_tooltip/pointer_tooltip.tscn b/godot/src/ui/components/pointer_tooltip/pointer_tooltip.tscn new file mode 100644 index 00000000..85d929a8 --- /dev/null +++ b/godot/src/ui/components/pointer_tooltip/pointer_tooltip.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=3 format=3 uid="uid://mc4jrvowdpxp"] + +[ext_resource type="Script" path="res://src/ui/components/pointer_tooltip/pointer_tooltip.gd" id="1_qf3d8"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_puane"] +bg_color = Color(0.6, 0.6, 0.6, 0.168627) +corner_radius_top_left = 20 +corner_radius_top_right = 20 +corner_radius_bottom_right = 20 +corner_radius_bottom_left = 20 + +[node name="Control_PointerTooltip" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +script = ExtResource("1_qf3d8") + +[node name="Panel_Crosshair" type="Panel" parent="."] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -10.0 +offset_top = -10.0 +offset_right = 10.0 +offset_bottom = 10.0 +grow_horizontal = 2 +grow_vertical = 2 +pivot_offset = Vector2(10, 10) +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme_override_styles/panel = SubResource("StyleBoxFlat_puane") + +[node name="Control_Center" type="Control" parent="."] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +grow_horizontal = 2 +grow_vertical = 2 diff --git a/godot/src/ui/components/pointer_tooltip/tooltip_label.gd b/godot/src/ui/components/pointer_tooltip/tooltip_label.gd new file mode 100644 index 00000000..a208bb28 --- /dev/null +++ b/godot/src/ui/components/pointer_tooltip/tooltip_label.gd @@ -0,0 +1,28 @@ +extends Control + +@onready +var label_action = $PanelContainer/MarginContainer/HBoxContainer/PanelContainer/MarginContainer/Label_Action +@onready var label_text = $PanelContainer/MarginContainer/HBoxContainer/Label_Text + + +func set_tooltip_data(text: String, action: String): + var key: String + var index: int = InputMap.get_actions().find(action.to_lower(), 0) + if label_text: + if index != -1: + show() + var event = InputMap.action_get_events(InputMap.get_actions()[index])[0] + if event is InputEventKey: + key = char(event.unicode).to_upper() + elif event is InputEventMouseButton: + if event.button_index == 1: + key = "Mouse Left Button" + if event.button_index == 2: + key = "Mouse Right Button" + if event.button_index == 0: + key = "Mouse Wheel Button" + label_action.text = key + label_text.text = text + else: + hide() + printerr("Action doesn't exist ", action) diff --git a/godot/src/ui/components/pointer_tooltip/tooltip_label.tscn b/godot/src/ui/components/pointer_tooltip/tooltip_label.tscn new file mode 100644 index 00000000..336724a1 --- /dev/null +++ b/godot/src/ui/components/pointer_tooltip/tooltip_label.tscn @@ -0,0 +1,66 @@ +[gd_scene load_steps=4 format=3 uid="uid://d0rqfy34immue"] + +[ext_resource type="FontFile" uid="uid://cmc7ku5u0efdy" path="res://assets/themes/fonts/lato_family/Lato-Bold.ttf" id="1_1lcoh"] +[ext_resource type="Script" path="res://src/ui/components/pointer_tooltip/tooltip_label.gd" id="1_ut63f"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_14y5s"] +bg_color = Color(0, 0, 0, 0.627451) +corner_radius_top_left = 6 +corner_radius_top_right = 6 +corner_radius_bottom_right = 6 +corner_radius_bottom_left = 6 + +[node name="Control_TooltipLabel" type="Control"] +custom_minimum_size = Vector2(20, 20) +layout_mode = 3 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_top = -380.0 +offset_right = 84.0 +offset_bottom = -340.0 +grow_vertical = 2 +pivot_offset = Vector2(0, 20) +size_flags_horizontal = 4 +script = ExtResource("1_ut63f") + +[node name="PanelContainer" type="PanelContainer" parent="."] +layout_mode = 2 +offset_right = 84.0 +offset_bottom = 40.0 +theme_override_styles/panel = SubResource("StyleBoxFlat_14y5s") + +[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"] +layout_mode = 2 +theme_override_constants/margin_left = 10 +theme_override_constants/margin_top = 8 +theme_override_constants/margin_right = 10 +theme_override_constants/margin_bottom = 8 + +[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/MarginContainer"] +layout_mode = 2 +theme_override_constants/separation = 10 + +[node name="PanelContainer" type="PanelContainer" parent="PanelContainer/MarginContainer/HBoxContainer"] +layout_mode = 2 + +[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/MarginContainer/HBoxContainer/PanelContainer"] +layout_mode = 2 +theme_override_constants/margin_left = 8 +theme_override_constants/margin_top = 0 +theme_override_constants/margin_right = 8 +theme_override_constants/margin_bottom = 0 + +[node name="Label_Action" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer/PanelContainer/MarginContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 12 +text = "1" +vertical_alignment = 1 + +[node name="Label_Text" type="Label" parent="PanelContainer/MarginContainer/HBoxContainer"] +layout_mode = 2 +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_fonts/font = ExtResource("1_1lcoh") +text = "Text" +vertical_alignment = 1 diff --git a/godot/src/ui/components/settings/settings.tscn b/godot/src/ui/components/settings/settings.tscn index d3caab7e..4c984e6b 100644 --- a/godot/src/ui/components/settings/settings.tscn +++ b/godot/src/ui/components/settings/settings.tscn @@ -92,6 +92,7 @@ text = "Monitoring alignment = 0 [node name="VBoxContainer_General" type="VBoxContainer" parent="."] +visible = false layout_mode = 2 offset_left = 302.0 offset_top = 121.0 @@ -115,10 +116,12 @@ text = "Cache Path" [node name="TextEdit_CachePath" type="LineEdit" parent="VBoxContainer_General/VBoxContainer_CachePath"] custom_minimum_size = Vector2(500, 30) layout_mode = 2 +focus_mode = 0 editable = false [node name="Button_ClearCache" type="Button" parent="VBoxContainer_General/VBoxContainer_CachePath"] layout_mode = 2 +focus_mode = 0 text = "Clear Cache" [node name="HSeparator" type="HSeparator" parent="VBoxContainer_General"] @@ -126,13 +129,13 @@ layout_mode = 2 [node name="Checkbox_Minimap" type="CheckBox" parent="VBoxContainer_General"] layout_mode = 2 +focus_mode = 0 theme_override_colors/font_color = Color(0, 0, 0, 1) button_pressed = true text = "Show map" flat = true [node name="VBoxContainer_Graphics" type="VBoxContainer" parent="."] -visible = false layout_mode = 2 offset_left = 302.0 offset_top = 121.0 @@ -154,6 +157,7 @@ text = "Window Size" [node name="MenuButton_WindowSize" type="OptionButton" parent="VBoxContainer_Graphics/WindowSize"] layout_mode = 2 +focus_mode = 0 [node name="Resolution" type="VBoxContainer" parent="VBoxContainer_Graphics"] layout_mode = 2 @@ -167,6 +171,7 @@ text = "Resolution" [node name="MenuButton_Resolution" type="OptionButton" parent="VBoxContainer_Graphics/Resolution"] layout_mode = 2 +focus_mode = 0 [node name="GuiScale" type="VBoxContainer" parent="VBoxContainer_Graphics"] layout_mode = 2 @@ -180,11 +185,60 @@ text = "UI Scale" [node name="HSlider_GuiScale" type="HSlider" parent="VBoxContainer_Graphics/GuiScale"] layout_mode = 2 +focus_mode = 0 min_value = 50.0 max_value = 200.0 step = 10.0 value = 100.0 +[node name="LimitFps" type="VBoxContainer" parent="VBoxContainer_Graphics"] +layout_mode = 2 +size_flags_vertical = 0 +alignment = 1 + +[node name="Label_LimitFps" type="Label" parent="VBoxContainer_Graphics/LimitFps"] +layout_mode = 2 +theme = SubResource("Theme_eontw") +text = "Limit FPS" + +[node name="MenuButton_LimitFps" type="OptionButton" parent="VBoxContainer_Graphics/LimitFps"] +layout_mode = 2 +focus_mode = 0 +item_count = 6 +selected = 0 +popup/item_0/text = "Vsync" +popup/item_0/id = 0 +popup/item_1/text = "30" +popup/item_1/id = 1 +popup/item_2/text = "60" +popup/item_2/id = 2 +popup/item_3/text = "120" +popup/item_3/id = 3 +popup/item_4/text = "240" +popup/item_4/id = 4 +popup/item_5/text = "No Limit" +popup/item_5/id = 5 + +[node name="Skybox" type="VBoxContainer" parent="VBoxContainer_Graphics"] +layout_mode = 2 +size_flags_vertical = 0 +alignment = 1 + +[node name="Label_Skybox" type="Label" parent="VBoxContainer_Graphics/Skybox"] +layout_mode = 2 +theme = SubResource("Theme_eontw") +text = "Skybox" + +[node name="MenuButton_Skybox" type="OptionButton" parent="VBoxContainer_Graphics/Skybox"] +layout_mode = 2 +focus_mode = 0 +item_count = 2 +selected = 0 +popup/item_0/text = "Default" +popup/item_0/id = 0 +popup/item_1/text = "Beauty" +popup/item_1/id = 1 + [node name="VBoxContainer_Monitoring" type="VBoxContainer" parent="."] visible = false layout_mode = 2 @@ -199,12 +253,14 @@ theme_override_constants/separation = 25 [node name="Checkbox_RamUsage" type="CheckBox" parent="VBoxContainer_Monitoring"] visible = false layout_mode = 2 +focus_mode = 0 theme_override_colors/font_color = Color(0, 0, 0, 1) text = "RAM Usage" flat = true [node name="Checkbox_Fps" type="CheckBox" parent="VBoxContainer_Monitoring"] layout_mode = 2 +focus_mode = 0 theme_override_colors/font_color = Color(0, 0, 0, 1) button_pressed = true text = "Frame rate" @@ -231,6 +287,7 @@ offset_bottom = 41.0 grow_horizontal = 0 size_flags_horizontal = 4 size_flags_vertical = 4 +focus_mode = 0 text = "Back" [connection signal="toggled" from="ColorRect_Sidebar/VBoxContainer_Sections/Button_General" to="." method="_on_general_button_toggled"] diff --git a/godot/src/ui/explorer.gd b/godot/src/ui/explorer.gd index f248f0be..b532cc6a 100644 --- a/godot/src/ui/explorer.gd +++ b/godot/src/ui/explorer.gd @@ -3,15 +3,17 @@ extends Node var scene_runner: SceneManager = null var realm: Realm = null var parcel_manager: ParcelManager = null +var pointer_tooltip_scene = preload("res://src/ui/components/pointer_tooltip/pointer_tooltip.tscn") + +@onready var control_crosshair = $UI/Control_Crosshair +@onready var control_pointer_tooltip = $Control_PointerTooltip -#@onready var player = $Player @onready var label_fps = %Label_FPS @onready var label_ram = %Label_RAM @onready var control_menu = $UI/Control_Menu @onready var control_minimap = $UI/Control_Minimap @onready var panel_bottom_left = $UI/Panel_BottomLeft @onready var player := $Player -@onready var tooltip_node = $Tooltip @onready var contro_info_panel = $UI/Control_Minimap/Contro_InfoPanel var parcel_position: Vector2i @@ -37,6 +39,7 @@ func _process(_dt): func _ready(): + control_pointer_tooltip.hide() var start_parcel_position: Vector2i = Vector2i(74, -2) player.position = 16 * Vector3(start_parcel_position.x, 0.1, -start_parcel_position.y) player.look_at(16 * Vector3(start_parcel_position.x + 1, 0, -(start_parcel_position.y + 1))) @@ -67,18 +70,13 @@ func _on_pointer_tooltip_changed(): func change_tooltips(): var tooltips = scene_runner.get_tooltips() - tooltip_node.hide() - - if not tooltips.is_empty(): - var tooltip: Dictionary = tooltips[0] - var events := InputMap.action_get_events(tooltip.get("action", "").to_lower()) - - if not events.is_empty(): - tooltip_node._open_with("[" + events[0].as_text() + "] ", tooltip.get("text", "")) - tooltip_node.position = tooltip_node.get_global_mouse_position() + Vector2(20, 0) - -# print("(", Time.get_ticks_msec(), ") > ", tooltips) + if Input.mouse_mode == Input.MOUSE_MODE_CAPTURED: + if not tooltips.is_empty(): + control_pointer_tooltip.set_pointer_data(tooltips) + control_pointer_tooltip.show() + else: + control_pointer_tooltip.hide() func _on_check_button_toggled(button_pressed): @@ -89,25 +87,42 @@ func _on_ui_gui_input(event): if event is InputEventMouseButton and event.pressed: if Input.mouse_mode != Input.MOUSE_MODE_CAPTURED: Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) + control_crosshair.show() + + +@onready var line_edit_command = $UI/LineEdit_Command func _unhandled_input(event): if event is InputEventKey: if event.pressed and event.keycode == KEY_TAB: if not control_menu.visible: - control_menu.show() + control_menu.show_last() Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) + control_crosshair.hide() if event.pressed and event.keycode == KEY_M: if control_menu.visible: - control_menu.hide() + pass else: control_menu.show_map() Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) + control_crosshair.hide() if event.pressed and event.keycode == KEY_ESCAPE: if Input.mouse_mode == Input.MOUSE_MODE_CAPTURED: Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) + control_crosshair.hide() + + if line_edit_command.visible: + line_edit_command.hide() + + if event.pressed and event.keycode == KEY_ENTER: + if not line_edit_command.visible: + line_edit_command.text = "" + line_edit_command.show() + + line_edit_command.grab_focus() func _toggle_ram_usage(visibility: bool): @@ -123,11 +138,12 @@ func _on_control_minimap_request_open_map(): func _on_control_menu_jump_to(parcel: Vector2i): player.set_position(Vector3i(parcel.x * 16, 3, -parcel.y * 16)) - control_menu.hide() + control_menu.close() func _on_control_menu_hide_menu(): - control_menu.hide() + control_menu.close() + control_menu.control_map.clear() func _on_panel_bottom_left_request_change_realm(realm_string): @@ -159,10 +175,18 @@ func _on_control_menu_toggle_minimap(visibility): control_minimap.visible = visibility -func _on_tooltip_gui_input(_event): - if tooltip_node.visible: - tooltip_node.position = tooltip_node.get_global_mouse_position() + Vector2(20, 0) +func _on_panel_bottom_left_preview_hot_reload(_scene_type, scene_id): + parcel_manager.reload_scene(scene_id) -func _on_panel_bottom_left_preview_hot_reload(scene_type, scene_id): - parcel_manager.reload_scene(scene_id) +func _on_line_edit_command_text_submitted(new_text: String) -> void: + line_edit_command.hide() + + var params := new_text.split(" ") + var command_str := params[0].to_lower() + if command_str == "/go" or command_str == "/goto" and params.size() > 1: + var comma_params = params[1].split(",") + if comma_params.size() > 1: + _on_control_menu_jump_to(Vector2i(int(comma_params[0]), int(comma_params[1]))) + elif params.size() > 2: + _on_control_menu_jump_to(Vector2i(int(params[1]), int(params[2]))) diff --git a/godot/src/ui/explorer.tscn b/godot/src/ui/explorer.tscn index 7b65865e..1a0807da 100644 --- a/godot/src/ui/explorer.tscn +++ b/godot/src/ui/explorer.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=3 uid="uid://deq5v42fmh0y7"] +[gd_scene load_steps=16 format=3 uid="uid://deq5v42fmh0y7"] [ext_resource type="Script" path="res://src/ui/explorer.gd" id="1_5n8xk"] [ext_resource type="PackedScene" uid="uid://drle8sbexaohk" path="res://assets/sky/krzmig/world_environment.tscn" id="2_40m6d"] @@ -8,7 +8,7 @@ [ext_resource type="PackedScene" uid="uid://rt4tyyg7gd1s" path="res://src/ui/components/panel_bottom_left.tscn" id="4_x5dml"] [ext_resource type="PackedScene" uid="uid://co44hxd7jbcjs" path="res://src/ui/components/menu/menu.tscn" id="5_mso44"] [ext_resource type="PackedScene" uid="uid://cbtnbb03jb1u6" path="res://src/ui/components/info_panel/info_panel.tscn" id="6_3c8pn"] -[ext_resource type="PackedScene" uid="uid://6m5q52mc7rlp" path="res://src/ui/components/pointer_tooltip.tscn" id="9_b8wdq"] +[ext_resource type="PackedScene" uid="uid://mc4jrvowdpxp" path="res://src/ui/components/pointer_tooltip/pointer_tooltip.tscn" id="11_qjs00"] [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_xs7js"] data = PackedVector3Array(2400, 0, 2400, -2400, 0, 2400, 2400, 0, -2400, -2400, 0, 2400, -2400, 0, -2400, 2400, 0, -2400) @@ -26,6 +26,9 @@ texture_filter = 0 [sub_resource type="Theme" id="Theme_1ufu0"] +[sub_resource type="ButtonGroup" id="ButtonGroup_48gvr"] +resource_name = "Tabs" + [node name="explorer" type="Node3D"] script = ExtResource("1_5n8xk") @@ -104,6 +107,7 @@ text = "RAM" horizontal_alignment = 2 [node name="ColorRect" type="ColorRect" parent="UI"] +visible = false layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -118,6 +122,7 @@ grow_horizontal = 2 grow_vertical = 2 [node name="ColorRect2" type="ColorRect" parent="UI"] +visible = false layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -150,12 +155,42 @@ offset_bottom = 176.0 [node name="Control_Menu" parent="UI" instance=ExtResource("5_mso44")] visible = false layout_mode = 1 +group = SubResource("ButtonGroup_48gvr") [node name="Timer" type="Timer" parent="UI"] autostart = true -[node name="Tooltip" parent="." instance=ExtResource("9_b8wdq")] +[node name="Control_Crosshair" type="Control" parent="UI"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 + +[node name="Label_Crosshair" type="Label" parent="UI/Control_Crosshair"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_colors/font_color = Color(1, 1, 1, 1) +theme_override_font_sizes/font_size = 19 +text = "+" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="LineEdit_Command" type="LineEdit" parent="UI"] visible = false +layout_mode = 0 +offset_left = 160.0 +offset_top = 8.0 +offset_right = 814.0 +offset_bottom = 35.0 + +[node name="Control_PointerTooltip" parent="." instance=ExtResource("11_qjs00")] [connection signal="gui_input" from="UI" to="." method="_on_ui_gui_input"] [connection signal="preview_hot_reload" from="UI/Panel_BottomLeft" to="." method="_on_panel_bottom_left_preview_hot_reload"] @@ -169,3 +204,4 @@ visible = false [connection signal="toggle_minimap" from="UI/Control_Menu" to="." method="_on_control_menu_toggle_minimap"] [connection signal="toggle_ram" from="UI/Control_Menu" to="." method="_on_control_menu_toggle_ram"] [connection signal="timeout" from="UI/Timer" to="." method="_on_timer_timeout"] +[connection signal="text_submitted" from="UI/LineEdit_Command" to="." method="_on_line_edit_command_text_submitted"] diff --git a/rust/decentraland-godot-lib/src/scene_runner/components/transform_and_parent.rs b/rust/decentraland-godot-lib/src/scene_runner/components/transform_and_parent.rs index 98ee32be..778a9b7f 100644 --- a/rust/decentraland-godot-lib/src/scene_runner/components/transform_and_parent.rs +++ b/rust/decentraland-godot-lib/src/scene_runner/components/transform_and_parent.rs @@ -35,7 +35,7 @@ impl DclTransformAndParent { } pub fn update_transform_and_parent(scene: &mut Scene, crdt_state: &mut SceneCrdtState) { - let mut godot_dcl_scene = &mut scene.godot_dcl_scene; + let godot_dcl_scene = &mut scene.godot_dcl_scene; let dirty_lww_components = &scene.current_dirty.lww_components; let transform_component = crdt_state.get_transform(); diff --git a/rust/decentraland-godot-lib/src/scene_runner/input.rs b/rust/decentraland-godot-lib/src/scene_runner/input.rs index 476ce575..701e0d26 100644 --- a/rust/decentraland-godot-lib/src/scene_runner/input.rs +++ b/rust/decentraland-godot-lib/src/scene_runner/input.rs @@ -22,10 +22,10 @@ impl InputState { (InputAction::IaLeft, StringName::from("ia_left")), (InputAction::IaJump, StringName::from("ia_jump")), (InputAction::IaWalk, StringName::from("ia_walk")), - (InputAction::IaAction3, StringName::from("ia_action3")), - (InputAction::IaAction4, StringName::from("ia_action4")), - (InputAction::IaAction5, StringName::from("ia_action5")), - (InputAction::IaAction6, StringName::from("ia_action6")), + (InputAction::IaAction3, StringName::from("ia_action_3")), + (InputAction::IaAction4, StringName::from("ia_action_4")), + (InputAction::IaAction5, StringName::from("ia_action_5")), + (InputAction::IaAction6, StringName::from("ia_action_6")), ]); let state = HashMap::from_iter(dcl_to_action.keys().map(|k| (*k, false))); diff --git a/rust/decentraland-godot-lib/src/scene_runner/scene_manager.rs b/rust/decentraland-godot-lib/src/scene_runner/scene_manager.rs index 2e96737e..c7110a2a 100644 --- a/rust/decentraland-godot-lib/src/scene_runner/scene_manager.rs +++ b/rust/decentraland-godot-lib/src/scene_runner/scene_manager.rs @@ -144,7 +144,7 @@ impl SceneManager { player_global_position.z.floor() as i32, ); - for (id, mut scene) in self.scenes.iter_mut() { + for (id, scene) in self.scenes.iter_mut() { let (distance, inside_scene) = scene.min_distance(&player_parcel_position); scene.distance = distance; if inside_scene { @@ -181,7 +181,7 @@ impl SceneManager { // self.sorted_scene_ids.sort_by_key(|&scene_id| { - let mut scene = self.scenes.get_mut(&scene_id).unwrap(); + let scene = self.scenes.get_mut(&scene_id).unwrap(); if !scene.current_dirty.waiting_process { scene.next_tick_us = start_time_us + 120000; } else if scene_id == self.current_parcel_scene_id { diff --git a/rust/decentraland-godot-lib/src/scene_runner/update_scene.rs b/rust/decentraland-godot-lib/src/scene_runner/update_scene.rs index 16f78e74..94d22c77 100644 --- a/rust/decentraland-godot-lib/src/scene_runner/update_scene.rs +++ b/rust/decentraland-godot-lib/src/scene_runner/update_scene.rs @@ -94,7 +94,7 @@ fn update_deleted_entities(scene: &mut Scene) { return; } - let mut godot_dcl_scene = &mut scene.godot_dcl_scene; + let godot_dcl_scene = &mut scene.godot_dcl_scene; let died = &scene.current_dirty.entities.died; for (entity_id, node) in godot_dcl_scene.entities.iter_mut() {