Review #69
This changes where and how the media controls are laid out, and ensures that all of the media region (the face) is clickable. Also moved the volume slider to below the controls (this took WAY too long to do :( ), and adjusted the window region in which the media controls are allowed to be displayed.
Introducing a volume slider that pops up when you hover
over the "mute" button. Fades out with the rest of the
controls. Had to also render (by hand) the background
image. Cleaned up the XUI file.
Review #46
This also adds a feature where llpanelprimmediacontrols remembers
the object/face that you've zoomed in on, and only switches the
zoom/unzoom icon to "unzoom" if the object/face you are hovering over
is actually the object/face you are zoomed in on
- Tweaked the algorithm to shift controls down when zoomed in.
- Adjusted some numbers in the XUI file
- Moved some hard-coded constants into the XUI file so they can be data-driven
Added an optional reset_camera parameter to LLPanelPrimMediaControls ::resetZoomLevel(). Default is true, but if false it prevents the reset from moving the camera, and just resets the internal state for zoom tracking.
Fixed zoom-related bugs in LLPanelPrimMediaControls::close() and LLPanelPrimMediaControls::onClickZoom().
Changed the zooming behavior in LLViewerMediaFocus to match the desired behavior.
Now, LLViewerMedia has explicit skipBack() and skipForward()
functions, and the buttons in LLPanelPrimMediaControls now map
onto those functions neatly.
This actually required some help from James and Richard. Thanks, guys!
This adds custom-drawing of a background image underneath the
icons that make up the media controls in the layout stack.
In order to have this work, we had to publicize API in lllayoutstack
to force relayout to calculate the size.
I also did another cleanup pass ("Boy Scout Rule") that
squirreled away all pertinent controls into membed variables,
instead of doing a getChild() every time updateShape() is called.
Readjusted a bunch of components as well.
Made LLViewerMediaFocus::update clear inworld media focus if LLViewerMediaFocus has lost keyboard focus to anything besides the media controls, or LLToolMgr::inBuildMode() returns true.
Also, never fade the media controls if they have keyboard focus (this fixes the media controls fading out while the user is trying to type an URL).
Added LLViewerMediaImpl::getCurrentMediaURL(), which reflects the most recent url either set with navigateTo or received from the plugin via locationChanged/navigateComplete. LLViewerMediaImpl now uses this when reload() is called.
LLPanelPrimMediaControls now uses getCurrentMediaURL() to get the url it displays in the URL input bar and opens with the pop-out control.