18 lines
		
	
	
	
		
			460 B
		
	
	
	
		
			GDScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
	
		
			460 B
		
	
	
	
		
			GDScript
		
	
	
	
	
	
extends Panel
 | 
						|
 | 
						|
@export var thisTab = 2
 | 
						|
 | 
						|
func _ready() -> void:
 | 
						|
	$SensSlider.value = GlobalVariables.mouse_sens
 | 
						|
	$SensSlider/CurrentLabel.text = str(GlobalVariables.mouse_sens)
 | 
						|
 | 
						|
func _on_tab_bar_tab_changed(tab: int) -> void:
 | 
						|
	if (thisTab == tab):
 | 
						|
		visible = true
 | 
						|
	else:
 | 
						|
		visible = false
 | 
						|
 | 
						|
func _on_sens_slider_value_changed(value: float) -> void:
 | 
						|
	GlobalVariables.mouse_sens = value
 | 
						|
	$SensSlider/CurrentLabel.text = str(value)
 | 
						|
	GlobalVariables.updateConfig()
 |