diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/llui/llmenugl.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/llui/llmenugl.cpp')
-rw-r--r-- | linden/indra/llui/llmenugl.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index 907777d..f2f2aae 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -58,6 +59,8 @@ | |||
58 | #include "llresmgr.h" | 59 | #include "llresmgr.h" |
59 | #include "llui.h" | 60 | #include "llui.h" |
60 | 61 | ||
62 | #include "lluitrans.h" | ||
63 | |||
61 | #include "llstl.h" | 64 | #include "llstl.h" |
62 | 65 | ||
63 | #include "v2math.h" | 66 | #include "v2math.h" |
@@ -139,7 +142,7 @@ LLMenuItemGL::LLMenuItemGL( const std::string& name, const std::string& label, K | |||
139 | mHighlight( FALSE ), | 142 | mHighlight( FALSE ), |
140 | mGotHover( FALSE ), | 143 | mGotHover( FALSE ), |
141 | mBriefItem( FALSE ), | 144 | mBriefItem( FALSE ), |
142 | mFont( LLFontGL::sSansSerif ), | 145 | mFont( LLFontGL::getFontSansSerif() ), |
143 | mStyle(LLFontGL::NORMAL), | 146 | mStyle(LLFontGL::NORMAL), |
144 | mDrawTextDisabled( FALSE ) | 147 | mDrawTextDisabled( FALSE ) |
145 | { | 148 | { |
@@ -266,24 +269,24 @@ void LLMenuItemGL::appendAcceleratorString( std::string& st ) const | |||
266 | { | 269 | { |
267 | if ( mAcceleratorMask & MASK_MAC_CONTROL ) | 270 | if ( mAcceleratorMask & MASK_MAC_CONTROL ) |
268 | { | 271 | { |
269 | st.append( "Ctrl-" ); | 272 | st.append( LLUITrans::getString("accel-mac-control") ); |
270 | } | 273 | } |
271 | else | 274 | else |
272 | { | 275 | { |
273 | st.append( "Cmd-" ); // Symbol would be "\xE2\x8C\x98" | 276 | st.append( LLUITrans::getString("accel-mac-command") ); // Symbol would be "\xE2\x8C\x98" |
274 | } | 277 | } |
275 | } | 278 | } |
276 | if( mAcceleratorMask & MASK_ALT ) | 279 | if( mAcceleratorMask & MASK_ALT ) |
277 | st.append( "Opt-" ); // Symbol would be "\xE2\x8C\xA5" | 280 | st.append( LLUITrans::getString("accel-mac-option") ); // Symbol would be "\xE2\x8C\xA5" |
278 | if( mAcceleratorMask & MASK_SHIFT ) | 281 | if( mAcceleratorMask & MASK_SHIFT ) |
279 | st.append( "Shift-" ); // Symbol would be "\xE2\x8C\xA7" | 282 | st.append( LLUITrans::getString("accel-mac-shift") ); // Symbol would be "\xE2\x8C\xA7" |
280 | #else | 283 | #else |
281 | if( mAcceleratorMask & MASK_CONTROL ) | 284 | if( mAcceleratorMask & MASK_CONTROL ) |
282 | st.append( "Ctrl-" ); | 285 | st.append( LLUITrans::getString("accel-win-control") ); |
283 | if( mAcceleratorMask & MASK_ALT ) | 286 | if( mAcceleratorMask & MASK_ALT ) |
284 | st.append( "Alt-" ); | 287 | st.append( LLUITrans::getString("accel-win-alt") ); |
285 | if( mAcceleratorMask & MASK_SHIFT ) | 288 | if( mAcceleratorMask & MASK_SHIFT ) |
286 | st.append( "Shift-" ); | 289 | st.append( LLUITrans::getString("accel-win-shift") ); |
287 | #endif | 290 | #endif |
288 | 291 | ||
289 | std::string keystr = LLKeyboard::stringFromKey( mAcceleratorKey ); | 292 | std::string keystr = LLKeyboard::stringFromKey( mAcceleratorKey ); |
@@ -2165,8 +2168,8 @@ void LLMenuGL::arrange( void ) | |||
2165 | U32 max_width = getTornOff() ? U32_MAX : menu_region_rect.getWidth(); | 2168 | U32 max_width = getTornOff() ? U32_MAX : menu_region_rect.getWidth(); |
2166 | U32 max_height = getTornOff() ? U32_MAX : menu_region_rect.getHeight(); | 2169 | U32 max_height = getTornOff() ? U32_MAX : menu_region_rect.getHeight(); |
2167 | // *FIX: create the item first and then ask for its dimensions? | 2170 | // *FIX: create the item first and then ask for its dimensions? |
2168 | S32 spillover_item_width = PLAIN_PAD_PIXELS + LLFontGL::sSansSerif->getWidth( std::string("More") ); | 2171 | S32 spillover_item_width = PLAIN_PAD_PIXELS + LLFontGL::getFontSansSerif()->getWidth( std::string("More") ); |
2169 | S32 spillover_item_height = llround(LLFontGL::sSansSerif->getLineHeight()) + MENU_ITEM_PADDING; | 2172 | S32 spillover_item_height = llround(LLFontGL::getFontSansSerif()->getLineHeight()) + MENU_ITEM_PADDING; |
2170 | 2173 | ||
2171 | if (mHorizontalLayout) | 2174 | if (mHorizontalLayout) |
2172 | { | 2175 | { |
@@ -3492,7 +3495,7 @@ void LLPieMenu::drawBackground(LLMenuItemGL* itemp, LLColor4& color) | |||
3492 | BOOL LLPieMenu::append(LLMenuItemGL *item) | 3495 | BOOL LLPieMenu::append(LLMenuItemGL *item) |
3493 | { | 3496 | { |
3494 | item->setBriefItem(TRUE); | 3497 | item->setBriefItem(TRUE); |
3495 | item->setFont( LLFontGL::sSansSerifSmall ); | 3498 | item->setFont( LLFontGL::getFontSansSerifSmall() ); |
3496 | return LLMenuGL::append(item); | 3499 | return LLMenuGL::append(item); |
3497 | } | 3500 | } |
3498 | 3501 | ||
@@ -3500,7 +3503,7 @@ BOOL LLPieMenu::append(LLMenuItemGL *item) | |||
3500 | BOOL LLPieMenu::appendSeparator(const std::string &separator_name) | 3503 | BOOL LLPieMenu::appendSeparator(const std::string &separator_name) |
3501 | { | 3504 | { |
3502 | LLMenuItemGL* separator = new LLMenuItemBlankGL(); | 3505 | LLMenuItemGL* separator = new LLMenuItemBlankGL(); |
3503 | separator->setFont( LLFontGL::sSansSerifSmall ); | 3506 | separator->setFont( LLFontGL::getFontSansSerifSmall() ); |
3504 | return append( separator ); | 3507 | return append( separator ); |
3505 | } | 3508 | } |
3506 | 3509 | ||
@@ -3514,7 +3517,7 @@ BOOL LLPieMenu::appendPieMenu(LLPieMenu *menu) | |||
3514 | LLPieMenuBranch *item; | 3517 | LLPieMenuBranch *item; |
3515 | item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu); | 3518 | item = new LLPieMenuBranch(menu->getName(), menu->getLabel(), menu); |
3516 | getParent()->addChild(item->getBranch()); | 3519 | getParent()->addChild(item->getBranch()); |
3517 | item->setFont( LLFontGL::sSansSerifSmall ); | 3520 | item->setFont( LLFontGL::getFontSansSerifSmall() ); |
3518 | return append( item ); | 3521 | return append( item ); |
3519 | } | 3522 | } |
3520 | 3523 | ||