Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
edbc980d
Commit
edbc980d
authored
2 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix findChild abuse in new debug settings floater
parent
ef93c962
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llfloatersettingsdebug.cpp
+224
-225
224 additions, 225 deletions
indra/newview/llfloatersettingsdebug.cpp
indra/newview/llfloatersettingsdebug.h
+13
-0
13 additions, 0 deletions
indra/newview/llfloatersettingsdebug.h
with
237 additions
and
225 deletions
indra/newview/llfloatersettingsdebug.cpp
+
224
−
225
View file @
edbc980d
...
...
@@ -54,6 +54,18 @@ BOOL LLFloaterSettingsDebug::postBuild()
{
enableResizeCtrls
(
true
,
false
,
true
);
mValSpinner1
=
getChild
<
LLSpinCtrl
>
(
"val_spinner_1"
);
mValSpinner2
=
getChild
<
LLSpinCtrl
>
(
"val_spinner_2"
);
mValSpinner3
=
getChild
<
LLSpinCtrl
>
(
"val_spinner_3"
);
mValSpinner4
=
getChild
<
LLSpinCtrl
>
(
"val_spinner_4"
);
mBooleanCombo
=
getChild
<
LLUICtrl
>
(
"boolean_combo"
);
mValText
=
getChild
<
LLUICtrl
>
(
"val_text"
);
mColorSwatch
=
getChild
<
LLColorSwatchCtrl
>
(
"val_color_swatch"
);
mDefaultButton
=
getChild
<
LLUICtrl
>
(
"default_btn"
);
mSettingNameText
=
getChild
<
LLTextBox
>
(
"setting_name_txt"
);
mComment
=
getChild
<
LLTextEditor
>
(
"comment_text"
);
getChild
<
LLFilterEditor
>
(
"filter_input"
)
->
setCommitCallback
(
boost
::
bind
(
&
LLFloaterSettingsDebug
::
setSearchFilter
,
this
,
_2
));
...
...
@@ -109,67 +121,67 @@ void LLFloaterSettingsDebug::onCommitSettings()
switch
(
controlp
->
type
())
{
case
TYPE_U32
:
controlp
->
set
(
getChild
<
LLUICtrl
>
(
"val_s
pinner
_1"
)
->
getValue
());
controlp
->
set
(
mValS
pinner
1
->
getValue
());
break
;
case
TYPE_S32
:
controlp
->
set
(
getChild
<
LLUICtrl
>
(
"val_s
pinner
_1"
)
->
getValue
());
controlp
->
set
(
mValS
pinner
1
->
getValue
());
break
;
case
TYPE_F32
:
controlp
->
set
(
LLSD
(
getChild
<
LLUICtrl
>
(
"val_s
pinner
_1"
)
->
getValue
().
asReal
()));
controlp
->
set
(
LLSD
(
mValS
pinner
1
->
getValue
().
asReal
()));
break
;
case
TYPE_BOOLEAN
:
controlp
->
set
(
getChild
<
LLUICtrl
>
(
"b
oolean
_c
ombo
"
)
->
getValue
());
controlp
->
set
(
mB
oolean
C
ombo
->
getValue
());
break
;
case
TYPE_STRING
:
controlp
->
set
(
LLSD
(
getChild
<
LLUICtrl
>
(
"val_t
ext
"
)
->
getValue
().
asString
()));
controlp
->
set
(
LLSD
(
mValT
ext
->
getValue
().
asString
()));
break
;
case
TYPE_VEC3
:
vector
.
mV
[
VX
]
=
(
F32
)
getChild
<
LLUICtrl
>
(
"val_s
pinner
_1"
)
->
getValue
().
asReal
();
vector
.
mV
[
VY
]
=
(
F32
)
getChild
<
LLUICtrl
>
(
"val_s
pinner
_2"
)
->
getValue
().
asReal
();
vector
.
mV
[
VZ
]
=
(
F32
)
getChild
<
LLUICtrl
>
(
"val_s
pinner
_3"
)
->
getValue
().
asReal
();
vector
.
mV
[
VX
]
=
(
F32
)
mValS
pinner
1
->
getValue
().
asReal
();
vector
.
mV
[
VY
]
=
(
F32
)
mValS
pinner
2
->
getValue
().
asReal
();
vector
.
mV
[
VZ
]
=
(
F32
)
mValS
pinner
3
->
getValue
().
asReal
();
controlp
->
set
(
vector
.
getValue
());
break
;
case
TYPE_VEC3D
:
vectord
.
mdV
[
VX
]
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_1"
)
->
getValue
().
asReal
();
vectord
.
mdV
[
VY
]
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_2"
)
->
getValue
().
asReal
();
vectord
.
mdV
[
VZ
]
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_3"
)
->
getValue
().
asReal
();
vectord
.
mdV
[
VX
]
=
mValS
pinner
1
->
getValue
().
asReal
();
vectord
.
mdV
[
VY
]
=
mValS
pinner
2
->
getValue
().
asReal
();
vectord
.
mdV
[
VZ
]
=
mValS
pinner
3
->
getValue
().
asReal
();
controlp
->
set
(
vectord
.
getValue
());
break
;
case
TYPE_VEC4
:
vector4
.
mV
[
VX
]
=
(
F32
)
getChild
<
LLUICtrl
>
(
"val_s
pinner
_1"
)
->
getValue
().
asReal
();
vector4
.
mV
[
VY
]
=
(
F32
)
getChild
<
LLUICtrl
>
(
"val_s
pinner
_2"
)
->
getValue
().
asReal
();
vector4
.
mV
[
VZ
]
=
(
F32
)
getChild
<
LLUICtrl
>
(
"val_s
pinner
_3"
)
->
getValue
().
asReal
();
vector4
.
mV
[
VW
]
=
(
F32
)
getChild
<
LLUICtrl
>
(
"val_s
pinner
_4"
)
->
getValue
().
asReal
();
vector4
.
mV
[
VX
]
=
(
F32
)
mValS
pinner
1
->
getValue
().
asReal
();
vector4
.
mV
[
VY
]
=
(
F32
)
mValS
pinner
2
->
getValue
().
asReal
();
vector4
.
mV
[
VZ
]
=
(
F32
)
mValS
pinner
3
->
getValue
().
asReal
();
vector4
.
mV
[
VW
]
=
(
F32
)
mValS
pinner
4
->
getValue
().
asReal
();
controlp
->
set
(
vector4
.
getValue
());
break
;
case
TYPE_QUAT
:
quat
.
mQ
[
VX
]
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_1"
)
->
getValue
().
asReal
();
quat
.
mQ
[
VY
]
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_2"
)
->
getValue
().
asReal
();
quat
.
mQ
[
VZ
]
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_3"
)
->
getValue
().
asReal
();
quat
.
mQ
[
VS
]
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_4"
)
->
getValue
().
asReal
();;
quat
.
mQ
[
VX
]
=
mValS
pinner
1
->
getValue
().
asReal
();
quat
.
mQ
[
VY
]
=
mValS
pinner
2
->
getValue
().
asReal
();
quat
.
mQ
[
VZ
]
=
mValS
pinner
3
->
getValue
().
asReal
();
quat
.
mQ
[
VS
]
=
mValS
pinner
4
->
getValue
().
asReal
();;
controlp
->
set
(
quat
.
getValue
());
break
;
case
TYPE_RECT
:
rect
.
mLeft
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_1"
)
->
getValue
().
asInteger
();
rect
.
mRight
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_2"
)
->
getValue
().
asInteger
();
rect
.
mBottom
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_3"
)
->
getValue
().
asInteger
();
rect
.
mTop
=
getChild
<
LLUICtrl
>
(
"val_s
pinner
_4"
)
->
getValue
().
asInteger
();
rect
.
mLeft
=
mValS
pinner
1
->
getValue
().
asInteger
();
rect
.
mRight
=
mValS
pinner
2
->
getValue
().
asInteger
();
rect
.
mBottom
=
mValS
pinner
3
->
getValue
().
asInteger
();
rect
.
mTop
=
mValS
pinner
4
->
getValue
().
asInteger
();
controlp
->
set
(
rect
.
getValue
());
break
;
case
TYPE_COL4
:
col3
.
setValue
(
getChild
<
LLUICtrl
>
(
"val_c
olor
_s
watch
"
)
->
getValue
());
col4
=
LLColor4
(
col3
,
(
F32
)
getChild
<
LLUICtrl
>
(
"val_s
pinner
_4"
)
->
getValue
().
asReal
());
col3
.
setValue
(
mC
olor
S
watch
->
getValue
());
col4
=
LLColor4
(
col3
,
(
F32
)
mValS
pinner
4
->
getValue
().
asReal
());
controlp
->
set
(
col4
.
getValue
());
break
;
case
TYPE_COL3
:
controlp
->
set
(
getChild
<
LLUICtrl
>
(
"val_c
olor
_s
watch
"
)
->
getValue
());
//col3.mV[VRED] = (F32)floaterp->
getChild<LLUICtrl>("val_s
pinner
_1")
->getValue().asC();
//col3.mV[VGREEN] = (F32)floaterp->
getChild<LLUICtrl>("val_s
pinner
_2")
->getValue().asReal();
//col3.mV[VBLUE] = (F32)floaterp->
getChild<LLUICtrl>("val_s
pinner
_3")
->getValue().asReal();
controlp
->
set
(
mC
olor
S
watch
->
getValue
());
//col3.mV[VRED] = (F32)floaterp->
mValS
pinner
1
->getValue().asC();
//col3.mV[VGREEN] = (F32)floaterp->
mValS
pinner
2
->getValue().asReal();
//col3.mV[VBLUE] = (F32)floaterp->
mValS
pinner
3
->getValue().asReal();
//controlp->set(col3.getValue());
break
;
case
TYPE_UUID
:
LLUUID
::
parseUUID
(
getChild
<
LLUICtrl
>
(
"val_t
ext
"
)
->
getValue
().
asString
(),
&
uuid
);
LLUUID
::
parseUUID
(
mValT
ext
->
getValue
().
asString
(),
&
uuid
);
controlp
->
set
(
LLSD
(
uuid
));
break
;
default:
...
...
@@ -197,19 +209,6 @@ void LLFloaterSettingsDebug::onClickDefault()
// we've switched controls, or doing per-frame update, so update spinners, etc.
void
LLFloaterSettingsDebug
::
updateControl
(
LLControlVariable
*
controlp
)
{
LLSpinCtrl
*
spinner1
=
getChild
<
LLSpinCtrl
>
(
"val_spinner_1"
);
LLSpinCtrl
*
spinner2
=
getChild
<
LLSpinCtrl
>
(
"val_spinner_2"
);
LLSpinCtrl
*
spinner3
=
getChild
<
LLSpinCtrl
>
(
"val_spinner_3"
);
LLSpinCtrl
*
spinner4
=
getChild
<
LLSpinCtrl
>
(
"val_spinner_4"
);
LLColorSwatchCtrl
*
color_swatch
=
getChild
<
LLColorSwatchCtrl
>
(
"val_color_swatch"
);
if
(
!
spinner1
||
!
spinner2
||
!
spinner3
||
!
spinner4
||
!
color_swatch
)
{
LL_WARNS
()
<<
"Could not find all desired controls by name"
<<
LL_ENDL
;
return
;
}
hideUIControls
();
if
(
controlp
&&
!
isSettingHidden
(
controlp
))
...
...
@@ -218,24 +217,24 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
// If "HideFromEditor" was toggled while the floater is open then we need to manually disable access to the control
// NOTE: this runs per-frame so there's no need to explictly handle onCommitSettings() or onClickDefault()
bool
fEnable
=
!
controlp
->
isHiddenFromSettingsEditor
();
s
pinner1
->
setEnabled
(
fEnable
);
s
pinner2
->
setEnabled
(
fEnable
);
s
pinner3
->
setEnabled
(
fEnable
);
s
pinner4
->
setEnabled
(
fEnable
);
c
olor
_s
watch
->
setEnabled
(
fEnable
);
childSetEnabled
(
"val_text"
,
fEnable
);
childSetEnabled
(
"boolean_combo"
,
fEnable
);
childSetEnabled
(
"default_btn"
,
fEnable
);
mValS
pinner1
->
setEnabled
(
fEnable
);
mValS
pinner2
->
setEnabled
(
fEnable
);
mValS
pinner3
->
setEnabled
(
fEnable
);
mValS
pinner4
->
setEnabled
(
fEnable
);
mC
olor
S
watch
->
setEnabled
(
fEnable
);
mValText
->
setEnabled
(
fEnable
);
mBooleanCombo
->
setEnabled
(
fEnable
);
mDefaultButton
->
setEnabled
(
fEnable
);
// [/RLVa:KB]
eControlType
type
=
controlp
->
type
();
//hide combo box only for non booleans, otherwise this will result in the combo box closing every frame
getChildView
(
"b
oolean
_c
ombo
"
)
->
setVisible
(
type
==
TYPE_BOOLEAN
);
getChildView
(
"default_btn"
)
->
setVisible
(
true
);
getChildView
(
"s
etting
_n
ame
_txt"
)
->
setVisible
(
true
);
getChild
<
LLTextBox
>
(
"s
etting
_n
ame
_txt"
)
->
setText
(
controlp
->
getName
());
getChild
<
LLTextBox
>
(
"s
etting
_n
ame
_txt"
)
->
setToolTip
(
controlp
->
getName
());
mB
oolean
C
ombo
->
setVisible
(
type
==
TYPE_BOOLEAN
);
mDefaultButton
->
setVisible
(
true
);
mS
etting
N
ame
Text
->
setVisible
(
true
);
mS
etting
N
ame
Text
->
setText
(
controlp
->
getName
());
mS
etting
N
ame
Text
->
setToolTip
(
controlp
->
getName
());
mComment
->
setVisible
(
true
);
std
::
string
old_text
=
mComment
->
getText
();
...
...
@@ -248,111 +247,111 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
mComment
->
setText
(
controlp
->
getComment
());
}
s
pinner1
->
setMaxValue
(
F32_MAX
);
s
pinner2
->
setMaxValue
(
F32_MAX
);
s
pinner3
->
setMaxValue
(
F32_MAX
);
s
pinner4
->
setMaxValue
(
F32_MAX
);
s
pinner1
->
setMinValue
(
-
F32_MAX
);
s
pinner2
->
setMinValue
(
-
F32_MAX
);
s
pinner3
->
setMinValue
(
-
F32_MAX
);
s
pinner4
->
setMinValue
(
-
F32_MAX
);
if
(
!
s
pinner1
->
hasFocus
())
mValS
pinner1
->
setMaxValue
(
F32_MAX
);
mValS
pinner2
->
setMaxValue
(
F32_MAX
);
mValS
pinner3
->
setMaxValue
(
F32_MAX
);
mValS
pinner4
->
setMaxValue
(
F32_MAX
);
mValS
pinner1
->
setMinValue
(
-
F32_MAX
);
mValS
pinner2
->
setMinValue
(
-
F32_MAX
);
mValS
pinner3
->
setMinValue
(
-
F32_MAX
);
mValS
pinner4
->
setMinValue
(
-
F32_MAX
);
if
(
!
mValS
pinner1
->
hasFocus
())
{
s
pinner1
->
setIncrement
(
0.1
f
);
mValS
pinner1
->
setIncrement
(
0.1
f
);
}
if
(
!
s
pinner2
->
hasFocus
())
if
(
!
mValS
pinner2
->
hasFocus
())
{
s
pinner2
->
setIncrement
(
0.1
f
);
mValS
pinner2
->
setIncrement
(
0.1
f
);
}
if
(
!
s
pinner3
->
hasFocus
())
if
(
!
mValS
pinner3
->
hasFocus
())
{
s
pinner3
->
setIncrement
(
0.1
f
);
mValS
pinner3
->
setIncrement
(
0.1
f
);
}
if
(
!
s
pinner4
->
hasFocus
())
if
(
!
mValS
pinner4
->
hasFocus
())
{
s
pinner4
->
setIncrement
(
0.1
f
);
mValS
pinner4
->
setIncrement
(
0.1
f
);
}
LLSD
sd
=
controlp
->
get
();
switch
(
type
)
{
case
TYPE_U32
:
s
pinner1
->
setVisible
(
TRUE
);
s
pinner1
->
setLabel
(
std
::
string
(
"value"
));
// Debug, don't translate
if
(
!
s
pinner1
->
hasFocus
())
mValS
pinner1
->
setVisible
(
TRUE
);
mValS
pinner1
->
setLabel
(
std
::
string
(
"value"
));
// Debug, don't translate
if
(
!
mValS
pinner1
->
hasFocus
())
{
s
pinner1
->
setValue
(
sd
);
s
pinner1
->
setMinValue
((
F32
)
U32_MIN
);
s
pinner1
->
setMaxValue
((
F32
)
U32_MAX
);
s
pinner1
->
setIncrement
(
1.
f
);
s
pinner1
->
setPrecision
(
0
);
mValS
pinner1
->
setValue
(
sd
);
mValS
pinner1
->
setMinValue
((
F32
)
U32_MIN
);
mValS
pinner1
->
setMaxValue
((
F32
)
U32_MAX
);
mValS
pinner1
->
setIncrement
(
1.
f
);
mValS
pinner1
->
setPrecision
(
0
);
}
break
;
case
TYPE_S32
:
s
pinner1
->
setVisible
(
TRUE
);
s
pinner1
->
setLabel
(
std
::
string
(
"value"
));
// Debug, don't translate
if
(
!
s
pinner1
->
hasFocus
())
mValS
pinner1
->
setVisible
(
TRUE
);
mValS
pinner1
->
setLabel
(
std
::
string
(
"value"
));
// Debug, don't translate
if
(
!
mValS
pinner1
->
hasFocus
())
{
s
pinner1
->
setValue
(
sd
);
s
pinner1
->
setMinValue
((
F32
)
S32_MIN
);
s
pinner1
->
setMaxValue
((
F32
)
S32_MAX
);
s
pinner1
->
setIncrement
(
1.
f
);
s
pinner1
->
setPrecision
(
0
);
mValS
pinner1
->
setValue
(
sd
);
mValS
pinner1
->
setMinValue
((
F32
)
S32_MIN
);
mValS
pinner1
->
setMaxValue
((
F32
)
S32_MAX
);
mValS
pinner1
->
setIncrement
(
1.
f
);
mValS
pinner1
->
setPrecision
(
0
);
}
break
;
case
TYPE_F32
:
s
pinner1
->
setVisible
(
TRUE
);
s
pinner1
->
setLabel
(
std
::
string
(
"value"
));
// Debug, don't translate
if
(
!
s
pinner1
->
hasFocus
())
mValS
pinner1
->
setVisible
(
TRUE
);
mValS
pinner1
->
setLabel
(
std
::
string
(
"value"
));
// Debug, don't translate
if
(
!
mValS
pinner1
->
hasFocus
())
{
s
pinner1
->
setPrecision
(
3
);
s
pinner1
->
setValue
(
sd
);
mValS
pinner1
->
setPrecision
(
3
);
mValS
pinner1
->
setValue
(
sd
);
}
break
;
case
TYPE_BOOLEAN
:
if
(
!
getChild
<
LLUICtrl
>
(
"b
oolean
_c
ombo
"
)
->
hasFocus
())
if
(
!
mB
oolean
C
ombo
->
hasFocus
())
{
if
(
sd
.
asBoolean
())
{
getChild
<
LLUICtrl
>
(
"b
oolean
_c
ombo
"
)
->
setValue
(
LLSD
(
"true"
));
mB
oolean
C
ombo
->
setValue
(
LLSD
(
"true"
));
}
else
{
getChild
<
LLUICtrl
>
(
"b
oolean
_c
ombo
"
)
->
setValue
(
LLSD
(
""
));
mB
oolean
C
ombo
->
setValue
(
LLSD
(
""
));
}
}
break
;
case
TYPE_STRING
:
getChildView
(
"val_t
ext
"
)
->
setVisible
(
TRUE
);
if
(
!
getChild
<
LLUICtrl
>
(
"val_t
ext
"
)
->
hasFocus
())
mValT
ext
->
setVisible
(
TRUE
);
if
(
!
mValT
ext
->
hasFocus
())
{
getChild
<
LLUICtrl
>
(
"val_t
ext
"
)
->
setValue
(
sd
);
mValT
ext
->
setValue
(
sd
);
}
break
;
case
TYPE_VEC3
:
{
LLVector3
v
;
v
.
setValue
(
sd
);
s
pinner1
->
setVisible
(
TRUE
);
s
pinner1
->
setLabel
(
std
::
string
(
"X"
));
s
pinner2
->
setVisible
(
TRUE
);
s
pinner2
->
setLabel
(
std
::
string
(
"Y"
));
s
pinner3
->
setVisible
(
TRUE
);
s
pinner3
->
setLabel
(
std
::
string
(
"Z"
));
if
(
!
s
pinner1
->
hasFocus
())
mValS
pinner1
->
setVisible
(
TRUE
);
mValS
pinner1
->
setLabel
(
std
::
string
(
"X"
));
mValS
pinner2
->
setVisible
(
TRUE
);
mValS
pinner2
->
setLabel
(
std
::
string
(
"Y"
));
mValS
pinner3
->
setVisible
(
TRUE
);
mValS
pinner3
->
setLabel
(
std
::
string
(
"Z"
));
if
(
!
mValS
pinner1
->
hasFocus
())
{
s
pinner1
->
setPrecision
(
3
);
s
pinner1
->
setValue
(
v
[
VX
]);
mValS
pinner1
->
setPrecision
(
3
);
mValS
pinner1
->
setValue
(
v
[
VX
]);
}
if
(
!
s
pinner2
->
hasFocus
())
if
(
!
mValS
pinner2
->
hasFocus
())
{
s
pinner2
->
setPrecision
(
3
);
s
pinner2
->
setValue
(
v
[
VY
]);
mValS
pinner2
->
setPrecision
(
3
);
mValS
pinner2
->
setValue
(
v
[
VY
]);
}
if
(
!
s
pinner3
->
hasFocus
())
if
(
!
mValS
pinner3
->
hasFocus
())
{
s
pinner3
->
setPrecision
(
3
);
s
pinner3
->
setValue
(
v
[
VZ
]);
mValS
pinner3
->
setPrecision
(
3
);
mValS
pinner3
->
setValue
(
v
[
VZ
]);
}
break
;
}
...
...
@@ -360,26 +359,26 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLVector3d
v
;
v
.
setValue
(
sd
);
s
pinner1
->
setVisible
(
TRUE
);
s
pinner1
->
setLabel
(
std
::
string
(
"X"
));
s
pinner2
->
setVisible
(
TRUE
);
s
pinner2
->
setLabel
(
std
::
string
(
"Y"
));
s
pinner3
->
setVisible
(
TRUE
);
s
pinner3
->
setLabel
(
std
::
string
(
"Z"
));
if
(
!
s
pinner1
->
hasFocus
())
mValS
pinner1
->
setVisible
(
TRUE
);
mValS
pinner1
->
setLabel
(
std
::
string
(
"X"
));
mValS
pinner2
->
setVisible
(
TRUE
);
mValS
pinner2
->
setLabel
(
std
::
string
(
"Y"
));
mValS
pinner3
->
setVisible
(
TRUE
);
mValS
pinner3
->
setLabel
(
std
::
string
(
"Z"
));
if
(
!
mValS
pinner1
->
hasFocus
())
{
s
pinner1
->
setPrecision
(
3
);
s
pinner1
->
setValue
(
v
[
VX
]);
mValS
pinner1
->
setPrecision
(
3
);
mValS
pinner1
->
setValue
(
v
[
VX
]);
}
if
(
!
s
pinner2
->
hasFocus
())
if
(
!
mValS
pinner2
->
hasFocus
())
{
s
pinner2
->
setPrecision
(
3
);
s
pinner2
->
setValue
(
v
[
VY
]);
mValS
pinner2
->
setPrecision
(
3
);
mValS
pinner2
->
setValue
(
v
[
VY
]);
}
if
(
!
s
pinner3
->
hasFocus
())
if
(
!
mValS
pinner3
->
hasFocus
())
{
s
pinner3
->
setPrecision
(
3
);
s
pinner3
->
setValue
(
v
[
VZ
]);
mValS
pinner3
->
setPrecision
(
3
);
mValS
pinner3
->
setValue
(
v
[
VZ
]);
}
break
;
}
...
...
@@ -387,33 +386,33 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLVector4
v
;
v
.
setValue
(
sd
);
s
pinner1
->
setVisible
(
TRUE
);
s
pinner1
->
setLabel
(
std
::
string
(
"X"
));
s
pinner2
->
setVisible
(
TRUE
);
s
pinner2
->
setLabel
(
std
::
string
(
"Y"
));
s
pinner3
->
setVisible
(
TRUE
);
s
pinner3
->
setLabel
(
std
::
string
(
"Z"
));
s
pinner4
->
setVisible
(
TRUE
);
s
pinner4
->
setLabel
(
std
::
string
(
"W"
));
if
(
!
s
pinner1
->
hasFocus
())
mValS
pinner1
->
setVisible
(
TRUE
);
mValS
pinner1
->
setLabel
(
std
::
string
(
"X"
));
mValS
pinner2
->
setVisible
(
TRUE
);
mValS
pinner2
->
setLabel
(
std
::
string
(
"Y"
));
mValS
pinner3
->
setVisible
(
TRUE
);
mValS
pinner3
->
setLabel
(
std
::
string
(
"Z"
));
mValS
pinner4
->
setVisible
(
TRUE
);
mValS
pinner4
->
setLabel
(
std
::
string
(
"W"
));
if
(
!
mValS
pinner1
->
hasFocus
())
{
s
pinner1
->
setPrecision
(
3
);
s
pinner1
->
setValue
(
v
[
VX
]);
mValS
pinner1
->
setPrecision
(
3
);
mValS
pinner1
->
setValue
(
v
[
VX
]);
}
if
(
!
s
pinner2
->
hasFocus
())
if
(
!
mValS
pinner2
->
hasFocus
())
{
s
pinner2
->
setPrecision
(
3
);
s
pinner2
->
setValue
(
v
[
VY
]);
mValS
pinner2
->
setPrecision
(
3
);
mValS
pinner2
->
setValue
(
v
[
VY
]);
}
if
(
!
s
pinner3
->
hasFocus
())
if
(
!
mValS
pinner3
->
hasFocus
())
{
s
pinner3
->
setPrecision
(
3
);
s
pinner3
->
setValue
(
v
[
VZ
]);
mValS
pinner3
->
setPrecision
(
3
);
mValS
pinner3
->
setValue
(
v
[
VZ
]);
}
if
(
!
s
pinner4
->
hasFocus
())
if
(
!
mValS
pinner4
->
hasFocus
())
{
s
pinner4
->
setPrecision
(
3
);
s
pinner4
->
setValue
(
v
[
VW
]);
mValS
pinner4
->
setPrecision
(
3
);
mValS
pinner4
->
setValue
(
v
[
VW
]);
}
break
;
}
...
...
@@ -421,33 +420,33 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLQuaternion
q
;
q
.
setValue
(
sd
);
s
pinner1
->
setVisible
(
TRUE
);
s
pinner1
->
setLabel
(
std
::
string
(
"X"
));
s
pinner2
->
setVisible
(
TRUE
);
s
pinner2
->
setLabel
(
std
::
string
(
"Y"
));
s
pinner3
->
setVisible
(
TRUE
);
s
pinner3
->
setLabel
(
std
::
string
(
"Z"
));
s
pinner4
->
setVisible
(
TRUE
);
s
pinner4
->
setLabel
(
std
::
string
(
"S"
));
if
(
!
s
pinner1
->
hasFocus
())
mValS
pinner1
->
setVisible
(
TRUE
);
mValS
pinner1
->
setLabel
(
std
::
string
(
"X"
));
mValS
pinner2
->
setVisible
(
TRUE
);
mValS
pinner2
->
setLabel
(
std
::
string
(
"Y"
));
mValS
pinner3
->
setVisible
(
TRUE
);
mValS
pinner3
->
setLabel
(
std
::
string
(
"Z"
));
mValS
pinner4
->
setVisible
(
TRUE
);
mValS
pinner4
->
setLabel
(
std
::
string
(
"S"
));
if
(
!
mValS
pinner1
->
hasFocus
())
{
s
pinner1
->
setPrecision
(
4
);
s
pinner1
->
setValue
(
q
.
mQ
[
VX
]);
mValS
pinner1
->
setPrecision
(
4
);
mValS
pinner1
->
setValue
(
q
.
mQ
[
VX
]);
}
if
(
!
s
pinner2
->
hasFocus
())
if
(
!
mValS
pinner2
->
hasFocus
())
{
s
pinner2
->
setPrecision
(
4
);
s
pinner2
->
setValue
(
q
.
mQ
[
VY
]);
mValS
pinner2
->
setPrecision
(
4
);
mValS
pinner2
->
setValue
(
q
.
mQ
[
VY
]);
}
if
(
!
s
pinner3
->
hasFocus
())
if
(
!
mValS
pinner3
->
hasFocus
())
{
s
pinner3
->
setPrecision
(
4
);
s
pinner3
->
setValue
(
q
.
mQ
[
VZ
]);
mValS
pinner3
->
setPrecision
(
4
);
mValS
pinner3
->
setValue
(
q
.
mQ
[
VZ
]);
}
if
(
!
s
pinner4
->
hasFocus
())
if
(
!
mValS
pinner4
->
hasFocus
())
{
s
pinner4
->
setPrecision
(
4
);
s
pinner4
->
setValue
(
q
.
mQ
[
VS
]);
mValS
pinner4
->
setPrecision
(
4
);
mValS
pinner4
->
setValue
(
q
.
mQ
[
VS
]);
}
break
;
}
...
...
@@ -455,70 +454,70 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLRect
r
;
r
.
setValue
(
sd
);
s
pinner1
->
setVisible
(
TRUE
);
s
pinner1
->
setLabel
(
std
::
string
(
"Left"
));
s
pinner2
->
setVisible
(
TRUE
);
s
pinner2
->
setLabel
(
std
::
string
(
"Right"
));
s
pinner3
->
setVisible
(
TRUE
);
s
pinner3
->
setLabel
(
std
::
string
(
"Bottom"
));
s
pinner4
->
setVisible
(
TRUE
);
s
pinner4
->
setLabel
(
std
::
string
(
"Top"
));
if
(
!
s
pinner1
->
hasFocus
())
mValS
pinner1
->
setVisible
(
TRUE
);
mValS
pinner1
->
setLabel
(
std
::
string
(
"Left"
));
mValS
pinner2
->
setVisible
(
TRUE
);
mValS
pinner2
->
setLabel
(
std
::
string
(
"Right"
));
mValS
pinner3
->
setVisible
(
TRUE
);
mValS
pinner3
->
setLabel
(
std
::
string
(
"Bottom"
));
mValS
pinner4
->
setVisible
(
TRUE
);
mValS
pinner4
->
setLabel
(
std
::
string
(
"Top"
));
if
(
!
mValS
pinner1
->
hasFocus
())
{
s
pinner1
->
setPrecision
(
0
);
s
pinner1
->
setValue
(
r
.
mLeft
);
mValS
pinner1
->
setPrecision
(
0
);
mValS
pinner1
->
setValue
(
r
.
mLeft
);
}
if
(
!
s
pinner2
->
hasFocus
())
if
(
!
mValS
pinner2
->
hasFocus
())
{
s
pinner2
->
setPrecision
(
0
);
s
pinner2
->
setValue
(
r
.
mRight
);
mValS
pinner2
->
setPrecision
(
0
);
mValS
pinner2
->
setValue
(
r
.
mRight
);
}
if
(
!
s
pinner3
->
hasFocus
())
if
(
!
mValS
pinner3
->
hasFocus
())
{
s
pinner3
->
setPrecision
(
0
);
s
pinner3
->
setValue
(
r
.
mBottom
);
mValS
pinner3
->
setPrecision
(
0
);
mValS
pinner3
->
setValue
(
r
.
mBottom
);
}
if
(
!
s
pinner4
->
hasFocus
())
if
(
!
mValS
pinner4
->
hasFocus
())
{
s
pinner4
->
setPrecision
(
0
);
s
pinner4
->
setValue
(
r
.
mTop
);
mValS
pinner4
->
setPrecision
(
0
);
mValS
pinner4
->
setValue
(
r
.
mTop
);
}
s
pinner1
->
setMinValue
((
F32
)
S32_MIN
);
s
pinner1
->
setMaxValue
((
F32
)
S32_MAX
);
s
pinner1
->
setIncrement
(
1.
f
);
mValS
pinner1
->
setMinValue
((
F32
)
S32_MIN
);
mValS
pinner1
->
setMaxValue
((
F32
)
S32_MAX
);
mValS
pinner1
->
setIncrement
(
1.
f
);
s
pinner2
->
setMinValue
((
F32
)
S32_MIN
);
s
pinner2
->
setMaxValue
((
F32
)
S32_MAX
);
s
pinner2
->
setIncrement
(
1.
f
);
mValS
pinner2
->
setMinValue
((
F32
)
S32_MIN
);
mValS
pinner2
->
setMaxValue
((
F32
)
S32_MAX
);
mValS
pinner2
->
setIncrement
(
1.
f
);
s
pinner3
->
setMinValue
((
F32
)
S32_MIN
);
s
pinner3
->
setMaxValue
((
F32
)
S32_MAX
);
s
pinner3
->
setIncrement
(
1.
f
);
mValS
pinner3
->
setMinValue
((
F32
)
S32_MIN
);
mValS
pinner3
->
setMaxValue
((
F32
)
S32_MAX
);
mValS
pinner3
->
setIncrement
(
1.
f
);
s
pinner4
->
setMinValue
((
F32
)
S32_MIN
);
s
pinner4
->
setMaxValue
((
F32
)
S32_MAX
);
s
pinner4
->
setIncrement
(
1.
f
);
mValS
pinner4
->
setMinValue
((
F32
)
S32_MIN
);
mValS
pinner4
->
setMaxValue
((
F32
)
S32_MAX
);
mValS
pinner4
->
setIncrement
(
1.
f
);
break
;
}
case
TYPE_COL4
:
{
LLColor4
clr
;
clr
.
setValue
(
sd
);
c
olor
_s
watch
->
setVisible
(
TRUE
);
mC
olor
S
watch
->
setVisible
(
TRUE
);
// only set if changed so color picker doesn't update
if
(
clr
!=
LLColor4
(
c
olor
_s
watch
->
getValue
()))
if
(
clr
!=
LLColor4
(
mC
olor
S
watch
->
getValue
()))
{
c
olor
_s
watch
->
set
(
LLColor4
(
sd
),
TRUE
,
FALSE
);
mC
olor
S
watch
->
set
(
LLColor4
(
sd
),
TRUE
,
FALSE
);
}
s
pinner4
->
setVisible
(
TRUE
);
s
pinner4
->
setLabel
(
std
::
string
(
"Alpha"
));
if
(
!
s
pinner4
->
hasFocus
())
mValS
pinner4
->
setVisible
(
TRUE
);
mValS
pinner4
->
setLabel
(
std
::
string
(
"Alpha"
));
if
(
!
mValS
pinner4
->
hasFocus
())
{
s
pinner4
->
setPrecision
(
3
);
s
pinner4
->
setMinValue
(
0.0
);
s
pinner4
->
setMaxValue
(
1.
f
);
s
pinner4
->
setValue
(
clr
.
mV
[
VALPHA
]);
mValS
pinner4
->
setPrecision
(
3
);
mValS
pinner4
->
setMinValue
(
0.0
);
mValS
pinner4
->
setMaxValue
(
1.
f
);
mValS
pinner4
->
setValue
(
clr
.
mV
[
VALPHA
]);
}
break
;
}
...
...
@@ -526,15 +525,15 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp)
{
LLColor3
clr
;
clr
.
setValue
(
sd
);
c
olor
_s
watch
->
setVisible
(
TRUE
);
c
olor
_s
watch
->
setValue
(
sd
);
mC
olor
S
watch
->
setVisible
(
TRUE
);
mC
olor
S
watch
->
setValue
(
sd
);
break
;
}
case
TYPE_UUID
:
getChildView
(
"val_t
ext
"
)
->
setVisible
(
TRUE
);
if
(
!
getChild
<
LLUICtrl
>
(
"val_t
ext
"
)
->
hasFocus
())
mValT
ext
->
setVisible
(
TRUE
);
if
(
!
mValT
ext
->
hasFocus
())
{
getChild
<
LLUICtrl
>
(
"val_t
ext
"
)
->
setValue
(
sd
);
mValT
ext
->
setValue
(
sd
);
}
break
;
// [RLVa:KB] - Patch: RLVa-2.1.0
...
...
@@ -704,15 +703,15 @@ void LLFloaterSettingsDebug::updateDefaultColumn(LLControlVariable* control)
void
LLFloaterSettingsDebug
::
hideUIControls
()
{
getChildView
(
"val_s
pinner
_1"
)
->
setVisible
(
false
);
getChildView
(
"val_s
pinner
_2"
)
->
setVisible
(
false
);
getChildView
(
"val_s
pinner
_3"
)
->
setVisible
(
false
);
getChildView
(
"val_s
pinner
_4"
)
->
setVisible
(
false
);
getChildView
(
"val_c
olor
_s
watch
"
)
->
setVisible
(
false
);
getChildView
(
"val_t
ext
"
)
->
setVisible
(
false
);
getChildView
(
"default_btn"
)
->
setVisible
(
false
);
getChildView
(
"b
oolean
_c
ombo
"
)
->
setVisible
(
false
);
getChildView
(
"s
etting
_n
ame
_txt"
)
->
setVisible
(
false
);
mValS
pinner
1
->
setVisible
(
false
);
mValS
pinner
2
->
setVisible
(
false
);
mValS
pinner
3
->
setVisible
(
false
);
mValS
pinner
4
->
setVisible
(
false
);
mC
olor
S
watch
->
setVisible
(
false
);
mValT
ext
->
setVisible
(
false
);
mDefaultButton
->
setVisible
(
false
);
mB
oolean
C
ombo
->
setVisible
(
false
);
mS
etting
N
ame
Text
->
setVisible
(
false
);
mComment
->
setVisible
(
false
);
}
This diff is collapsed.
Click to expand it.
indra/newview/llfloatersettingsdebug.h
+
13
−
0
View file @
edbc980d
...
...
@@ -30,7 +30,10 @@
#include
"llcontrol.h"
#include
"llfloater.h"
class
LLColorSwatchCtrl
;
class
LLScrollListCtrl
;
class
LLSpinCtrl
;
class
LLTextBox
;
class
LLFloaterSettingsDebug
final
:
public
LLFloater
...
...
@@ -67,6 +70,16 @@ class LLFloaterSettingsDebug final
protected:
class
LLTextEditor
*
mComment
;
LLSpinCtrl
*
mValSpinner1
=
nullptr
;
LLSpinCtrl
*
mValSpinner2
=
nullptr
;
LLSpinCtrl
*
mValSpinner3
=
nullptr
;
LLSpinCtrl
*
mValSpinner4
=
nullptr
;
LLUICtrl
*
mBooleanCombo
=
nullptr
;
LLUICtrl
*
mValText
=
nullptr
;
LLUICtrl
*
mDefaultButton
=
nullptr
;
LLTextBox
*
mSettingNameText
=
nullptr
;
LLColorSwatchCtrl
*
mColorSwatch
=
nullptr
;
std
::
string
mSearchFilter
;
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment