mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Rename ButtonList enum and members to MouseButton
This commit is contained in:
parent
70eff30c5f
commit
10d7fccb54
75 changed files with 468 additions and 473 deletions
|
@ -79,7 +79,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
|
|||
|
||||
Ref<InputEventMouseButton> mb = p_event;
|
||||
|
||||
if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == BUTTON_RIGHT) || (mb->get_button_index() == BUTTON_LEFT && tool_create->is_pressed()))) {
|
||||
if (mb.is_valid() && mb->is_pressed() && ((tool_select->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_RIGHT) || (mb->get_button_index() == MOUSE_BUTTON_LEFT && tool_create->is_pressed()))) {
|
||||
menu->clear();
|
||||
animations_menu->clear();
|
||||
animations_to_add.clear();
|
||||
|
@ -134,7 +134,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
|
|||
}
|
||||
}
|
||||
|
||||
if (mb.is_valid() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb.is_valid() && mb->is_pressed() && tool_select->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
|
||||
blend_space_draw->update(); //update anyway
|
||||
//try to see if a point can be selected
|
||||
selected_point = -1;
|
||||
|
@ -174,7 +174,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
|
|||
}
|
||||
}
|
||||
|
||||
if (mb.is_valid() && mb->is_pressed() && tool_triangle->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb.is_valid() && mb->is_pressed() && tool_triangle->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
|
||||
blend_space_draw->update(); //update anyway
|
||||
//try to see if a point can be selected
|
||||
selected_point = -1;
|
||||
|
@ -209,7 +209,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
|
|||
}
|
||||
}
|
||||
|
||||
if (mb.is_valid() && !mb->is_pressed() && dragging_selected_attempt && mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb.is_valid() && !mb->is_pressed() && dragging_selected_attempt && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
|
||||
if (dragging_selected) {
|
||||
//move
|
||||
Vector2 point = blend_space->get_blend_point_position(selected_point);
|
||||
|
@ -236,7 +236,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
|
|||
blend_space_draw->update();
|
||||
}
|
||||
|
||||
if (mb.is_valid() && mb->is_pressed() && tool_blend->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb.is_valid() && mb->is_pressed() && tool_blend->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
|
||||
Vector2 blend_pos = (mb->get_position() / blend_space_draw->get_size());
|
||||
blend_pos.y = 1.0 - blend_pos.y;
|
||||
blend_pos *= (blend_space->get_max_space() - blend_space->get_min_space());
|
||||
|
@ -270,7 +270,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
|
|||
blend_space_draw->update();
|
||||
}
|
||||
|
||||
if (mm.is_valid() && tool_blend->is_pressed() && mm->get_button_mask() & BUTTON_MASK_LEFT) {
|
||||
if (mm.is_valid() && tool_blend->is_pressed() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) {
|
||||
Vector2 blend_pos = (mm->get_position() / blend_space_draw->get_size());
|
||||
blend_pos.y = 1.0 - blend_pos.y;
|
||||
blend_pos *= (blend_space->get_max_space() - blend_space->get_min_space());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue