Merge pull request #15308 from ianb96/horizontal_scrolling
TextEdit horizontal scrolling with shift
This commit is contained in:
commit
023c04689e
@ -1822,11 +1822,19 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
|||||||
if (mb->is_pressed()) {
|
if (mb->is_pressed()) {
|
||||||
|
|
||||||
if (mb->get_button_index() == BUTTON_WHEEL_UP && !mb->get_command()) {
|
if (mb->get_button_index() == BUTTON_WHEEL_UP && !mb->get_command()) {
|
||||||
|
if (mb->get_shift()) {
|
||||||
|
h_scroll->set_value(h_scroll->get_value() - (100 * mb->get_factor()));
|
||||||
|
} else {
|
||||||
_scroll_up(3 * mb->get_factor());
|
_scroll_up(3 * mb->get_factor());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (mb->get_button_index() == BUTTON_WHEEL_DOWN && !mb->get_command()) {
|
if (mb->get_button_index() == BUTTON_WHEEL_DOWN && !mb->get_command()) {
|
||||||
|
if (mb->get_shift()) {
|
||||||
|
h_scroll->set_value(h_scroll->get_value() + (100 * mb->get_factor()));
|
||||||
|
} else {
|
||||||
_scroll_down(3 * mb->get_factor());
|
_scroll_down(3 * mb->get_factor());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (mb->get_button_index() == BUTTON_WHEEL_LEFT) {
|
if (mb->get_button_index() == BUTTON_WHEEL_LEFT) {
|
||||||
h_scroll->set_value(h_scroll->get_value() - (100 * mb->get_factor()));
|
h_scroll->set_value(h_scroll->get_value() - (100 * mb->get_factor()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user