You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Rename ButtonList enum and members to MouseButton
This commit is contained in:
@@ -447,7 +447,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
|
||||
Ref<InputEventMouseButton> mb = p_input;
|
||||
|
||||
if (mb.is_valid()) {
|
||||
if (mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_LEFT) {
|
||||
if (mb->is_pressed()) {
|
||||
uv_drag_from = snap_point(Vector2(mb->get_position().x, mb->get_position().y));
|
||||
uv_drag = true;
|
||||
@@ -759,7 +759,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
|
||||
bone_painting = false;
|
||||
}
|
||||
}
|
||||
} else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed()) {
|
||||
} else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed()) {
|
||||
_cancel_editing();
|
||||
|
||||
if (bone_painting) {
|
||||
@@ -768,9 +768,9 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
|
||||
|
||||
uv_edit_draw->update();
|
||||
|
||||
} else if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed()) {
|
||||
} else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_pressed()) {
|
||||
uv_zoom->set_value(uv_zoom->get_value() / (1 - (0.1 * mb->get_factor())));
|
||||
} else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed()) {
|
||||
} else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_pressed()) {
|
||||
uv_zoom->set_value(uv_zoom->get_value() * (1 - (0.1 * mb->get_factor())));
|
||||
}
|
||||
}
|
||||
@@ -778,7 +778,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
|
||||
Ref<InputEventMouseMotion> mm = p_input;
|
||||
|
||||
if (mm.is_valid()) {
|
||||
if ((mm->get_button_mask() & BUTTON_MASK_MIDDLE) || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
|
||||
if ((mm->get_button_mask() & MOUSE_BUTTON_MASK_MIDDLE) || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
|
||||
Vector2 drag(mm->get_relative().x, mm->get_relative().y);
|
||||
uv_hscroll->set_value(uv_hscroll->get_value() - drag.x);
|
||||
uv_vscroll->set_value(uv_vscroll->get_value() - drag.y);
|
||||
|
||||
Reference in New Issue
Block a user