aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-05-24 02:59:24 -0500
committerJacek Antonelli2009-05-24 02:59:40 -0500
commitb2627d927f1642bea84b92adfccd9403676e1341 (patch)
tree07f069e63cfa633b9bd0d07b4eecc229ef67f974 /linden/indra/newview/llviewerwindow.cpp
parentSecond Life viewer sources 1.23.1-RC (diff)
downloadmeta-impy-b2627d927f1642bea84b92adfccd9403676e1341.zip
meta-impy-b2627d927f1642bea84b92adfccd9403676e1341.tar.gz
meta-impy-b2627d927f1642bea84b92adfccd9403676e1341.tar.bz2
meta-impy-b2627d927f1642bea84b92adfccd9403676e1341.tar.xz
Second Life viewer sources 1.23.2-RC
Diffstat (limited to 'linden/indra/newview/llviewerwindow.cpp')
-rw-r--r--linden/indra/newview/llviewerwindow.cpp51
1 files changed, 30 insertions, 21 deletions
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 8b40908..cb7dd57 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -1668,29 +1668,10 @@ void LLViewerWindow::initBase()
1668 1668
1669 // Console 1669 // Console
1670 llassert( !gConsole ); 1670 llassert( !gConsole );
1671 LLRect console_rect = full_window;
1672 console_rect.mTop -= 24;
1673
1674 console_rect.mBottom += getChatConsoleBottomPad();
1675
1676 // TODO: Eliminate magic constants - please used named constants if changing this - don't be a programmer hater
1677 console_rect.mLeft += 24; //gSavedSettings.getS32("StatusBarButtonWidth") + gSavedSettings.getS32("StatusBarPad");
1678
1679 if (gSavedSettings.getBOOL("ChatFullWidth"))
1680 {
1681 console_rect.mRight -= 10;
1682 }
1683 else
1684 {
1685 // Make console rect somewhat narrow so having inventory open is
1686 // less of a problem.
1687 console_rect.mRight = console_rect.mLeft + 2 * width / 3;
1688 }
1689
1690 gConsole = new LLConsole( 1671 gConsole = new LLConsole(
1691 "console", 1672 "console",
1692 gSavedSettings.getS32("ConsoleBufferSize"), 1673 gSavedSettings.getS32("ConsoleBufferSize"),
1693 console_rect, 1674 getChatConsoleRect(),
1694 gSavedSettings.getS32("ChatFontSize"), 1675 gSavedSettings.getS32("ChatFontSize"),
1695 gSavedSettings.getF32("ChatPersistTime") ); 1676 gSavedSettings.getF32("ChatPersistTime") );
1696 gConsole->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM); 1677 gConsole->setFollows(FOLLOWS_LEFT | FOLLOWS_RIGHT | FOLLOWS_BOTTOM);
@@ -2452,6 +2433,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
2452 // Debugging view for unified notifications: CTRL-SHIFT-5 2433 // Debugging view for unified notifications: CTRL-SHIFT-5
2453 // *FIXME: Having this special-cased right here (just so this can be invoked from the login screen) sucks. 2434 // *FIXME: Having this special-cased right here (just so this can be invoked from the login screen) sucks.
2454 if ((MASK_SHIFT & mask) 2435 if ((MASK_SHIFT & mask)
2436 && (!(MASK_ALT & mask))
2455 && (MASK_CONTROL & mask) 2437 && (MASK_CONTROL & mask)
2456 && ('5' == key)) 2438 && ('5' == key))
2457 { 2439 {
@@ -3054,7 +3036,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
3054 } 3036 }
3055 3037
3056 // Always update console 3038 // Always update console
3057 LLRect console_rect = gConsole->getRect(); 3039 LLRect console_rect = getChatConsoleRect();
3058 console_rect.mBottom = gHUDView->getRect().mBottom + getChatConsoleBottomPad(); 3040 console_rect.mBottom = gHUDView->getRect().mBottom + getChatConsoleBottomPad();
3059 gConsole->reshape(console_rect.getWidth(), console_rect.getHeight()); 3041 gConsole->reshape(console_rect.getWidth(), console_rect.getHeight());
3060 gConsole->setRect(console_rect); 3042 gConsole->setRect(console_rect);
@@ -5066,6 +5048,33 @@ S32 LLViewerWindow::getChatConsoleBottomPad()
5066 return offset; 5048 return offset;
5067} 5049}
5068 5050
5051LLRect LLViewerWindow::getChatConsoleRect()
5052{
5053 LLRect full_window(0, getWindowHeight(), getWindowWidth(), 0);
5054 LLRect console_rect = full_window;
5055
5056 const S32 CONSOLE_PADDING_TOP = 24;
5057 const S32 CONSOLE_PADDING_LEFT = 24;
5058 const S32 CONSOLE_PADDING_RIGHT = 10;
5059
5060 console_rect.mTop -= CONSOLE_PADDING_TOP;
5061 console_rect.mBottom += getChatConsoleBottomPad();
5062
5063 console_rect.mLeft += CONSOLE_PADDING_LEFT;
5064
5065 if (gSavedSettings.getBOOL("ChatFullWidth"))
5066 {
5067 console_rect.mRight -= CONSOLE_PADDING_RIGHT;
5068 }
5069 else
5070 {
5071 // Make console rect somewhat narrow so having inventory open is
5072 // less of a problem.
5073 console_rect.mRight = console_rect.mLeft + 2 * getWindowWidth() / 3;
5074 }
5075
5076 return console_rect;
5077}
5069//---------------------------------------------------------------------------- 5078//----------------------------------------------------------------------------
5070 5079
5071 5080