mirror of
https://github.com/godotengine/godot.git
synced 2025-10-31 21:51:22 +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
|
|
@ -105,7 +105,7 @@ void SpriteFramesEditor::_sheet_preview_draw() {
|
|||
void SpriteFramesEditor::_sheet_preview_input(const Ref<InputEvent> &p_event) {
|
||||
Ref<InputEventMouseButton> mb = p_event;
|
||||
|
||||
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
|
||||
Size2i size = split_sheet_preview->get_size();
|
||||
int h = split_sheet_h->get_value();
|
||||
int v = split_sheet_v->get_value();
|
||||
|
|
@ -150,11 +150,11 @@ void SpriteFramesEditor::_sheet_scroll_input(const Ref<InputEvent> &p_event) {
|
|||
// Zoom in/out using Ctrl + mouse wheel. This is done on the ScrollContainer
|
||||
// to allow performing this action anywhere, even if the cursor isn't
|
||||
// hovering the texture in the workspace.
|
||||
if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed() && mb->get_control()) {
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_pressed() && mb->get_control()) {
|
||||
_sheet_zoom_in();
|
||||
// Don't scroll up after zooming in.
|
||||
accept_event();
|
||||
} else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed() && mb->get_control()) {
|
||||
} else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_pressed() && mb->get_control()) {
|
||||
_sheet_zoom_out();
|
||||
// Don't scroll down after zooming out.
|
||||
accept_event();
|
||||
|
|
@ -694,11 +694,11 @@ void SpriteFramesEditor::_tree_input(const Ref<InputEvent> &p_event) {
|
|||
const Ref<InputEventMouseButton> mb = p_event;
|
||||
|
||||
if (mb.is_valid()) {
|
||||
if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed() && mb->get_control()) {
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_pressed() && mb->get_control()) {
|
||||
_zoom_in();
|
||||
// Don't scroll up after zooming in.
|
||||
accept_event();
|
||||
} else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed() && mb->get_control()) {
|
||||
} else if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_pressed() && mb->get_control()) {
|
||||
_zoom_out();
|
||||
// Don't scroll down after zooming out.
|
||||
accept_event();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue