WIP: ajout d'une touche alternative au mappage des touches.
This commit is contained in:
parent
9da3cbf440
commit
e06c20765d
5 changed files with 222 additions and 105 deletions
|
@ -1,10 +1,41 @@
|
||||||
tool
|
tool
|
||||||
extends HBoxContainer
|
extends HBoxContainer
|
||||||
|
|
||||||
export(String) var action_name = ""
|
#export(String) var action_name = ""
|
||||||
export(String) var description = "Lorem ipsum."
|
export(String) var description = "Lorem ipsum."
|
||||||
export(String) var config_file = "user://input.cfg"
|
export(String) var config_file = "user://input.cfg"
|
||||||
|
|
||||||
|
export(String) var default_keyboard
|
||||||
|
export(String) var default_keyboard_alt
|
||||||
|
export(String) var default_joypad
|
||||||
|
|
||||||
|
var action_name
|
||||||
|
var current_keyboard
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
action_name = self.name
|
||||||
|
current_keyboard = $keyboard
|
||||||
|
load_from_config()
|
||||||
|
|
||||||
|
var key_found = false
|
||||||
|
var key_alt_found = false
|
||||||
|
for event in InputMap.get_action_list( action_name ):
|
||||||
|
if event is InputEventKey:
|
||||||
|
pass
|
||||||
|
if not key_found:
|
||||||
|
$keyboard.text = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||||
|
key_found = true
|
||||||
|
elif not key_alt_found:
|
||||||
|
$keyboard_alt.text = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||||
|
key_alt_found = true
|
||||||
|
elif event is InputEventJoypadButton:
|
||||||
|
$joypad.text = Input.get_joy_button_string( event.button_index )
|
||||||
|
|
||||||
|
$keyboard.connect( "pressed", self, "wait_for_input" )
|
||||||
|
$keyboard_alt.connect( "pressed", self, "wait_for_input_alt" )
|
||||||
|
$joypad.connect( "pressed", self, "wait_for_input" )
|
||||||
|
|
||||||
|
set_process_input(false)
|
||||||
func _enter_tree():
|
func _enter_tree():
|
||||||
|
|
||||||
if not self.has_node( "description" ):
|
if not self.has_node( "description" ):
|
||||||
|
@ -25,6 +56,16 @@ func _enter_tree():
|
||||||
new_button.size_flags_vertical = SIZE_EXPAND
|
new_button.size_flags_vertical = SIZE_EXPAND
|
||||||
self.add_child( new_button )
|
self.add_child( new_button )
|
||||||
new_button.set_owner( self )
|
new_button.set_owner( self )
|
||||||
|
|
||||||
|
if not self.has_node( "keyboard_alt" ):
|
||||||
|
var new_button = Button.new()
|
||||||
|
new_button.name = "keyboard_alt"
|
||||||
|
new_button.align = HALIGN_LEFT
|
||||||
|
new_button.size_flags_horizontal = SIZE_EXPAND_FILL
|
||||||
|
new_button.size_flags_vertical = SIZE_EXPAND
|
||||||
|
self.add_child( new_button )
|
||||||
|
new_button.set_owner( self )
|
||||||
|
#
|
||||||
#
|
#
|
||||||
if not self.has_node( "joypad" ):
|
if not self.has_node( "joypad" ):
|
||||||
var new_button_joypad = Button.new()
|
var new_button_joypad = Button.new()
|
||||||
|
@ -60,51 +101,96 @@ func get_event_with_modifier_from_string( scancode, type ):
|
||||||
return new_event
|
return new_event
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
|
||||||
func load_from_config():
|
func load_from_config():
|
||||||
var config = ConfigFile.new()
|
var config = ConfigFile.new()
|
||||||
var err = config.load( config_file )
|
var err = config.load( config_file )
|
||||||
if err:# Assuming that file is missing, generate default config
|
if err:# Assuming that file is missing, generate default config
|
||||||
for event in InputMap.get_action_list( action_name ):
|
#
|
||||||
if event is InputEventKey:
|
# for event in InputMap.get_action_list( action_name ):
|
||||||
var scancode = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
# if event is InputEventKey:
|
||||||
config.set_value("keyboard", action_name, scancode)
|
# var scancode = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||||
elif event is InputEventJoypadButton:
|
# config.set_value(current_keyboard.name, action_name, scancode)
|
||||||
var joy_button_name = Input.get_joy_button_string( event.button_index )
|
## if current_keyboard.name == "keyboard_alt":
|
||||||
config.set_value("joypad", action_name, joy_button_name)
|
## break
|
||||||
|
# current_keyboard = $keyboard_alt
|
||||||
|
#
|
||||||
|
# elif event is InputEventJoypadButton:
|
||||||
|
# var joy_button_name = Input.get_joy_button_string( event.button_index )
|
||||||
|
# config.set_value("joypad", action_name, joy_button_name)
|
||||||
config.save( config_file )
|
config.save( config_file )
|
||||||
|
load_from_config()
|
||||||
else:
|
else:
|
||||||
var action_found = false
|
|
||||||
for action in config.get_section_keys("keyboard"):
|
# on initialise l'entrée, si elle n'existe pas déjà, par la valeur par defaut du projet.
|
||||||
if action == action_name:
|
if not config.has_section_key("keyboard", action_name):
|
||||||
action_found = true
|
|
||||||
var event = get_event_with_modifier_from_string( config.get_value("keyboard", action_name), "keyboard")
|
|
||||||
for old_event in InputMap.get_action_list( action_name ):
|
|
||||||
if old_event is InputEventKey:
|
|
||||||
InputMap.action_erase_event(action_name, old_event)
|
|
||||||
InputMap.action_add_event(action_name, event)
|
|
||||||
break
|
|
||||||
if not action_found:
|
|
||||||
for event in InputMap.get_action_list( action_name ):
|
for event in InputMap.get_action_list( action_name ):
|
||||||
if event is InputEventKey:
|
if event is InputEventKey:
|
||||||
var scancode = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
var scancode = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||||
config.set_value("keyboard", action_name, scancode)
|
config.set_value("keyboard", action_name, scancode)
|
||||||
|
break
|
||||||
|
# on initialise l'entrée alternative, si elle n'existe pas déjà, par la valeur par defaut du projet.
|
||||||
action_found = false
|
var is_first = true
|
||||||
for action in config.get_section_keys("joypad"):
|
if not config.has_section_key("keyboard_alt", action_name):
|
||||||
if action == action_name:
|
|
||||||
action_found = true
|
|
||||||
var event = get_event_with_modifier_from_string( config.get_value("joypad", action_name), "joypad")
|
|
||||||
for old_event in InputMap.get_action_list( action_name ):
|
|
||||||
if old_event is InputEventJoypadButton:
|
|
||||||
InputMap.action_erase_event(action_name, old_event)
|
|
||||||
InputMap.action_add_event(action_name, event)
|
|
||||||
|
|
||||||
if not action_found:
|
|
||||||
for event in InputMap.get_action_list( action_name ):
|
for event in InputMap.get_action_list( action_name ):
|
||||||
if event is InputEventJoypadButton:
|
if not is_first and event is InputEventKey:
|
||||||
var joy_button_name = Input.get_joy_button_string( event.button_index )
|
var scancode = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||||
config.set_value("joypad", action_name, joy_button_name)
|
config.set_value("keyboard_alt", action_name, scancode)
|
||||||
|
break
|
||||||
|
is_first = false
|
||||||
|
|
||||||
|
|
||||||
|
# On efface toutes les touches de clavier de l'InputMap correspondants à l'action en cours.
|
||||||
|
for old_event in InputMap.get_action_list( action_name ):
|
||||||
|
if old_event is InputEventKey:
|
||||||
|
InputMap.action_erase_event(action_name, old_event)
|
||||||
|
|
||||||
|
# on recupere les touches du fichier de config et on les ajoutes à l'input map.
|
||||||
|
if config.has_section("keyboard"):
|
||||||
|
var action_found = false
|
||||||
|
for action in config.get_section_keys("keyboard"):
|
||||||
|
if action == action_name:
|
||||||
|
action_found = true
|
||||||
|
var event = get_event_with_modifier_from_string( config.get_value("keyboard", action_name), "keyboard")
|
||||||
|
InputMap.action_add_event(action_name, event)
|
||||||
|
break
|
||||||
|
# if not action_found:
|
||||||
|
# for event in InputMap.get_action_list( action_name ):
|
||||||
|
# if event is InputEventKey:
|
||||||
|
# var scancode = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||||
|
# config.set_value("keyboard", action_name, scancode)
|
||||||
|
|
||||||
|
if config.has_section("keyboard_alt"):
|
||||||
|
var action_found = false
|
||||||
|
for action in config.get_section_keys("keyboard_alt"):
|
||||||
|
if action == action_name:
|
||||||
|
action_found = true
|
||||||
|
var event = get_event_with_modifier_from_string( config.get_value("keyboard_alt", action_name), "keyboard")
|
||||||
|
InputMap.action_add_event(action_name, event)
|
||||||
|
break
|
||||||
|
# if not action_found:
|
||||||
|
# for event in InputMap.get_action_list( action_name ):
|
||||||
|
# if event is InputEventKey:
|
||||||
|
# var scancode = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||||
|
# config.set_value("keyboard_alt", action_name, scancode)
|
||||||
|
|
||||||
|
|
||||||
|
if config.has_section("joypad"):
|
||||||
|
var action_found = false
|
||||||
|
for action in config.get_section_keys("joypad"):
|
||||||
|
if action == action_name:
|
||||||
|
action_found = true
|
||||||
|
var event = get_event_with_modifier_from_string( config.get_value("joypad", action_name), "joypad")
|
||||||
|
for old_event in InputMap.get_action_list( action_name ):
|
||||||
|
if old_event is InputEventJoypadButton:
|
||||||
|
InputMap.action_erase_event(action_name, old_event)
|
||||||
|
InputMap.action_add_event(action_name, event)
|
||||||
|
|
||||||
|
if not action_found:
|
||||||
|
for event in InputMap.get_action_list( action_name ):
|
||||||
|
if event is InputEventJoypadButton:
|
||||||
|
var joy_button_name = Input.get_joy_button_string( event.button_index )
|
||||||
|
config.set_value("joypad", action_name, joy_button_name)
|
||||||
|
|
||||||
config.save( config_file )
|
config.save( config_file )
|
||||||
|
|
||||||
|
@ -122,8 +208,12 @@ func save_to_config(section, key, value):
|
||||||
|
|
||||||
# Input management
|
# Input management
|
||||||
func wait_for_input():
|
func wait_for_input():
|
||||||
|
current_keyboard = $keyboard
|
||||||
set_process_input(true)
|
set_process_input(true)
|
||||||
|
|
||||||
|
func wait_for_input_alt():
|
||||||
|
current_keyboard = $keyboard_alt
|
||||||
|
set_process_input(true)
|
||||||
# Input management
|
# Input management
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
|
@ -139,23 +229,30 @@ func _input(event):
|
||||||
get_tree().set_input_as_handled()
|
get_tree().set_input_as_handled()
|
||||||
set_process_input( false )
|
set_process_input( false )
|
||||||
|
|
||||||
$keyboard.text = ""
|
current_keyboard.text = ""
|
||||||
if event.meta:
|
if event.meta:
|
||||||
$keyboard.text += "Meta+"
|
current_keyboard.text += "Meta+"
|
||||||
if event.control:
|
if event.control:
|
||||||
$keyboard.text += "Control+"
|
current_keyboard.text += "Control+"
|
||||||
if event.alt:
|
if event.alt:
|
||||||
$keyboard.text += "Alt+"
|
current_keyboard.text += "Alt+"
|
||||||
if event.shift:
|
if event.shift:
|
||||||
$keyboard.text += "Shift+"
|
current_keyboard.text += "Shift+"
|
||||||
$keyboard.text += input_string
|
current_keyboard.text += input_string
|
||||||
|
|
||||||
|
|
||||||
|
var key_to_change = 0
|
||||||
|
if current_keyboard.name == "keyboard_alt":
|
||||||
|
key_to_change = 1
|
||||||
|
var current_key = 0
|
||||||
|
|
||||||
for old_event in InputMap.get_action_list( action_name ):
|
for old_event in InputMap.get_action_list( action_name ):
|
||||||
if old_event is InputEventKey:
|
if old_event is InputEventKey and key_to_change == current_key:
|
||||||
InputMap.action_erase_event(action_name, old_event)
|
InputMap.action_erase_event(action_name, old_event)
|
||||||
|
current_key +=1
|
||||||
|
|
||||||
InputMap.action_add_event(action_name, event)
|
InputMap.action_add_event(action_name, event)
|
||||||
save_to_config("keyboard", action_name, $keyboard.text)
|
save_to_config(current_keyboard.name, action_name, current_keyboard.text)
|
||||||
|
|
||||||
elif event is InputEventJoypadButton and not event.pressed and not event.is_echo():
|
elif event is InputEventJoypadButton and not event.pressed and not event.is_echo():
|
||||||
var input_string = Input.get_joy_button_string( event.button_index )
|
var input_string = Input.get_joy_button_string( event.button_index )
|
||||||
|
@ -170,18 +267,3 @@ func _input(event):
|
||||||
InputMap.action_add_event(action_name, event)
|
InputMap.action_add_event(action_name, event)
|
||||||
save_to_config("joypad", action_name, $joypad.text)
|
save_to_config("joypad", action_name, $joypad.text)
|
||||||
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
|
|
||||||
load_from_config()
|
|
||||||
|
|
||||||
for event in InputMap.get_action_list( action_name ):
|
|
||||||
if event is InputEventKey:
|
|
||||||
$keyboard.text = OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
|
||||||
elif event is InputEventJoypadButton:
|
|
||||||
$joypad.text = Input.get_joy_button_string( event.button_index )
|
|
||||||
|
|
||||||
$keyboard.connect( "pressed", self, "wait_for_input" )
|
|
||||||
$joypad.connect( "pressed", self, "wait_for_input" )
|
|
||||||
|
|
||||||
set_process_input(false)
|
|
|
@ -41,6 +41,7 @@ ui_free_cursor=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_
|
||||||
]
|
]
|
||||||
move_up=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
move_up=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null)
|
||||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
move_down=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
move_down=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null)
|
||||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
|
|
@ -24,11 +24,19 @@ func _ready():
|
||||||
|
|
||||||
|
|
||||||
func _on_Refresh_pressed():
|
func _on_Refresh_pressed():
|
||||||
|
var index = 0
|
||||||
for action_name in ACTION_LIST:
|
for action_name in ACTION_LIST:
|
||||||
for event in InputMap.get_action_list( action_name ):
|
for event in InputMap.get_action_list( action_name ):
|
||||||
if event is InputEventKey:
|
if event is InputEventKey:
|
||||||
get_node( "MarginContainer/VBoxContainer" ).get_node( action_name ).text = action_name + ": " + OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
if get_node( "MarginContainer/VBoxContainer" ).has_node( action_name ):
|
||||||
|
get_node( "MarginContainer/VBoxContainer" ).remove_child( get_node( "MarginContainer/VBoxContainer" ).get_node( action_name ) )
|
||||||
|
|
||||||
|
var label = Label.new()
|
||||||
|
label.name = action_name
|
||||||
|
label.text = ACTION_TEXT[ index ] + ": " + OS.get_scancode_string( event.get_scancode_with_modifiers() )
|
||||||
|
$MarginContainer/VBoxContainer.add_child( label )
|
||||||
|
label.set_owner( $MarginContainer/VBoxContainer )
|
||||||
|
index += 1
|
||||||
|
|
||||||
func _input( event ):
|
func _input( event ):
|
||||||
if event.is_action_pressed( "ui_debug_window" ):
|
if event.is_action_pressed( "ui_debug_window" ):
|
||||||
|
|
|
@ -41,7 +41,7 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_right = 135.0
|
margin_right = 85.0
|
||||||
margin_bottom = 82.0
|
margin_bottom = 82.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
|
@ -58,7 +58,7 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_right = 135.0
|
margin_right = 85.0
|
||||||
margin_bottom = 82.0
|
margin_bottom = 82.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
|
@ -80,7 +80,7 @@ anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_left = 4.0
|
margin_left = 4.0
|
||||||
margin_top = 4.0
|
margin_top = 4.0
|
||||||
margin_right = 131.0
|
margin_right = 81.0
|
||||||
margin_bottom = 78.0
|
margin_bottom = 78.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
|
@ -97,7 +97,7 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_right = 127.0
|
margin_right = 77.0
|
||||||
margin_bottom = 14.0
|
margin_bottom = 14.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
|
@ -117,7 +117,7 @@ anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 18.0
|
margin_top = 18.0
|
||||||
margin_right = 127.0
|
margin_right = 77.0
|
||||||
margin_bottom = 32.0
|
margin_bottom = 32.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
|
@ -138,7 +138,7 @@ anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 36.0
|
margin_top = 36.0
|
||||||
margin_right = 127.0
|
margin_right = 77.0
|
||||||
margin_bottom = 50.0
|
margin_bottom = 50.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
|
@ -158,7 +158,7 @@ anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 54.0
|
margin_top = 54.0
|
||||||
margin_right = 127.0
|
margin_right = 77.0
|
||||||
margin_bottom = 74.0
|
margin_bottom = 74.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
|
|
|
@ -148,7 +148,7 @@ use_filter = false
|
||||||
font_data = ExtResource( 2 )
|
font_data = ExtResource( 2 )
|
||||||
_sections_unfolded = [ "Font", "Settings" ]
|
_sections_unfolded = [ "Font", "Settings" ]
|
||||||
|
|
||||||
[node name="Settings" type="MarginContainer"]
|
[node name="Settings" type="MarginContainer" index="0"]
|
||||||
|
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
|
@ -233,6 +233,7 @@ _sections_unfolded = [ "Hint", "Rect", "Size Flags", "Theme", "Visibility", "cus
|
||||||
[node name="Display" type="MarginContainer" parent="Menus/TabContainer" index="0"]
|
[node name="Display" type="MarginContainer" parent="Menus/TabContainer" index="0"]
|
||||||
|
|
||||||
editor/display_folded = true
|
editor/display_folded = true
|
||||||
|
visible = false
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
@ -618,7 +619,6 @@ _sections_unfolded = [ "Size Flags" ]
|
||||||
|
|
||||||
[node name="Controles" type="VBoxContainer" parent="Menus/TabContainer" index="1"]
|
[node name="Controles" type="VBoxContainer" parent="Menus/TabContainer" index="1"]
|
||||||
|
|
||||||
visible = false
|
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
@ -640,7 +640,7 @@ anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_right = 1024.0
|
margin_right = 1024.0
|
||||||
margin_bottom = 445.0
|
margin_bottom = 450.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = true
|
rect_clip_content = true
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
|
@ -661,7 +661,7 @@ anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_right = 1024.0
|
margin_right = 1024.0
|
||||||
margin_bottom = 445.0
|
margin_bottom = 450.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 0
|
mouse_filter = 0
|
||||||
|
@ -679,6 +679,7 @@ _sections_unfolded = [ "Hint", "Size Flags", "custom_colors", "custom_constants"
|
||||||
|
|
||||||
[node name="Jeu" type="VBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer" index="0"]
|
[node name="Jeu" type="VBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer" index="0"]
|
||||||
|
|
||||||
|
visible = false
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
@ -702,7 +703,7 @@ anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 44.0
|
margin_bottom = 39.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
@ -714,9 +715,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "game_flashlight"
|
|
||||||
description = "Active/désactive la lampe torche."
|
description = "Active/désactive la lampe torche."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="hide_char" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Jeu" index="1"]
|
[node name="hide_char" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Jeu" index="1"]
|
||||||
|
|
||||||
|
@ -724,8 +727,9 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
|
margin_top = 43.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 44.0
|
margin_bottom = 82.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
@ -737,13 +741,14 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "hide_char"
|
|
||||||
description = "Affiche/cache le personnage."
|
description = "Affiche/cache le personnage."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="Interface" type="VBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer" index="1"]
|
[node name="Interface" type="VBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer" index="1"]
|
||||||
|
|
||||||
editor/display_folded = true
|
|
||||||
visible = false
|
visible = false
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
|
@ -866,9 +871,11 @@ _sections_unfolded = [ "Focus" ]
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "ui_test"
|
|
||||||
description = "Test."
|
description = "Test."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="ui_pause" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Interface" index="2"]
|
[node name="ui_pause" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Interface" index="2"]
|
||||||
|
|
||||||
|
@ -890,9 +897,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "ui_pause"
|
|
||||||
description = "Play/Pause."
|
description = "Play/Pause."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="ui_reload" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Interface" index="3"]
|
[node name="ui_reload" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Interface" index="3"]
|
||||||
|
|
||||||
|
@ -914,9 +923,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "ui_reload"
|
|
||||||
description = "Recharger la scène."
|
description = "Recharger la scène."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="ui_free_cursor" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Interface" index="4"]
|
[node name="ui_free_cursor" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Interface" index="4"]
|
||||||
|
|
||||||
|
@ -938,9 +949,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "ui_free_cursor"
|
|
||||||
description = "Libéré/capturer le curseur."
|
description = "Libéré/capturer le curseur."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="ui_quit" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Interface" index="5"]
|
[node name="ui_quit" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Interface" index="5"]
|
||||||
|
|
||||||
|
@ -962,13 +975,14 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "ui_quit"
|
|
||||||
description = "Quitter."
|
description = "Quitter."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="Deplacement" type="VBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer" index="2"]
|
[node name="Deplacement" type="VBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer" index="2"]
|
||||||
|
|
||||||
visible = false
|
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
@ -994,7 +1008,7 @@ anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 42.0
|
margin_bottom = 37.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
@ -1010,7 +1024,7 @@ anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_right = 338.0
|
margin_right = 338.0
|
||||||
margin_bottom = 42.0
|
margin_bottom = 37.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
@ -1034,7 +1048,7 @@ anchor_bottom = 0.0
|
||||||
margin_left = 342.0
|
margin_left = 342.0
|
||||||
margin_top = 2.0
|
margin_top = 2.0
|
||||||
margin_right = 680.0
|
margin_right = 680.0
|
||||||
margin_bottom = 40.0
|
margin_bottom = 35.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
@ -1057,7 +1071,7 @@ anchor_bottom = 0.0
|
||||||
margin_left = 684.0
|
margin_left = 684.0
|
||||||
margin_top = 2.0
|
margin_top = 2.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 40.0
|
margin_bottom = 35.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
@ -1077,9 +1091,9 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 46.0
|
margin_top = 41.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 90.0
|
margin_bottom = 80.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
@ -1091,9 +1105,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "move_up"
|
|
||||||
description = "Avancer."
|
description = "Avancer."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="move_down" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="2"]
|
[node name="move_down" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="2"]
|
||||||
|
|
||||||
|
@ -1101,9 +1117,9 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 94.0
|
margin_top = 84.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 138.0
|
margin_bottom = 123.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
@ -1115,9 +1131,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "move_down"
|
|
||||||
description = "Reculer."
|
description = "Reculer."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="move_left" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="3"]
|
[node name="move_left" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="3"]
|
||||||
|
|
||||||
|
@ -1125,9 +1143,9 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 142.0
|
margin_top = 127.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 186.0
|
margin_bottom = 166.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
@ -1139,9 +1157,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "move_left"
|
|
||||||
description = "Deplacement latéral gauche."
|
description = "Deplacement latéral gauche."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="move_right" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="4"]
|
[node name="move_right" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="4"]
|
||||||
|
|
||||||
|
@ -1149,9 +1169,9 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 190.0
|
margin_top = 170.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 234.0
|
margin_bottom = 209.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
@ -1163,9 +1183,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "move_right"
|
|
||||||
description = "Deplacement latéral droit."
|
description = "Deplacement latéral droit."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="fly_up" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="5"]
|
[node name="fly_up" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="5"]
|
||||||
|
|
||||||
|
@ -1173,9 +1195,9 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 238.0
|
margin_top = 213.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 282.0
|
margin_bottom = 252.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
@ -1187,9 +1209,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "fly_up"
|
|
||||||
description = "Deplacement vers le haut."
|
description = "Deplacement vers le haut."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="fly_down" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="6"]
|
[node name="fly_down" type="HBoxContainer" parent="Menus/TabContainer/Controles/ScrollContainer/TabContainer/Deplacement" index="6"]
|
||||||
|
|
||||||
|
@ -1197,9 +1221,9 @@ anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
anchor_bottom = 0.0
|
anchor_bottom = 0.0
|
||||||
margin_top = 286.0
|
margin_top = 256.0
|
||||||
margin_right = 1022.0
|
margin_right = 1022.0
|
||||||
margin_bottom = 330.0
|
margin_bottom = 295.0
|
||||||
rect_pivot_offset = Vector2( 0, 0 )
|
rect_pivot_offset = Vector2( 0, 0 )
|
||||||
rect_clip_content = false
|
rect_clip_content = false
|
||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
@ -1211,9 +1235,11 @@ script = ExtResource( 3 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_editor_icon": ExtResource( 4 )
|
"_editor_icon": ExtResource( 4 )
|
||||||
}
|
}
|
||||||
action_name = "fly_down"
|
|
||||||
description = "Deplacement vers le bas."
|
description = "Deplacement vers le bas."
|
||||||
config_file = "user://input.cfg"
|
config_file = "user://input.cfg"
|
||||||
|
default_keyboard = null
|
||||||
|
default_keyboard_alt = null
|
||||||
|
default_joypad = null
|
||||||
|
|
||||||
[node name="ResetButton" type="Button" parent="Menus/TabContainer/Controles" index="1"]
|
[node name="ResetButton" type="Button" parent="Menus/TabContainer/Controles" index="1"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue