diff options
author | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-06 16:23:53 +0300 |
---|---|---|
committer | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-06 16:23:53 +0300 |
commit | 117bd5af1b535f61e1128cead0dcf2503fe24108 (patch) | |
tree | 246064d335523ba0f1d7fc2fc6aee0fbe926ba5c /indra/newview/llfloatermodelpreview.cpp | |
parent | b782f9b0b48b8cb48b306b871aa02c97f3b82c34 (diff) |
SH-2309 FIXED Priority modifications to mesh uploader UI
- Replaced magic number with constant
- Commented my magic numbers
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index e687b1954c..c2872e7651 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -119,8 +119,20 @@ const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PRE const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16; const S32 PREVIEW_TEXTURE_HEIGHT = 300; + +// "Retain%" decomp parameter has values from 0.0 to 1.0 by 0.01 +// But according to the UI spec for upload model floater, this parameter +// should be represented by Retain spinner with values from 1 to 100 by 1. +// To achieve this, RETAIN_COEFFICIENT is used while creating spinner +// and when value is requested from spinner. const double RETAIN_COEFFICIENT = 100; +// "Cosine%" decomp parameter has values from 0.9 to 1 by 0.001 +// But according to the UI spec for upload model floater, this parameter +// should be represented by Smooth combobox with only 10 values. +// So this const is used as a size of Smooth combobox list. +const S32 SMOOTH_VALUES_NUMBER = 10; + void drawBoxOutline(const LLVector3& pos, const LLVector3& size); @@ -1225,15 +1237,14 @@ void LLFloaterModelPreview::initDecompControls() void LLFloaterModelPreview::createSmoothComboBox(LLComboBox* combo_box, float min, float max) { - float combo_list_size = 10; - float delta = (max - min) / combo_list_size; + float delta = (max - min) / SMOOTH_VALUES_NUMBER; int ilabel = 0; combo_box->add("0 (none)", ADD_BOTTOM, true); for(float value = min + delta; value < max; value += delta) { - std::string label = (++ilabel == combo_list_size) ? "10 (max)" : llformat("%.1d", ilabel); + std::string label = (++ilabel == SMOOTH_VALUES_NUMBER) ? "10 (max)" : llformat("%.1d", ilabel); combo_box->add(label, value, ADD_BOTTOM, true); } |