aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llmodaldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llmodaldialog.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/linden/indra/llui/llmodaldialog.cpp b/linden/indra/llui/llmodaldialog.cpp
index ff4858f..392c122 100644
--- a/linden/indra/llui/llmodaldialog.cpp
+++ b/linden/indra/llui/llmodaldialog.cpp
@@ -74,10 +74,10 @@ LLModalDialog::~LLModalDialog()
74void LLModalDialog::open() /* Flawfinder: ignore */ 74void LLModalDialog::open() /* Flawfinder: ignore */
75{ 75{
76 // SJB: Hack! Make sure we don't ever host a modal dialog 76 // SJB: Hack! Make sure we don't ever host a modal dialog
77 LLMultiFloater* thost = LLFloater::sHostp; 77 LLMultiFloater* thost = LLFloater::getFloaterHost();
78 LLFloater::sHostp = NULL; 78 LLFloater::setFloaterHost(NULL);
79 LLFloater::open(); 79 LLFloater::open();
80 LLFloater::sHostp = thost; 80 LLFloater::setFloaterHost(thost);
81} 81}
82 82
83void LLModalDialog::reshape(S32 width, S32 height, BOOL called_from_parent) 83void LLModalDialog::reshape(S32 width, S32 height, BOOL called_from_parent)
@@ -157,14 +157,18 @@ void LLModalDialog::setVisible( BOOL visible )
157 157
158BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask) 158BOOL LLModalDialog::handleMouseDown(S32 x, S32 y, MASK mask)
159{ 159{
160 if (!LLFloater::handleMouseDown(x, y, mask)) 160 if (mModal)
161 { 161 {
162 if (mModal) 162 if (!LLFloater::handleMouseDown(x, y, mask))
163 { 163 {
164 // Click was outside the panel 164 // Click was outside the panel
165 make_ui_sound("UISndInvalidOp"); 165 make_ui_sound("UISndInvalidOp");
166 } 166 }
167 } 167 }
168 else
169 {
170 LLFloater::handleMouseDown(x, y, mask);
171 }
168 return TRUE; 172 return TRUE;
169} 173}
170 174
@@ -247,7 +251,7 @@ void LLModalDialog::draw()
247 LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow"); 251 LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
248 S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater"); 252 S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater");
249 253
250 gl_drop_shadow( 0, mRect.getHeight(), mRect.getWidth(), 0, 254 gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0,
251 shadow_color, shadow_lines); 255 shadow_color, shadow_lines);
252 256
253 LLFloater::draw(); 257 LLFloater::draw();
@@ -276,11 +280,7 @@ void LLModalDialog::draw()
276void LLModalDialog::centerOnScreen() 280void LLModalDialog::centerOnScreen()
277{ 281{
278 LLVector2 window_size = LLUI::getWindowSize(); 282 LLVector2 window_size = LLUI::getWindowSize();
279 283 centerWithin(LLRect(0, 0, llround(window_size.mV[VX]), llround(window_size.mV[VY])));
280 S32 dialog_left = (llround(window_size.mV[VX]) - mRect.getWidth()) / 2;
281 S32 dialog_bottom = (llround(window_size.mV[VY]) - mRect.getHeight()) / 2;
282
283 translate( dialog_left - mRect.mLeft, dialog_bottom - mRect.mBottom );
284} 284}
285 285
286 286
@@ -319,3 +319,4 @@ void LLModalDialog::onAppFocusGained()
319} 319}
320 320
321 321
322