mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-21 13:16:49 +01:00
The ui will now reflect axis constaint state.
This commit is contained in:
parent
81bfa4b6bd
commit
34f080e03e
@ -29,14 +29,41 @@ func _unhandled_key_input(event : InputEventKey) -> void:
|
|||||||
#rotate
|
#rotate
|
||||||
set_edit_mode_rotate()
|
set_edit_mode_rotate()
|
||||||
elif event.scancode == KEY_X:
|
elif event.scancode == KEY_X:
|
||||||
if plugin:
|
set_axis_x(!get_axis_x())
|
||||||
plugin.set_axis_x(event.pressed)
|
|
||||||
elif event.scancode == KEY_Y:
|
elif event.scancode == KEY_Y:
|
||||||
if plugin:
|
set_axis_y(!get_axis_y())
|
||||||
plugin.set_axis_y(event.pressed)
|
|
||||||
elif event.scancode == KEY_Z:
|
elif event.scancode == KEY_Z:
|
||||||
|
set_axis_z(!get_axis_z())
|
||||||
|
|
||||||
|
func get_axis_x() -> bool:
|
||||||
|
return $VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer2/AxisX.pressed
|
||||||
|
|
||||||
|
func get_axis_y() -> bool:
|
||||||
|
return $VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer2/AxisY.pressed
|
||||||
|
|
||||||
|
func get_axis_z() -> bool:
|
||||||
|
return $VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer2/AxisZ.pressed
|
||||||
|
|
||||||
|
func set_axis_x(on : bool) -> void:
|
||||||
|
$VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer2/AxisX.pressed = on
|
||||||
|
|
||||||
|
func set_axis_y(on : bool) -> void:
|
||||||
|
$VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer2/AxisY.pressed = on
|
||||||
|
|
||||||
|
func set_axis_z(on : bool) -> void:
|
||||||
|
$VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer2/AxisZ.pressed = on
|
||||||
|
|
||||||
|
func on_axis_x_toggled(on : bool) -> void:
|
||||||
if plugin:
|
if plugin:
|
||||||
plugin.set_axis_z(event.pressed)
|
plugin.set_axis_x(on)
|
||||||
|
|
||||||
|
func on_axis_y_toggled(on : bool) -> void:
|
||||||
|
if plugin:
|
||||||
|
plugin.set_axis_y(on)
|
||||||
|
|
||||||
|
func on_axis_z_toggled(on : bool) -> void:
|
||||||
|
if plugin:
|
||||||
|
plugin.set_axis_z(on)
|
||||||
|
|
||||||
func set_edit_mode_translate() -> void:
|
func set_edit_mode_translate() -> void:
|
||||||
$VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer/Translate.pressed = true
|
$VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer/Translate.pressed = true
|
||||||
|
@ -284,6 +284,9 @@ script = ExtResource( 3 )
|
|||||||
[connection signal="toggled" from="VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer/Translate" to="." method="on_edit_mode_translate_toggled"]
|
[connection signal="toggled" from="VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer/Translate" to="." method="on_edit_mode_translate_toggled"]
|
||||||
[connection signal="toggled" from="VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer/Rotate" to="." method="on_edit_mode_rotate_toggled"]
|
[connection signal="toggled" from="VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer/Rotate" to="." method="on_edit_mode_rotate_toggled"]
|
||||||
[connection signal="toggled" from="VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer/Scale" to="." method="on_edit_mode_scale_toggled"]
|
[connection signal="toggled" from="VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer/Scale" to="." method="on_edit_mode_scale_toggled"]
|
||||||
|
[connection signal="toggled" from="VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer2/AxisX" to="." method="on_axis_x_toggled"]
|
||||||
|
[connection signal="toggled" from="VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer2/AxisY" to="." method="on_axis_y_toggled"]
|
||||||
|
[connection signal="toggled" from="VBoxContainer/Actions/Actions/VBoxContainer2/HBoxContainer2/AxisZ" to="." method="on_axis_z_toggled"]
|
||||||
[connection signal="pressed" from="VBoxContainer/Operations/Operations/Extrude" to="." method="_on_Extrude_pressed"]
|
[connection signal="pressed" from="VBoxContainer/Operations/Operations/Extrude" to="." method="_on_Extrude_pressed"]
|
||||||
[connection signal="pressed" from="VBoxContainer/Operations/Operations/UnwrapButton" to="." method="_on_UnwrapButton_pressed"]
|
[connection signal="pressed" from="VBoxContainer/Operations/Operations/UnwrapButton" to="." method="_on_UnwrapButton_pressed"]
|
||||||
[connection signal="pressed" from="VBoxContainer/Add/Add/AddBox" to="." method="_on_AddBox_pressed"]
|
[connection signal="pressed" from="VBoxContainer/Add/Add/AddBox" to="." method="_on_AddBox_pressed"]
|
||||||
|
Loading…
Reference in New Issue
Block a user