diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterhud.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/linden/indra/newview/llfloaterhud.cpp b/linden/indra/newview/llfloaterhud.cpp index 2f192f7..d93e36a 100644 --- a/linden/indra/newview/llfloaterhud.cpp +++ b/linden/indra/newview/llfloaterhud.cpp | |||
@@ -51,16 +51,20 @@ LLFloaterHUD::LLFloaterHUD() | |||
51 | : LLFloater("floater_hud"), | 51 | : LLFloater("floater_hud"), |
52 | mWebBrowser(0) | 52 | mWebBrowser(0) |
53 | { | 53 | { |
54 | // Create floater from its XML definition | ||
55 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hud.xml"); | ||
56 | |||
54 | // Don't grab the focus as it will impede performing in-world actions | 57 | // Don't grab the focus as it will impede performing in-world actions |
55 | // while using the HUD | 58 | // while using the HUD |
56 | setAutoFocus(FALSE); | 59 | setIsChrome(TRUE); |
60 | |||
61 | // Chrome doesn't show the window title by default, but here we | ||
62 | // want to show it. | ||
63 | setTitleVisible(true); | ||
57 | 64 | ||
58 | // Opaque background since we never get the focus | 65 | // Opaque background since we never get the focus |
59 | setBackgroundOpaque(TRUE); | 66 | setBackgroundOpaque(TRUE); |
60 | 67 | ||
61 | // Create floater from its XML definition | ||
62 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hud.xml"); | ||
63 | |||
64 | // Position floater based on saved location | 68 | // Position floater based on saved location |
65 | LLRect saved_position_rect = gSavedSettings.getRect("FloaterHUDRect"); | 69 | LLRect saved_position_rect = gSavedSettings.getRect("FloaterHUDRect"); |
66 | reshape(saved_position_rect.getWidth(), saved_position_rect.getHeight(), FALSE); | 70 | reshape(saved_position_rect.getWidth(), saved_position_rect.getHeight(), FALSE); |
@@ -69,12 +73,14 @@ LLFloaterHUD::LLFloaterHUD() | |||
69 | mWebBrowser = getChild<LLWebBrowserCtrl>("floater_hud_browser" ); | 73 | mWebBrowser = getChild<LLWebBrowserCtrl>("floater_hud_browser" ); |
70 | if (mWebBrowser) | 74 | if (mWebBrowser) |
71 | { | 75 | { |
72 | // Always refresh the browser | ||
73 | mWebBrowser->setAlwaysRefresh(true); | ||
74 | |||
75 | // Open links in internal browser | 76 | // Open links in internal browser |
76 | mWebBrowser->setOpenInExternalBrowser(false); | 77 | mWebBrowser->setOpenInExternalBrowser(false); |
77 | 78 | ||
79 | // This is a "chrome" floater, so we don't want anything to | ||
80 | // take focus (as the user needs to be able to walk with | ||
81 | // arrow keys during tutorial). | ||
82 | mWebBrowser->setTakeFocusOnClick(false); | ||
83 | |||
78 | LLString language(gSavedSettings.getString("Language")); | 84 | LLString language(gSavedSettings.getString("Language")); |
79 | if(language == "default") | 85 | if(language == "default") |
80 | { | 86 | { |
@@ -132,9 +138,3 @@ void LLFloaterHUD::close() | |||
132 | { | 138 | { |
133 | if (sInstance) sInstance->close(); | 139 | if (sInstance) sInstance->close(); |
134 | } | 140 | } |
135 | |||
136 | void LLFloaterHUD::onFocusReceived() | ||
137 | { | ||
138 | // Never get the focus | ||
139 | setFocus(FALSE); | ||
140 | } | ||