diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-09-26 18:01:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-26 18:01:20 +0800 |
commit | b73b089baa61b86f381e411fd8fe90a4095c24a8 (patch) | |
tree | 4c6344798c181a9003f2446cb43575236d241c5f /indra/newview/llpreviewgesture.cpp | |
parent | 91a815647dd24233f5ecbf38f58d67e7c9f32d9d (diff) | |
parent | 293778139d062732cd670ff2fa6c7061b4220460 (diff) |
Merge pull request #13 from gwigz/more-gesture-keys
LLPreviewGesture adjusted to display more keys
Diffstat (limited to 'indra/newview/llpreviewgesture.cpp')
-rw-r--r-- | indra/newview/llpreviewgesture.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 7cbbb89313..ddab98b07d 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -505,9 +505,17 @@ void LLPreviewGesture::addKeys() LLComboBox* combo = mKeyCombo; combo->add( NONE_LABEL ); - for (KEY key = KEY_F2; key <= KEY_F12; key++) + for (KEY key = ' '; key < KEY_NONE; key++) { - combo->add( LLKeyboard::stringFromKey(key), ADD_BOTTOM ); + char buffer[] = { (char)key, '\0' }; + std::string str_org(buffer); + std::string str_translated = LLKeyboard::stringFromKey(key); + + if (str_org == str_translated) + { + if (key >= ' ' && key <= '~') combo->add(str_translated, ADD_BOTTOM); + } + else combo->add(str_translated, ADD_BOTTOM); } combo->setCurrentByIndex(0); } |