aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llsliderctrl.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:04 -0500
committerJacek Antonelli2008-08-15 23:45:04 -0500
commit117e22047c5752352342d64e3fb7ce00a4eb8113 (patch)
treee32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/llui/llsliderctrl.cpp
parentSecond Life viewer sources 1.18.0.6 (diff)
downloadmeta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2
meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/llui/llsliderctrl.cpp')
-rw-r--r--linden/indra/llui/llsliderctrl.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/linden/indra/llui/llsliderctrl.cpp b/linden/indra/llui/llsliderctrl.cpp
index 9a67bca..dff27cc 100644
--- a/linden/indra/llui/llsliderctrl.cpp
+++ b/linden/indra/llui/llsliderctrl.cpp
@@ -57,6 +57,7 @@ LLSliderCtrl::LLSliderCtrl(const LLString& name, const LLRect& rect,
57 S32 text_left, 57 S32 text_left,
58 BOOL show_text, 58 BOOL show_text,
59 BOOL can_edit_text, 59 BOOL can_edit_text,
60 BOOL volume,
60 void (*commit_callback)(LLUICtrl*, void*), 61 void (*commit_callback)(LLUICtrl*, void*),
61 void* callback_user_data, 62 void* callback_user_data,
62 F32 initial_value, F32 min_value, F32 max_value, F32 increment, 63 F32 initial_value, F32 min_value, F32 max_value, F32 increment,
@@ -65,6 +66,7 @@ LLSliderCtrl::LLSliderCtrl(const LLString& name, const LLRect& rect,
65 mFont(font), 66 mFont(font),
66 mShowText( show_text ), 67 mShowText( show_text ),
67 mCanEditText( can_edit_text ), 68 mCanEditText( can_edit_text ),
69 mVolumeSlider( volume ),
68 mPrecision( 3 ), 70 mPrecision( 3 ),
69 mLabelBox( NULL ), 71 mLabelBox( NULL ),
70 mLabelWidth( label_width ), 72 mLabelWidth( label_width ),
@@ -104,7 +106,7 @@ LLSliderCtrl::LLSliderCtrl(const LLString& name, const LLRect& rect,
104 "slider", 106 "slider",
105 slider_rect, 107 slider_rect,
106 LLSliderCtrl::onSliderCommit, this, 108 LLSliderCtrl::onSliderCommit, this,
107 initial_value, min_value, max_value, increment, 109 initial_value, min_value, max_value, increment, volume,
108 control_which ); 110 control_which );
109 addChild( mSlider ); 111 addChild( mSlider );
110 112
@@ -443,6 +445,8 @@ LLXMLNodePtr LLSliderCtrl::getXML(bool save_children) const
443 445
444 node->createChild("can_edit_text", TRUE)->setBoolValue(mCanEditText); 446 node->createChild("can_edit_text", TRUE)->setBoolValue(mCanEditText);
445 447
448 node->createChild("volume", TRUE)->setBoolValue(mVolumeSlider);
449
446 node->createChild("decimal_digits", TRUE)->setIntValue(mPrecision); 450 node->createChild("decimal_digits", TRUE)->setIntValue(mPrecision);
447 451
448 if (mLabelBox) 452 if (mLabelBox)
@@ -494,6 +498,9 @@ LLView* LLSliderCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
494 BOOL can_edit_text = FALSE; 498 BOOL can_edit_text = FALSE;
495 node->getAttributeBOOL("can_edit_text", can_edit_text); 499 node->getAttributeBOOL("can_edit_text", can_edit_text);
496 500
501 BOOL volume = FALSE;
502 node->getAttributeBOOL("volume", volume);
503
497 F32 initial_value = 0.f; 504 F32 initial_value = 0.f;
498 node->getAttributeF32("initial_val", initial_value); 505 node->getAttributeF32("initial_val", initial_value);
499 506
@@ -541,6 +548,7 @@ LLView* LLSliderCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
541 rect.getWidth() - text_left, 548 rect.getWidth() - text_left,
542 show_text, 549 show_text,
543 can_edit_text, 550 can_edit_text,
551 volume,
544 callback, 552 callback,
545 NULL, 553 NULL,
546 initial_value, 554 initial_value,