You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Rename ButtonList enum and members to MouseButton
This commit is contained in:
@@ -142,7 +142,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
|
||||
|
||||
switch (mode) {
|
||||
case MODE_CREATE: {
|
||||
if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_LEFT && mb->is_pressed()) {
|
||||
if (!wip_active) {
|
||||
wip.clear();
|
||||
wip.push_back(cpoint);
|
||||
@@ -166,14 +166,14 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && wip_active) {
|
||||
} else if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed() && wip_active) {
|
||||
_wip_close();
|
||||
}
|
||||
|
||||
} break;
|
||||
|
||||
case MODE_EDIT: {
|
||||
if (mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_LEFT) {
|
||||
if (mb->is_pressed()) {
|
||||
if (mb->get_control()) {
|
||||
if (poly.size() < 3) {
|
||||
@@ -267,7 +267,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && edited_point == -1) {
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_RIGHT && mb->is_pressed() && edited_point == -1) {
|
||||
int closest_idx = -1;
|
||||
Vector2 closest_pos;
|
||||
real_t closest_dist = 1e10;
|
||||
@@ -301,7 +301,7 @@ bool CollisionPolygon3DEditor::forward_spatial_gui_input(Camera3D *p_camera, con
|
||||
Ref<InputEventMouseMotion> mm = p_event;
|
||||
|
||||
if (mm.is_valid()) {
|
||||
if (edited_point != -1 && (wip_active || mm->get_button_mask() & BUTTON_MASK_LEFT)) {
|
||||
if (edited_point != -1 && (wip_active || mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT)) {
|
||||
Vector2 gpoint = mm->get_position();
|
||||
|
||||
Vector3 ray_from = p_camera->project_ray_origin(gpoint);
|
||||
|
||||
Reference in New Issue
Block a user