mirror of
https://port.numenaute.org/aleajactaest/khanat-client.git
synced 2024-11-10 01:10:05 +00:00
29 lines
944 B
GDScript
29 lines
944 B
GDScript
extends WindowDialog
|
|
|
|
var old_mouse_position = Vector2( 0, 0 )
|
|
|
|
|
|
func _on_stats_window_gui_input(event):
|
|
|
|
if event is InputEventMouseButton and event.button_index == BUTTON_LEFT and Input.is_mouse_button_pressed( BUTTON_LEFT ):
|
|
self.old_mouse_position = event.position
|
|
|
|
if event is InputEventMouseMotion and Input.is_mouse_button_pressed( BUTTON_LEFT ):
|
|
var delta = self.old_mouse_position - event.position
|
|
self.set_position( self.get_position() - delta )
|
|
|
|
|
|
func update_trauma():
|
|
$trauma.value = ($oubli.value+$douleur.value)/2
|
|
|
|
func _on_douleur_value_changed(value):
|
|
$douleur.self_modulate.a = (value / 100.0) * (value / 100.0)
|
|
self.update_trauma()
|
|
|
|
func _on_oubli_value_changed(value):
|
|
$oubli.self_modulate.a = (value / 100.0) * (value / 100.0)
|
|
self.update_trauma()
|
|
|
|
|
|
func _on_trauma_value_changed(value):
|
|
$trauma.self_modulate.a = (value / 100.0) * (value / 100.0)
|