Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
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
JennaHuntsman
XDG Integration
Commits
a039b4b5
Commit
a039b4b5
authored
1 year ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Add camera roll to camera floater
parent
c40bd819
No related branches found
Branches containing commit
No related tags found
2 merge requests
!3
Update to main branch
,
!2
Rebase onto current main branch
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llfloatercamera.cpp
+25
-1
25 additions, 1 deletion
indra/newview/llfloatercamera.cpp
indra/newview/skins/default/xui/en/floater_camera.xml
+33
-3
33 additions, 3 deletions
indra/newview/skins/default/xui/en/floater_camera.xml
with
58 additions
and
4 deletions
indra/newview/llfloatercamera.cpp
+
25
−
1
View file @
a039b4b5
...
...
@@ -81,11 +81,15 @@ class LLPanelCameraZoom
void
onCameraTrack
();
void
onCameraRotate
();
F32
getOrbitRate
(
F32
time
);
void
onRollLeftHeldDown
();
void
onRollRightHeldDown
();
private:
LLButton
*
mPlusBtn
;
LLButton
*
mMinusBtn
;
LLSlider
*
mSlider
;
LLButton
*
mRollLeft
;
LLButton
*
mRollRight
;
};
LLPanelCameraItem
::
Params
::
Params
()
...
...
@@ -164,13 +168,17 @@ static LLPanelInjector<LLPanelCameraZoom> t_camera_zoom_panel("camera_zoom_panel
LLPanelCameraZoom
::
LLPanelCameraZoom
()
:
mPlusBtn
(
NULL
),
mMinusBtn
(
NULL
),
mSlider
(
NULL
)
mSlider
(
NULL
),
mRollLeft
(
NULL
),
mRollRight
(
NULL
)
{
mCommitCallbackRegistrar
.
add
(
"Zoom.minus"
,
boost
::
bind
(
&
LLPanelCameraZoom
::
onZoomMinusHeldDown
,
this
));
mCommitCallbackRegistrar
.
add
(
"Zoom.plus"
,
boost
::
bind
(
&
LLPanelCameraZoom
::
onZoomPlusHeldDown
,
this
));
mCommitCallbackRegistrar
.
add
(
"Slider.value_changed"
,
boost
::
bind
(
&
LLPanelCameraZoom
::
onSliderValueChanged
,
this
));
mCommitCallbackRegistrar
.
add
(
"Camera.track"
,
boost
::
bind
(
&
LLPanelCameraZoom
::
onCameraTrack
,
this
));
mCommitCallbackRegistrar
.
add
(
"Camera.rotate"
,
boost
::
bind
(
&
LLPanelCameraZoom
::
onCameraRotate
,
this
));
mCommitCallbackRegistrar
.
add
(
"Camera.roll_left"
,
boost
::
bind
(
&
LLPanelCameraZoom
::
onRollLeftHeldDown
,
this
));
mCommitCallbackRegistrar
.
add
(
"Camera.roll_right"
,
boost
::
bind
(
&
LLPanelCameraZoom
::
onRollRightHeldDown
,
this
));
}
BOOL
LLPanelCameraZoom
::
postBuild
()
...
...
@@ -178,6 +186,8 @@ BOOL LLPanelCameraZoom::postBuild()
mPlusBtn
=
getChild
<
LLButton
>
(
"zoom_plus_btn"
);
mMinusBtn
=
getChild
<
LLButton
>
(
"zoom_minus_btn"
);
mSlider
=
getChild
<
LLSlider
>
(
"zoom_slider"
);
mRollLeft
=
getChild
<
LLButton
>
(
"roll_left"
);
mRollRight
=
getChild
<
LLButton
>
(
"roll_right"
);
return
LLPanel
::
postBuild
();
}
...
...
@@ -207,6 +217,20 @@ void LLPanelCameraZoom::onZoomMinusHeldDown()
gAgentCamera
.
setOrbitOutKey
(
getOrbitRate
(
time
));
}
void
LLPanelCameraZoom
::
onRollLeftHeldDown
()
{
F32
time
=
mRollLeft
->
getHeldDownTime
();
gAgentCamera
.
unlockView
();
gAgentCamera
.
setRollLeftKey
(
getOrbitRate
(
time
));
}
void
LLPanelCameraZoom
::
onRollRightHeldDown
()
{
F32
time
=
mRollRight
->
getHeldDownTime
();
gAgentCamera
.
unlockView
();
gAgentCamera
.
setRollRightKey
(
getOrbitRate
(
time
));
}
void
LLPanelCameraZoom
::
onCameraTrack
()
{
// EXP-202 when camera panning activated, remove the hint
...
...
This diff is collapsed.
Click to expand it.
indra/newview/skins/default/xui/en/floater_camera.xml
+
33
−
3
View file @
a039b4b5
...
...
@@ -123,8 +123,38 @@
sound_flags=
"3"
visible=
"true"
tool_tip=
"Orbit camera around focus"
top=
"5"
width=
"78"
/>
top=
"3"
width=
"78"
/>
<button
follows=
"top|left"
height=
"18"
image_selected=
"VirtualTrackball_Rotate_Left_Active"
image_unselected=
"VirtualTrackball_Rotate_Left"
layout=
"topleft"
left_delta=
"0"
name=
"roll_left"
width=
"18"
top=
"66"
>
<commit_callback
function=
"Camera.roll_left"
/>
<mouse_held_callback
function=
"Camera.roll_left"
/>
</button>
<button
follows=
"top|left"
height=
"18"
image_selected=
"VirtualTrackball_Rotate_Right_Active"
image_unselected=
"VirtualTrackball_Rotate_Right"
layout=
"topleft"
left_delta=
"60"
name=
"roll_right"
width=
"18"
top=
"66"
>
<commit_callback
function=
"Camera.roll_right"
/>
<mouse_held_callback
function=
"Camera.roll_right"
/>
</button>
<button
follows=
"top|left"
height=
"18"
...
...
@@ -180,7 +210,7 @@
scale_image=
"false"
sound_flags=
"3"
tool_tip=
"Move camera up and down, left and right"
top=
"
5
"
top=
"
3
"
width=
"78"
/>
</panel>
</panel>
...
...
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