diff options
-rw-r--r-- | indra/llui/llmenugl.cpp | 22 | ||||
-rw-r--r-- | indra/llui/llmenugl.h | 6 | ||||
-rw-r--r-- | indra/newview/llvoavatarself.cpp | 27 |
3 files changed, 30 insertions, 25 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 3e652ea960..900a814238 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -71,10 +71,6 @@ S32 MENU_BAR_WIDTH = 0; /// Local function declarations, constants, enums, and typedefs ///============================================================================ -const std::string SEPARATOR_NAME("separator"); -const std::string SEPARATOR_LABEL( "-----------" ); -const std::string VERTICAL_SEPARATOR_LABEL( "|" ); - const S32 LABEL_BOTTOM_PAD_PIXELS = 2; const U32 LEFT_PAD_PIXELS = 3; @@ -93,10 +89,14 @@ const U32 SEPARATOR_HEIGHT_PIXELS = 8; const S32 TEAROFF_SEPARATOR_HEIGHT_PIXELS = 10; const S32 MENU_ITEM_PADDING = 4; -const std::string BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK -const std::string BRANCH_SUFFIX( "\xE2\x96\xB6" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE -const std::string ARROW_UP ("^^^^^^^"); -const std::string ARROW_DOWN("vvvvvvv"); +const std::string SEPARATOR_NAME("separator"); +const std::string SEPARATOR_LABEL( "-----------" ); +const std::string VERTICAL_SEPARATOR_LABEL( "|" ); + +const std::string LLMenuGL::BOOLEAN_TRUE_PREFIX( "\xE2\x9C\x94" ); // U+2714 HEAVY CHECK MARK +const std::string LLMenuGL::BRANCH_SUFFIX( "\xE2\x96\xB6" ); // U+25B6 BLACK RIGHT-POINTING TRIANGLE +const std::string LLMenuGL::ARROW_UP ("^^^^^^^"); +const std::string LLMenuGL::ARROW_DOWN("vvvvvvv"); const F32 MAX_MOUSE_SLOPE_SUB_MENU = 0.9f; @@ -915,7 +915,7 @@ void LLMenuItemCheckGL::setValue(const LLSD& value) LLUICtrl::setValue(value); if(value.asBoolean()) { - mDrawBoolLabel = BOOLEAN_TRUE_PREFIX; + mDrawBoolLabel = LLMenuGL::BOOLEAN_TRUE_PREFIX; } else { @@ -948,7 +948,7 @@ void LLMenuItemCheckGL::buildDrawLabel( void ) } if(getValue().asBoolean()) { - mDrawBoolLabel = BOOLEAN_TRUE_PREFIX; + mDrawBoolLabel = LLMenuGL::BOOLEAN_TRUE_PREFIX; } else { @@ -1058,7 +1058,7 @@ void LLMenuItemBranchGL::buildDrawLabel( void ) std::string st = mDrawAccelLabel; appendAcceleratorString( st ); mDrawAccelLabel = st; - mDrawBranchLabel = BRANCH_SUFFIX; + mDrawBranchLabel = LLMenuGL::BRANCH_SUFFIX; } void LLMenuItemBranchGL::onCommit( void ) diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index eb0d0bcb1f..19b738312e 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -391,6 +391,12 @@ public: void initFromParams(const Params&); + // textual artwork which menugl-imitators may want to match + static const std::string BOOLEAN_TRUE_PREFIX; + static const std::string BRANCH_SUFFIX; + static const std::string ARROW_UP; + static const std::string ARROW_DOWN; + protected: LLMenuGL(const LLMenuGL::Params& p); friend class LLUICtrlFactory; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index c2d94c195d..1a5d7289f4 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -43,6 +43,7 @@ #include "llhudeffecttrail.h" #include "llhudmanager.h" #include "llinventoryfunctions.h" +#include "llmenugl.h" #include "llnotificationsutil.h" #include "llselectmgr.h" #include "lltoolgrab.h" // for needsRenderBeam @@ -239,61 +240,59 @@ BOOL LLVOAvatarSelf::buildMenus() //------------------------------------------------------------------------- gAttachBodyPartPieMenus[0] = NULL; -//Correct sub-menu pointer character to be a right-pointing filled in white triangle - const std::string SP_BLACKTRI( " \xE2\x96\xB6" ); // U+25B7 BLACK RIGHT-POINTING TRIANGLE LLContextMenu::Params params; - params.label(LLTrans::getString("BodyPartsRightArm") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsRightArm") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); params.visible(false); gAttachBodyPartPieMenus[1] = LLUICtrlFactory::create<LLContextMenu> (params); - params.label(LLTrans::getString("BodyPartsHead") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsHead") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gAttachBodyPartPieMenus[2] = LLUICtrlFactory::create<LLContextMenu> (params); - params.label(LLTrans::getString("BodyPartsLeftArm") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsLeftArm") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gAttachBodyPartPieMenus[3] = LLUICtrlFactory::create<LLContextMenu> (params); gAttachBodyPartPieMenus[4] = NULL; - params.label(LLTrans::getString("BodyPartsLeftLeg") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsLeftLeg") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gAttachBodyPartPieMenus[5] = LLUICtrlFactory::create<LLContextMenu> (params); - params.label(LLTrans::getString("BodyPartsTorso") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsTorso") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gAttachBodyPartPieMenus[6] = LLUICtrlFactory::create<LLContextMenu> (params); - params.label(LLTrans::getString("BodyPartsRightLeg") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsRightLeg") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gAttachBodyPartPieMenus[7] = LLUICtrlFactory::create<LLContextMenu> (params); gDetachBodyPartPieMenus[0] = NULL; - params.label(LLTrans::getString("BodyPartsRightArm") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsRightArm") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gDetachBodyPartPieMenus[1] = LLUICtrlFactory::create<LLContextMenu> (params); - params.label(LLTrans::getString("BodyPartsHead") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsHead") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gDetachBodyPartPieMenus[2] = LLUICtrlFactory::create<LLContextMenu> (params); - params.label(LLTrans::getString("BodyPartsLeftArm") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsLeftArm") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gDetachBodyPartPieMenus[3] = LLUICtrlFactory::create<LLContextMenu> (params); gDetachBodyPartPieMenus[4] = NULL; - params.label(LLTrans::getString("BodyPartsLeftLeg") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsLeftLeg") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gDetachBodyPartPieMenus[5] = LLUICtrlFactory::create<LLContextMenu> (params); - params.label(LLTrans::getString("BodyPartsTorso") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsTorso") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gDetachBodyPartPieMenus[6] = LLUICtrlFactory::create<LLContextMenu> (params); - params.label(LLTrans::getString("BodyPartsRightLeg") + SP_BLACKTRI); + params.label(LLTrans::getString("BodyPartsRightLeg") + " " + LLMenuGL::BRANCH_SUFFIX); params.name(params.label); gDetachBodyPartPieMenus[7] = LLUICtrlFactory::create<LLContextMenu> (params); |