diff options
author | Jacek Antonelli | 2009-09-09 12:27:11 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-09-10 02:26:28 -0500 |
commit | e944c5086e47e92e7952e5a43c68f01108899656 (patch) | |
tree | c47ff63c4dcae473cd07a0dbcbc9d52636e6061e /linden/indra/newview/llviewerwindow.cpp | |
parent | Commented out Linux tarball building. (diff) | |
parent | looks like working now (diff) | |
download | meta-impy-e944c5086e47e92e7952e5a43c68f01108899656.zip meta-impy-e944c5086e47e92e7952e5a43c68f01108899656.tar.gz meta-impy-e944c5086e47e92e7952e5a43c68f01108899656.tar.bz2 meta-impy-e944c5086e47e92e7952e5a43c68f01108899656.tar.xz |
Merged 'armin/grid-manager5' into login-manager
Conflicts:
linden/indra/newview/CMakeLists.txt
linden/indra/newview/llpanellogin.cpp
Diffstat (limited to 'linden/indra/newview/llviewerwindow.cpp')
-rw-r--r-- | linden/indra/newview/llviewerwindow.cpp | 88 |
1 files changed, 49 insertions, 39 deletions
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index 2240d44..99bbb2a 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp | |||
@@ -1574,69 +1574,82 @@ void LLViewerWindow::initWorldUI() | |||
1574 | S32 width = mRootView->getRect().getWidth(); | 1574 | S32 width = mRootView->getRect().getWidth(); |
1575 | LLRect full_window(0, height, width, 0); | 1575 | LLRect full_window(0, height, width, 0); |
1576 | 1576 | ||
1577 | if ( gBottomPanel == NULL ) // Don't re-enter if objects are alreay created | 1577 | if (gBottomPanel) |
1578 | { | 1578 | mRootView->removeChild(gBottomPanel, TRUE); |
1579 | // panel containing chatbar, toolbar, and overlay, over floaters | 1579 | // panel containing chatbar, toolbar, and overlay, over floaters |
1580 | gBottomPanel = new LLBottomPanel(mRootView->getRect()); | 1580 | gBottomPanel = new LLBottomPanel(mRootView->getRect()); |
1581 | mRootView->addChild(gBottomPanel); | 1581 | mRootView->addChild(gBottomPanel); |
1582 | 1582 | ||
1583 | // View for hover information | 1583 | if (gHoverView) |
1584 | gHoverView = new LLHoverView(std::string("gHoverView"), full_window); | 1584 | mRootView->removeChild(gHoverView, TRUE); |
1585 | gHoverView->setVisible(TRUE); | 1585 | // View for hover information |
1586 | mRootView->addChild(gHoverView); | 1586 | gHoverView = new LLHoverView(std::string("gHoverView"), full_window); |
1587 | gHoverView->setVisible(TRUE); | ||
1588 | mRootView->addChild(gHoverView); | ||
1587 | 1589 | ||
1588 | gIMMgr = LLIMMgr::getInstance(); | 1590 | gIMMgr = LLIMMgr::getInstance(); |
1589 | 1591 | ||
1590 | if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) | 1592 | if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) |
1591 | { | 1593 | { |
1592 | LLFloaterChat::getInstance(LLSD())->loadHistory(); | 1594 | LLFloaterChat::getInstance(LLSD())->loadHistory(); |
1593 | } | 1595 | } |
1594 | 1596 | ||
1595 | LLRect morph_view_rect = full_window; | 1597 | LLRect morph_view_rect = full_window; |
1596 | morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); | 1598 | morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); |
1597 | morph_view_rect.mTop = full_window.mTop - 32; | 1599 | morph_view_rect.mTop = full_window.mTop - 32; |
1598 | gMorphView = new LLMorphView(std::string("gMorphView"), morph_view_rect ); | 1600 | if (gMorphView) |
1599 | mRootView->addChild(gMorphView); | 1601 | mRootView->removeChild(gMorphView, TRUE); |
1600 | gMorphView->setVisible(FALSE); | 1602 | |
1603 | gMorphView = new LLMorphView(std::string("gMorphView"), morph_view_rect ); | ||
1604 | mRootView->addChild(gMorphView); | ||
1605 | gMorphView->setVisible(FALSE); | ||
1601 | 1606 | ||
1602 | // *Note: this is where gFloaterMute used to be initialized. | 1607 | // *Note: this is where gFloaterMute used to be initialized. |
1603 | 1608 | ||
1604 | LLWorldMapView::initClass(); | 1609 | LLWorldMapView::initClass(); |
1605 | 1610 | ||
1606 | adjust_rect_centered_partial_zoom("FloaterWorldMapRect2", full_window); | 1611 | adjust_rect_centered_partial_zoom("FloaterWorldMapRect2", full_window); |
1607 | 1612 | ||
1613 | if (!gFloaterWorldMap) | ||
1614 | { | ||
1608 | gFloaterWorldMap = new LLFloaterWorldMap(); | 1615 | gFloaterWorldMap = new LLFloaterWorldMap(); |
1609 | gFloaterWorldMap->setVisible(FALSE); | 1616 | gFloaterWorldMap->setVisible(FALSE); |
1617 | } | ||
1610 | 1618 | ||
1611 | // | 1619 | // |
1612 | // Tools for building | 1620 | // Tools for building |
1613 | // | 1621 | // |
1614 | |||
1615 | // Toolbox floater | ||
1616 | init_menus(); | ||
1617 | 1622 | ||
1623 | // Toolbox floater | ||
1624 | init_menus(); | ||
1625 | if (!gFloaterTools) | ||
1626 | { | ||
1618 | gFloaterTools = new LLFloaterTools(); | 1627 | gFloaterTools = new LLFloaterTools(); |
1619 | gFloaterTools->setVisible(FALSE); | 1628 | gFloaterTools->setVisible(FALSE); |
1629 | } | ||
1620 | 1630 | ||
1631 | if (!gStatusBar) | ||
1632 | { | ||
1621 | // Status bar | 1633 | // Status bar |
1622 | S32 menu_bar_height = gMenuBarView->getRect().getHeight(); | 1634 | S32 menu_bar_height = gMenuBarView->getRect().getHeight(); |
1623 | LLRect root_rect = getRootView()->getRect(); | 1635 | LLRect root_rect = mRootView->getRect(); |
1624 | LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height); | 1636 | LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height); |
1625 | gStatusBar = new LLStatusBar(std::string("status"), status_rect); | 1637 | gStatusBar = new LLStatusBar(std::string("status"), status_rect); |
1626 | gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); | 1638 | gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); |
1627 | 1639 | ||
1628 | gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE); | 1640 | gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE); |
1629 | gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight()); | 1641 | gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight()); |
1630 | // sync bg color with menu bar | 1642 | // sync bg color with menu bar |
1631 | gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() ); | 1643 | gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() ); |
1644 | mRootView->addChild(gStatusBar); | ||
1645 | } | ||
1632 | 1646 | ||
1633 | LLFloaterChatterBox::createInstance(LLSD()); | 1647 | LLFloaterChatterBox::createInstance(LLSD()); |
1634 | 1648 | ||
1635 | getRootView()->addChild(gStatusBar); | ||
1636 | 1649 | ||
1637 | // menu holder appears on top to get first pass at all mouse events | 1650 | // menu holder appears on top to get first pass at all mouse events |
1638 | getRootView()->sendChildToFront(gMenuHolder); | 1651 | |
1639 | } | 1652 | mRootView->sendChildToFront(gMenuHolder); |
1640 | } | 1653 | } |
1641 | 1654 | ||
1642 | // Destroy the UI | 1655 | // Destroy the UI |
@@ -4891,7 +4904,6 @@ void LLBottomPanel::draw() | |||
4891 | 4904 | ||
4892 | void* LLBottomPanel::createHUD(void* data) | 4905 | void* LLBottomPanel::createHUD(void* data) |
4893 | { | 4906 | { |
4894 | delete gHUDView; | ||
4895 | gHUDView = new LLHUDView(); | 4907 | gHUDView = new LLHUDView(); |
4896 | return gHUDView; | 4908 | return gHUDView; |
4897 | } | 4909 | } |
@@ -4899,14 +4911,12 @@ void* LLBottomPanel::createHUD(void* data) | |||
4899 | 4911 | ||
4900 | void* LLBottomPanel::createOverlayBar(void* data) | 4912 | void* LLBottomPanel::createOverlayBar(void* data) |
4901 | { | 4913 | { |
4902 | delete gOverlayBar; | ||
4903 | gOverlayBar = new LLOverlayBar(); | 4914 | gOverlayBar = new LLOverlayBar(); |
4904 | return gOverlayBar; | 4915 | return gOverlayBar; |
4905 | } | 4916 | } |
4906 | 4917 | ||
4907 | void* LLBottomPanel::createToolBar(void* data) | 4918 | void* LLBottomPanel::createToolBar(void* data) |
4908 | { | 4919 | { |
4909 | delete gToolBar; | ||
4910 | gToolBar = new LLToolBar(); | 4920 | gToolBar = new LLToolBar(); |
4911 | return gToolBar; | 4921 | return gToolBar; |
4912 | } | 4922 | } |