aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2009-07-09 17:50:25 +0200
committerArmin Weatherwax2009-07-11 13:45:59 +0200
commit29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3 (patch)
treeb060e2e4849fca702a1cf27fabf5781d09ffa60e /linden/indra/newview/llviewerwindow.cpp
parentBroken: relog sometimes works once; fixed inventory and avatar not ruthed any... (diff)
downloadmeta-impy-29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3.zip
meta-impy-29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3.tar.gz
meta-impy-29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3.tar.bz2
meta-impy-29a0f7cfdd33e8d18ad5d932eefa67332d5b5ed3.tar.xz
looks like working now
modified: linden/indra/newview/llchatbar.cpp modified: linden/indra/newview/llviewerwindow.cpp modified: linden/indra/newview/llvoavatar.cpp
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerwindow.cpp88
1 files changed, 49 insertions, 39 deletions
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 7e6c24f..1554075 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -1829,69 +1829,82 @@ void LLViewerWindow::initWorldUI()
1829 S32 width = mRootView->getRect().getWidth(); 1829 S32 width = mRootView->getRect().getWidth();
1830 LLRect full_window(0, height, width, 0); 1830 LLRect full_window(0, height, width, 0);
1831 1831
1832 if ( gBottomPanel == NULL ) // Don't re-enter if objects are alreay created 1832 if (gBottomPanel)
1833 { 1833 mRootView->removeChild(gBottomPanel, TRUE);
1834 // panel containing chatbar, toolbar, and overlay, over floaters 1834 // panel containing chatbar, toolbar, and overlay, over floaters
1835 gBottomPanel = new LLBottomPanel(mRootView->getRect()); 1835 gBottomPanel = new LLBottomPanel(mRootView->getRect());
1836 mRootView->addChild(gBottomPanel); 1836 mRootView->addChild(gBottomPanel);
1837 1837
1838 // View for hover information 1838 if (gHoverView)
1839 gHoverView = new LLHoverView(std::string("gHoverView"), full_window); 1839 mRootView->removeChild(gHoverView, TRUE);
1840 gHoverView->setVisible(TRUE); 1840 // View for hover information
1841 mRootView->addChild(gHoverView); 1841 gHoverView = new LLHoverView(std::string("gHoverView"), full_window);
1842 gHoverView->setVisible(TRUE);
1843 mRootView->addChild(gHoverView);
1842 1844
1843 gIMMgr = LLIMMgr::getInstance(); 1845 gIMMgr = LLIMMgr::getInstance();
1844 1846
1845 if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) 1847 if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
1846 { 1848 {
1847 LLFloaterChat::getInstance(LLSD())->loadHistory(); 1849 LLFloaterChat::getInstance(LLSD())->loadHistory();
1848 } 1850 }
1849 1851
1850 LLRect morph_view_rect = full_window; 1852 LLRect morph_view_rect = full_window;
1851 morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); 1853 morph_view_rect.stretch( -STATUS_BAR_HEIGHT );
1852 morph_view_rect.mTop = full_window.mTop - 32; 1854 morph_view_rect.mTop = full_window.mTop - 32;
1853 gMorphView = new LLMorphView(std::string("gMorphView"), morph_view_rect ); 1855 if (gMorphView)
1854 mRootView->addChild(gMorphView); 1856 mRootView->removeChild(gMorphView, TRUE);
1855 gMorphView->setVisible(FALSE); 1857
1858 gMorphView = new LLMorphView(std::string("gMorphView"), morph_view_rect );
1859 mRootView->addChild(gMorphView);
1860 gMorphView->setVisible(FALSE);
1856 1861
1857 // *Note: this is where gFloaterMute used to be initialized. 1862 // *Note: this is where gFloaterMute used to be initialized.
1858 1863
1859 LLWorldMapView::initClass(); 1864 LLWorldMapView::initClass();
1860 1865
1861 adjust_rect_centered_partial_zoom("FloaterWorldMapRect2", full_window); 1866 adjust_rect_centered_partial_zoom("FloaterWorldMapRect2", full_window);
1862 1867
1868 if (!gFloaterWorldMap)
1869 {
1863 gFloaterWorldMap = new LLFloaterWorldMap(); 1870 gFloaterWorldMap = new LLFloaterWorldMap();
1864 gFloaterWorldMap->setVisible(FALSE); 1871 gFloaterWorldMap->setVisible(FALSE);
1872 }
1865 1873
1866 // 1874 //
1867 // Tools for building 1875 // Tools for building
1868 // 1876 //
1869
1870 // Toolbox floater
1871 init_menus();
1872 1877
1878 // Toolbox floater
1879 init_menus();
1880 if (!gFloaterTools)
1881 {
1873 gFloaterTools = new LLFloaterTools(); 1882 gFloaterTools = new LLFloaterTools();
1874 gFloaterTools->setVisible(FALSE); 1883 gFloaterTools->setVisible(FALSE);
1884 }
1875 1885
1886 if (!gStatusBar)
1887 {
1876 // Status bar 1888 // Status bar
1877 S32 menu_bar_height = gMenuBarView->getRect().getHeight(); 1889 S32 menu_bar_height = gMenuBarView->getRect().getHeight();
1878 LLRect root_rect = getRootView()->getRect(); 1890 LLRect root_rect = mRootView->getRect();
1879 LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height); 1891 LLRect status_rect(0, root_rect.getHeight(), root_rect.getWidth(), root_rect.getHeight() - menu_bar_height);
1880 gStatusBar = new LLStatusBar(std::string("status"), status_rect); 1892 gStatusBar = new LLStatusBar(std::string("status"), status_rect);
1881 gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP); 1893 gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_TOP);
1882 1894
1883 gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE); 1895 gStatusBar->reshape(root_rect.getWidth(), gStatusBar->getRect().getHeight(), TRUE);
1884 gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight()); 1896 gStatusBar->translate(0, root_rect.getHeight() - gStatusBar->getRect().getHeight());
1885 // sync bg color with menu bar 1897 // sync bg color with menu bar
1886 gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() ); 1898 gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor() );
1899 mRootView->addChild(gStatusBar);
1900 }
1887 1901
1888 LLFloaterChatterBox::createInstance(LLSD()); 1902 LLFloaterChatterBox::createInstance(LLSD());
1889 1903
1890 getRootView()->addChild(gStatusBar);
1891 1904
1892 // menu holder appears on top to get first pass at all mouse events 1905 // menu holder appears on top to get first pass at all mouse events
1893 getRootView()->sendChildToFront(gMenuHolder); 1906
1894 } 1907 mRootView->sendChildToFront(gMenuHolder);
1895} 1908}
1896 1909
1897// Destroy the UI 1910// Destroy the UI
@@ -5136,7 +5149,6 @@ void LLBottomPanel::draw()
5136 5149
5137void* LLBottomPanel::createHUD(void* data) 5150void* LLBottomPanel::createHUD(void* data)
5138{ 5151{
5139 delete gHUDView;
5140 gHUDView = new LLHUDView(); 5152 gHUDView = new LLHUDView();
5141 return gHUDView; 5153 return gHUDView;
5142} 5154}
@@ -5144,14 +5156,12 @@ void* LLBottomPanel::createHUD(void* data)
5144 5156
5145void* LLBottomPanel::createOverlayBar(void* data) 5157void* LLBottomPanel::createOverlayBar(void* data)
5146{ 5158{
5147 delete gOverlayBar;
5148 gOverlayBar = new LLOverlayBar(); 5159 gOverlayBar = new LLOverlayBar();
5149 return gOverlayBar; 5160 return gOverlayBar;
5150} 5161}
5151 5162
5152void* LLBottomPanel::createToolBar(void* data) 5163void* LLBottomPanel::createToolBar(void* data)
5153{ 5164{
5154 delete gToolBar;
5155 gToolBar = new LLToolBar(); 5165 gToolBar = new LLToolBar();
5156 return gToolBar; 5166 return gToolBar;
5157} 5167}