aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llalertdialog.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llui/llalertdialog.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/llui/llalertdialog.cpp')
-rw-r--r--linden/indra/llui/llalertdialog.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/linden/indra/llui/llalertdialog.cpp b/linden/indra/llui/llalertdialog.cpp
index 204fb10..e60ef42 100644
--- a/linden/indra/llui/llalertdialog.cpp
+++ b/linden/indra/llui/llalertdialog.cpp
@@ -177,11 +177,11 @@ LLAlertDialog::LLAlertDialog( const LLAlertDialogTemplate* xml_template,
177// so that the alert is valid until show() is called. 177// so that the alert is valid until show() is called.
178bool LLAlertDialog::show() 178bool LLAlertDialog::show()
179{ 179{
180 // If mModal, check to see if we are not displaying alerts, 180 // If modal, check to see if we are not displaying alerts,
181 // and do any application logic before showing modal alerts 181 // and do any application logic before showing modal alerts
182 if (sDisplayCallback) 182 if (sDisplayCallback)
183 { 183 {
184 bool show = sDisplayCallback(mModal); 184 bool show = sDisplayCallback(isModal());
185 if (show == false) 185 if (show == false)
186 { 186 {
187 mOptionChosen = mDefaultOption; 187 mOptionChosen = mDefaultOption;
@@ -330,7 +330,7 @@ void LLAlertDialog::createDialog(const std::vector<LLString>* optionsp, S32 defa
330 } 330 }
331 reshape( dialog_width, dialog_height, FALSE ); 331 reshape( dialog_width, dialog_height, FALSE );
332 332
333 S32 msg_y = mRect.getHeight() - VPAD; 333 S32 msg_y = getRect().getHeight() - VPAD;
334 S32 msg_x = HPAD; 334 S32 msg_x = HPAD;
335 if (hasTitleBar()) 335 if (hasTitleBar())
336 { 336 {
@@ -355,7 +355,7 @@ void LLAlertDialog::createDialog(const std::vector<LLString>* optionsp, S32 defa
355 addChild(msg_box); 355 addChild(msg_box);
356 356
357 // Buttons 357 // Buttons
358 S32 button_left = (mRect.getWidth() - btn_total_width) / 2; 358 S32 button_left = (getRect().getWidth() - btn_total_width) / 2;
359 359
360 for( S32 i = 0; i < mNumOptions; i++ ) 360 for( S32 i = 0; i < mNumOptions; i++ )
361 { 361 {
@@ -403,18 +403,18 @@ bool LLAlertDialog::setCheckBox( const LLString& check_title, const LLString& ch
403 const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f); 403 const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f);
404 404
405 // Extend dialog for "check next time" 405 // Extend dialog for "check next time"
406 S32 max_msg_width = mRect.getWidth() - 2 * HPAD; 406 S32 max_msg_width = getRect().getWidth() - 2 * HPAD;
407 S32 check_width = S32(font->getWidth(check_title) + 0.99f) + 16; 407 S32 check_width = S32(font->getWidth(check_title) + 0.99f) + 16;
408 max_msg_width = llmax(max_msg_width, check_width); 408 max_msg_width = llmax(max_msg_width, check_width);
409 S32 dialog_width = max_msg_width + 2 * HPAD; 409 S32 dialog_width = max_msg_width + 2 * HPAD;
410 410
411 S32 dialog_height = mRect.getHeight(); 411 S32 dialog_height = getRect().getHeight();
412 dialog_height += LINE_HEIGHT; 412 dialog_height += LINE_HEIGHT;
413 dialog_height += LINE_HEIGHT / 2; 413 dialog_height += LINE_HEIGHT / 2;
414 414
415 reshape( dialog_width, dialog_height, FALSE ); 415 reshape( dialog_width, dialog_height, FALSE );
416 416
417 S32 msg_x = (mRect.getWidth() - max_msg_width) / 2; 417 S32 msg_x = (getRect().getWidth() - max_msg_width) / 2;
418 418
419 LLRect check_rect; 419 LLRect check_rect;
420 check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2, 420 check_rect.setOriginAndSize(msg_x, VPAD+BTN_HEIGHT+LINE_HEIGHT/2,
@@ -556,7 +556,7 @@ void LLAlertDialog::draw()
556 LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow"); 556 LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
557 S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater"); 557 S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater");
558 558
559 gl_drop_shadow( 0, mRect.getHeight(), mRect.getWidth(), 0, 559 gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0,
560 shadow_color, shadow_lines); 560 shadow_color, shadow_lines);
561 561
562 LLModalDialog::draw(); 562 LLModalDialog::draw();