more weapon select tweaks, still need to fix the 0 index highlighting issue
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user