fix map change config load value and show player keys in menu
This commit is contained in:
parent
c12f3a3883
commit
8efe7f7bac
3 changed files with 7 additions and 3 deletions
|
@ -105,7 +105,6 @@ offset_right = 517.0
|
||||||
offset_bottom = 637.245
|
offset_bottom = 637.245
|
||||||
|
|
||||||
[node name="VBoxContainer_Playerlist" type="VBoxContainer" parent="MenuDisplay/MarginContainer"]
|
[node name="VBoxContainer_Playerlist" type="VBoxContainer" parent="MenuDisplay/MarginContainer"]
|
||||||
visible = false
|
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme = SubResource("Theme_eo4i1")
|
theme = SubResource("Theme_eo4i1")
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ var carpreset="normal"
|
||||||
|
|
||||||
var remove_cars_timeout=true
|
var remove_cars_timeout=true
|
||||||
|
|
||||||
var automatic_map_change_after=2
|
var automatic_map_change_after=-1 #-1 to load config value initally
|
||||||
var automatic_map_change_in=automatic_map_change_after #change map when this reaches 0
|
var automatic_map_change_in=automatic_map_change_after #change map when this reaches 0
|
||||||
|
|
||||||
var colorwheelstep:float=0.3
|
var colorwheelstep:float=0.3
|
||||||
|
@ -47,6 +47,8 @@ func setCarPreset(p:String):
|
||||||
|
|
||||||
func setAutomaticMapChangeAfter(v):
|
func setAutomaticMapChangeAfter(v):
|
||||||
automatic_map_change_after=max(v,0)
|
automatic_map_change_after=max(v,0)
|
||||||
|
if automatic_map_change_in==-1:
|
||||||
|
automatic_map_change_in=automatic_map_change_after #initial value
|
||||||
|
|
||||||
func getSelectedMap(): #return only short map name "00"
|
func getSelectedMap(): #return only short map name "00"
|
||||||
return map_scene_name
|
return map_scene_name
|
||||||
|
|
|
@ -6,7 +6,7 @@ const MAX_OUTLINESIZE=60
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$MapChangeInfo.text="Mapchange in "+str(Gamestate.automatic_map_change_in)
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
@ -60,3 +60,6 @@ func _process(delta: float) -> void:
|
||||||
var outlinesize=max(0,label.get_theme_constant("outline_size")-2*delta)
|
var outlinesize=max(0,label.get_theme_constant("outline_size")-2*delta)
|
||||||
label.add_theme_constant_override("outline_size",outlinesize)
|
label.add_theme_constant_override("outline_size",outlinesize)
|
||||||
|
|
||||||
|
|
||||||
|
$MapChangeInfo.text="Mapchange in "+str(Gamestate.automatic_map_change_in)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue