summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorIan <ianb96@gmail.com>2018-01-03 17:21:54 -0500
committerIan <ianb96@gmail.com>2018-01-03 17:21:54 -0500
commitae6b7c0b419d59d2e24a3f049c69510e44fa82ce (patch)
treead38d3c1073c1fb9f592042c091dac5f10aeb1b6 /scene
parent2c226e4edf720ebbadf355e244b27082ca01f330 (diff)
TextEdit horizontal scrolling with shift
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 2ce31ea1b3..dde274e55e 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1822,10 +1822,18 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
if (mb->is_pressed()) {
if (mb->get_button_index() == BUTTON_WHEEL_UP && !mb->get_command()) {
- _scroll_up(3 * mb->get_factor());
+ if (mb->get_shift()) {
+ h_scroll->set_value(h_scroll->get_value() - (100 * mb->get_factor()));
+ } else {
+ _scroll_up(3 * mb->get_factor());
+ }
}
if (mb->get_button_index() == BUTTON_WHEEL_DOWN && !mb->get_command()) {
- _scroll_down(3 * mb->get_factor());
+ if (mb->get_shift()) {
+ h_scroll->set_value(h_scroll->get_value() + (100 * mb->get_factor()));
+ } else {
+ _scroll_down(3 * mb->get_factor());
+ }
}
if (mb->get_button_index() == BUTTON_WHEEL_LEFT) {
h_scroll->set_value(h_scroll->get_value() - (100 * mb->get_factor()));