You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods
This commit is contained in:
@@ -98,7 +98,7 @@ void ScrollContainer::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
if (mb.is_valid()) {
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_UP && mb->is_pressed()) {
|
||||
// only horizontal is enabled, scroll horizontally
|
||||
if (h_scroll->is_visible() && (!v_scroll->is_visible() || mb->get_shift())) {
|
||||
if (h_scroll->is_visible() && (!v_scroll->is_visible() || mb->is_shift_pressed())) {
|
||||
h_scroll->set_value(h_scroll->get_value() - h_scroll->get_page() / 8 * mb->get_factor());
|
||||
} else if (v_scroll->is_visible_in_tree()) {
|
||||
v_scroll->set_value(v_scroll->get_value() - v_scroll->get_page() / 8 * mb->get_factor());
|
||||
@@ -107,7 +107,7 @@ void ScrollContainer::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
|
||||
if (mb->get_button_index() == MOUSE_BUTTON_WHEEL_DOWN && mb->is_pressed()) {
|
||||
// only horizontal is enabled, scroll horizontally
|
||||
if (h_scroll->is_visible() && (!v_scroll->is_visible() || mb->get_shift())) {
|
||||
if (h_scroll->is_visible() && (!v_scroll->is_visible() || mb->is_shift_pressed())) {
|
||||
h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() / 8 * mb->get_factor());
|
||||
} else if (v_scroll->is_visible()) {
|
||||
v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() / 8 * mb->get_factor());
|
||||
|
||||
Reference in New Issue
Block a user