mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Rename ButtonList enum and members to MouseButton
This commit is contained in:
@@ -53,7 +53,7 @@ void Slider::_gui_input(Ref<InputEvent> p_event) {
|
||||
Ref<InputEventMouseButton> mb = p_event;
|
||||
|
||||
if (mb.is_valid()) {
|
||||
if (mb->get_button_index() == BUTTON_LEFT) {
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_LEFT) {
|
||||
if (mb->is_pressed()) {
|
||||
Ref<Texture2D> grabber = get_theme_icon(mouse_inside || has_focus() ? "grabber_highlight" : "grabber");
|
||||
grab.pos = orientation == VERTICAL ? mb->get_position().y : mb->get_position().x;
|
||||
@@ -72,10 +72,10 @@ void Slider::_gui_input(Ref<InputEvent> p_event) {
|
||||
grab.active = false;
|
||||
}
|
||||
} else if (scrollable) {
|
||||
if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_UP) {
|
||||
if (mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP) {
|
||||
grab_focus();
|
||||
set_value(get_value() + get_step());
|
||||
} else if (mb->is_pressed() && mb->get_button_index() == BUTTON_WHEEL_DOWN) {
|
||||
} else if (mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN) {
|
||||
grab_focus();
|
||||
set_value(get_value() - get_step());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user