more weapon select tweaks, still need to fix the 0 index highlighting issue

This commit is contained in:
derek
2024-12-11 16:29:53 -06:00
parent 5ceaa00785
commit 906b566e7b
4 changed files with 9 additions and 9 deletions

View File

@@ -897,7 +897,6 @@ _data = {
[node name="BLOCKOUT2Test" type="Node3D" node_paths=PackedStringArray("player")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.016016, 0.0225029, -0.0192337)
script = ExtResource("1_sbpvn")
load_save = false
player = NodePath("Player")
money = 50
start_health = 5

View File

@@ -16,6 +16,4 @@ grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
script = ExtResource("1_qygnb")
outer_radius = 500
inner_radius = 25
line_width = 2

View File

@@ -390,14 +390,14 @@ func _physics_process(delta):
weapon_select((i - 1))
if Input.is_action_just_pressed("weapon_select"):
weapon_select_menu.show()
weapon_select_menu.open()
Input.set_mouse_mode(Input.MOUSE_MODE_CONFINED_HIDDEN)
controlled_elsewhere = true
gamespeed_controlled = true
Engine.time_scale = .01
elif Input.is_action_just_released("weapon_select"):
var selection = weapon_select_menu.close()
if selection != null:
if selection != null and selection != level_control.current_gun_index :
weapon_select(selection)
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
controlled_elsewhere = false

View File

@@ -1,14 +1,13 @@
#@tool
extends Control
@export var outer_radius : int = 256
@export var inner_radius : int = 256
@export var line_width : int = 4
@onready var level_control = get_tree().current_scene
var options = []
@onready var level_control = get_tree().current_scene
const outer_radius : int = 500
const inner_radius : int = 100
const bkg_color : Color = Color(1, 1, 1, .5)
const line_color : Color = Color(1,1,1)
const select_color = Color(1, 1, 1, .5)
@@ -17,6 +16,10 @@ const IMAGE_SIZE = Vector2(512,512)
var selection
func open():
show()
update_weapon_list()
func close():
hide()
return selection