diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-03-12 16:52:30 +0100 |
---|---|---|
committer | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-03-12 16:52:30 +0100 |
commit | eb1ed3896fd82d4f115b2ef6ba742315ad32cc27 (patch) | |
tree | 110015e1703b331715fbf7fb1a01639c74c47e62 /indra/llui/llscrollcontainer.cpp | |
parent | 748c0eb50d87a3f8895b25791409ce5e2e4926c4 (diff) | |
parent | afc943acbc2bb79e2e1aa5d5eaf448e01b6c2b00 (diff) |
Merge branch 'main' of https://github.com/secondlife/viewer into DRTVWR-600-maint-A
# Conflicts:
# autobuild.xml
# indra/llrender/llfontbitmapcache.cpp
# indra/llrender/llfontbitmapcache.h
# indra/llrender/llfontfreetype.cpp
# indra/llrender/llfontfreetype.h
# indra/llrender/llfontgl.cpp
# indra/llrender/llfontgl.h
# indra/llui/llbutton.h
# indra/llui/llfloater.cpp
# indra/llui/llfloater.h
# indra/llui/llfolderviewitem.cpp
# indra/llui/lllineeditor.cpp
# indra/llui/lllineeditor.h
# indra/llui/llscrollcontainer.cpp
# indra/llui/llscrollingpanellist.cpp
# indra/llui/llscrollingpanellist.h
# indra/llui/llscrolllistctrl.h
# indra/llui/lltextbase.cpp
# indra/llui/lltextbase.h
# indra/llui/lltexteditor.cpp
# indra/llui/lltexteditor.h
# indra/llui/lluictrl.cpp
# indra/llui/llview.cpp
# indra/llui/llview.h
# indra/newview/llchicletbar.h
# indra/newview/llconversationlog.h
# indra/newview/llfloaterimsessiontab.cpp
# indra/newview/llfloaterimsessiontab.h
# indra/newview/llfloateruipreview.cpp
# indra/newview/llnavigationbar.h
# indra/newview/llpaneltopinfobar.h
# indra/newview/llpathfindingpathtool.h
# indra/newview/lltextureview.cpp
# indra/newview/lltoolbrush.h
# indra/newview/lltoolcomp.h
# indra/newview/lltooldraganddrop.h
# indra/newview/lltoolface.h
# indra/newview/lltoolfocus.h
# indra/newview/lltoolindividual.h
# indra/newview/lltoolobjpicker.h
# indra/newview/lltoolpie.h
# indra/newview/lltoolpipette.h
# indra/newview/lltoolselectland.h
# indra/newview/llviewermediafocus.h
# indra/newview/llviewerparcelmediaautoplay.h
# indra/newview/llviewerwindow.cpp
# indra/newview/llvoicechannel.h
# indra/newview/llvoicevivox.h
# indra/newview/llworldmapview.cpp
Diffstat (limited to 'indra/llui/llscrollcontainer.cpp')
-rw-r--r-- | indra/llui/llscrollcontainer.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 09e8fd1f84..5aba44c2b5 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -70,6 +70,7 @@ LLScrollContainer::Params::Params() bg_color("color"), border_visible("border_visible"), hide_scrollbar("hide_scrollbar"), + ignore_arrow_keys("ignore_arrow_keys"), min_auto_scroll_rate("min_auto_scroll_rate", 100), max_auto_scroll_rate("max_auto_scroll_rate", 1000), max_auto_scroll_zone("max_auto_scroll_zone", 16), @@ -86,6 +87,7 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p) mBackgroundColor(p.bg_color()), mIsOpaque(p.is_opaque), mHideScrollbar(p.hide_scrollbar), + mIgnoreArrowKeys(p.ignore_arrow_keys), mReserveScrollCorner(p.reserve_scroll_corner), mMinAutoScrollRate(p.min_auto_scroll_rate), mMaxAutoScrollRate(p.max_auto_scroll_rate), @@ -204,10 +206,29 @@ void LLScrollContainer::reshape(S32 width, S32 height, } } +// virtual bool LLScrollContainer::handleKeyHere(KEY key, MASK mask) { + if (mIgnoreArrowKeys) + { + switch(key) + { + case KEY_LEFT: + case KEY_RIGHT: + case KEY_UP: + case KEY_DOWN: + case KEY_PAGE_UP: + case KEY_PAGE_DOWN: + case KEY_HOME: + case KEY_END: + return false; + default: + break; + } + } + // allow scrolled view to handle keystrokes in case it delegated keyboard focus - // to the scroll container. + // to the scroll container. // NOTE: this should not recurse indefinitely as handleKeyHere // should not propagate to parent controls, so mScrolledView should *not* // call LLScrollContainer::handleKeyHere in turn |