summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp97
1 files changed, 50 insertions, 47 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index c7bd6b51e4..f6873c61b8 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -549,44 +549,6 @@ void init_menus()
// Initialize actions
initialize_menu_actions();
- gMenuBarView = (LLMenuBarGL*)gUICtrlFactory->buildMenu("menu_viewer.xml", gMenuHolder);
- gMenuBarView->setRect(LLRect(0, top, width, top - MENU_BAR_HEIGHT));
- gViewerWindow->getRootView()->addChild(gMenuBarView);
-
- // menu holder appears on top of menu bar so you can see the menu title
- // flash when an item is triggered (the flash occurs in the holder)
- gViewerWindow->getRootView()->addChild(gMenuHolder);
-
- gMenuHolder->childSetLabelArg("Upload Image", "[COST]", "10");
- gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", "10");
- gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", "10");
- gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", "10");
-
- gAFKMenu = (LLMenuItemCallGL*)gMenuBarView->getChildByName("Set Away", TRUE);
- gBusyMenu = (LLMenuItemCallGL*)gMenuBarView->getChildByName("Set Busy", TRUE);
- gAttachSubMenu = gMenuBarView->getChildMenuByName("Attach Object", TRUE);
- gDetachSubMenu = gMenuBarView->getChildMenuByName("Detach Object", TRUE);
-
- if (gAgent.mAccess < SIM_ACCESS_MATURE)
- {
- gMenuBarView->getChildByName("Menu Underpants", TRUE)->setVisible(FALSE);
- gMenuBarView->getChildByName("Menu Undershirt", TRUE)->setVisible(FALSE);
- }
-
- // TomY TODO convert these two
- LLMenuGL*menu;
- menu = new LLMenuGL(CLIENT_MENU_NAME);
- init_client_menu(menu);
- gMenuBarView->appendMenu( menu );
- menu->updateParent(LLMenuGL::sMenuContainer);
-
- menu = new LLMenuGL(SERVER_MENU_NAME);
- init_server_menu(menu);
- gMenuBarView->appendMenu( menu );
- menu->updateParent(LLMenuGL::sMenuContainer);
-
- gMenuBarView->createJumpKeys();
-
///
/// Popup menu
///
@@ -629,6 +591,16 @@ void init_menus()
///
LLColor4 color;
+ LLColor4 pie_color = gColors.getColor("PieMenuBgColor");
+ gPieSelf->setBackgroundColor( pie_color );
+ gPieAvatar->setBackgroundColor( pie_color );
+ gPieObject->setBackgroundColor( pie_color );
+ gPieAttachment->setBackgroundColor( pie_color );
+ gPieLand->setBackgroundColor( pie_color );
+
+ color = gColors.getColor( "MenuPopupBgColor" );
+ gPopupMenuView->setBackgroundColor( color );
+
// If we are not in production, use a different color to make it apparent.
if (gInProductionGrid)
{
@@ -638,18 +610,45 @@ void init_menus()
{
color = gColors.getColor( "MenuNonProductionBgColor" );
}
-
+ gMenuBarView = (LLMenuBarGL*)gUICtrlFactory->buildMenu("menu_viewer.xml", gMenuHolder);
+ gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT));
gMenuBarView->setBackgroundColor( color );
- LLColor4 pie_color = gColors.getColor("PieMenuBgColor");
- gPieSelf->setBackgroundColor( pie_color );
- gPieAvatar->setBackgroundColor( pie_color );
- gPieObject->setBackgroundColor( pie_color );
- gPieAttachment->setBackgroundColor( pie_color );
- gPieLand->setBackgroundColor( pie_color );
+ gMenuHolder->addChild(gMenuBarView);
+
+ // menu holder appears on top of menu bar so you can see the menu title
+ // flash when an item is triggered (the flash occurs in the holder)
+ gViewerWindow->getRootView()->addChild(gMenuHolder);
- color = gColors.getColor( "MenuPopupBgColor" );
- gPopupMenuView->setBackgroundColor( color );
+ gMenuHolder->childSetLabelArg("Upload Image", "[COST]", "10");
+ gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", "10");
+ gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", "10");
+ gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", "10");
+
+ gAFKMenu = (LLMenuItemCallGL*)gMenuBarView->getChildByName("Set Away", TRUE);
+ gBusyMenu = (LLMenuItemCallGL*)gMenuBarView->getChildByName("Set Busy", TRUE);
+ gAttachSubMenu = gMenuBarView->getChildMenuByName("Attach Object", TRUE);
+ gDetachSubMenu = gMenuBarView->getChildMenuByName("Detach Object", TRUE);
+
+ if (gAgent.mAccess < SIM_ACCESS_MATURE)
+ {
+ gMenuBarView->getChildByName("Menu Underpants", TRUE)->setVisible(FALSE);
+ gMenuBarView->getChildByName("Menu Undershirt", TRUE)->setVisible(FALSE);
+ }
+
+ // TomY TODO convert these two
+ LLMenuGL*menu;
+ menu = new LLMenuGL(CLIENT_MENU_NAME);
+ init_client_menu(menu);
+ gMenuBarView->appendMenu( menu );
+ menu->updateParent(LLMenuGL::sMenuContainer);
+
+ menu = new LLMenuGL(SERVER_MENU_NAME);
+ init_server_menu(menu);
+ gMenuBarView->appendMenu( menu );
+ menu->updateParent(LLMenuGL::sMenuContainer);
+
+ gMenuBarView->createJumpKeys();
// Let land based option enable when parcel changes
gMenuParcelObserver = new LLMenuParcelObserver();
@@ -2549,10 +2548,12 @@ void set_god_level(U8 god_level)
if (gInProductionGrid)
{
gMenuBarView->setBackgroundColor( gColors.getColor( "MenuBarGodBgColor" ) );
+ gStatusBar->setBackgroundColor( gColors.getColor( "MenuBarGodBgColor" ) );
}
else
{
gMenuBarView->setBackgroundColor( gColors.getColor( "MenuNonProductionGodBgColor" ) );
+ gStatusBar->setBackgroundColor( gColors.getColor( "MenuNonProductionGodBgColor" ) );
}
LLNotifyBox::showXml("EnteringGodMode", args);
}
@@ -2562,10 +2563,12 @@ void set_god_level(U8 god_level)
if (gInProductionGrid)
{
gMenuBarView->setBackgroundColor( gColors.getColor( "MenuBarBgColor" ) );
+ gStatusBar->setBackgroundColor( gColors.getColor( "MenuBarBgColor" ) );
}
else
{
gMenuBarView->setBackgroundColor( gColors.getColor( "MenuNonProductionBgColor" ) );
+ gStatusBar->setBackgroundColor( gColors.getColor( "MenuNonProductionBgColor" ) );
}
LLNotifyBox::showXml("LeavingGodMode", args);
}