Merge branch 'DRTVWR-548-maint-N' of https://bitbucket.org/lindenlab/viewer
# Conflicts: # indra/newview/app_settings/settings.xml # indra/newview/llfloaterhoverheight.cpp # indra/newview/llfloatermap.cpp # indra/newview/llfloatermap.h # indra/newview/llfloaterworldmap.cpp # indra/newview/llnetmap.cpp # indra/newview/llnetmap.h # indra/newview/llworldmapview.cpp # indra/newview/skins/default/colors.xml # indra/newview/skins/default/xui/en/menu_mini_map.xmlmaster
commit
f990515d35
|
|
@ -667,7 +667,7 @@ static void settings_to_globals()
|
|||
|
||||
gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc");
|
||||
gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates");
|
||||
LLWorldMapView::sMapScale = gSavedSettings.getF32("MapScale");
|
||||
LLWorldMapView::setScaleSetting(gSavedSettings.getF32("MapScale"));
|
||||
|
||||
#if LL_DARWIN
|
||||
gHiDPISupport = gSavedSettings.getBOOL("RenderHiDPI");
|
||||
|
|
@ -4208,7 +4208,7 @@ void LLAppViewer::cleanupSavedSettings()
|
|||
}
|
||||
}
|
||||
|
||||
gSavedSettings.setF32("MapScale", LLWorldMapView::sMapScale );
|
||||
gSavedSettings.setF32("MapScale", LLWorldMapView::getScaleSetting());
|
||||
|
||||
// Some things are cached in LLAgent.
|
||||
if (gAgent.isInitialized())
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ void LLFloaterHoverHeight::onClose(bool app_quitting)
|
|||
// static
|
||||
void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData)
|
||||
{
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
|
||||
F32 value = sldrCtrl->getValueF32();
|
||||
LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
|
||||
|
|
@ -129,6 +131,7 @@ void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData)
|
|||
gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ", value);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
|
||||
// Do send-to-the-server work when slider drag completes, or new
|
||||
|
|
|
|||
|
|
@ -268,34 +268,6 @@ void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
updateMinorDirections();
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Unused as of 06-02-2014; Handled in LLNetMap
|
||||
//void LLFloaterMap::handleZoom(const LLSD& userdata)
|
||||
//{
|
||||
// std::string level = userdata.asString();
|
||||
//
|
||||
// F32 scale = 0.0f;
|
||||
// if (level == std::string("default"))
|
||||
// {
|
||||
// LLControlVariable *pvar = gSavedSettings.getControl("MiniMapScale");
|
||||
// if(pvar)
|
||||
// {
|
||||
// pvar->resetToDefault();
|
||||
// scale = gSavedSettings.getF32("MiniMapScale");
|
||||
// }
|
||||
// }
|
||||
// else if (level == std::string("close"))
|
||||
// scale = LLNetMap::MAP_SCALE_MAX;
|
||||
// else if (level == std::string("medium"))
|
||||
// scale = LLNetMap::MAP_SCALE_MID;
|
||||
// else if (level == std::string("far"))
|
||||
// scale = LLNetMap::MAP_SCALE_MIN;
|
||||
// if (scale != 0.0f)
|
||||
// {
|
||||
// mMap->setScale(scale);
|
||||
// }
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
|
||||
LLFloaterMap* LLFloaterMap::getInstance()
|
||||
{
|
||||
return LLFloaterReg::getTypedInstance<LLFloaterMap>("mini_map");
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@ public:
|
|||
/*virtual*/ F32 getCurrentTransparency();
|
||||
|
||||
private:
|
||||
// <FS:Ansariel> Unused as of 06-02-2014; Handled in LLNetMap
|
||||
//void handleZoom(const LLSD& userdata);
|
||||
void setDirectionPos( LLTextBox* text_box, F32 rotation );
|
||||
void updateMinorDirections();
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@
|
|||
//---------------------------------------------------------------------------
|
||||
// Constants
|
||||
//---------------------------------------------------------------------------
|
||||
static const F32 MAP_ZOOM_TIME = 0.2f;
|
||||
|
||||
// Merov: we switched from using the "world size" (which varies depending where the user went) to a fixed
|
||||
// width of 512 regions max visible at a time. This makes the zoom slider works in a consistent way across
|
||||
|
|
@ -345,7 +344,7 @@ void* LLFloaterWorldMap::createWorldMapView(void* data)
|
|||
|
||||
BOOL LLFloaterWorldMap::postBuild()
|
||||
{
|
||||
mPanel = getChild<LLPanel>("objects_mapview");
|
||||
mMapView = dynamic_cast<LLWorldMapView*>(getChild<LLPanel>("objects_mapview"));
|
||||
|
||||
LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
|
||||
avatar_combo->selectFirstItem();
|
||||
|
|
@ -366,13 +365,11 @@ BOOL LLFloaterWorldMap::postBuild()
|
|||
landmark_combo->setTextChangedCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
|
||||
mListLandmarkCombo = dynamic_cast<LLCtrlListInterface *>(landmark_combo);
|
||||
|
||||
mCurZoomVal = log(LLWorldMapView::sMapScale/256.f)/log(2.f);
|
||||
getChild<LLUICtrl>("zoom slider")->setValue(mCurZoomVal);
|
||||
F32 slider_zoom = mMapView->getZoom();
|
||||
getChild<LLUICtrl>("zoom slider")->setValue(slider_zoom);
|
||||
|
||||
setDefaultBtn(NULL);
|
||||
|
||||
mZoomTimer.stop();
|
||||
|
||||
onChangeMaturity();
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -389,7 +386,7 @@ LLFloaterWorldMap::~LLFloaterWorldMap()
|
|||
// </FS:Ansariel> Parcel details on map
|
||||
|
||||
// All cleaned up by LLView destructor
|
||||
mPanel = NULL;
|
||||
mMapView = NULL;
|
||||
|
||||
// Inventory deletes all observers on shutdown
|
||||
mInventory = NULL;
|
||||
|
|
@ -427,17 +424,15 @@ void LLFloaterWorldMap::onOpen(const LLSD& key)
|
|||
|
||||
mIsClosing = FALSE;
|
||||
|
||||
LLWorldMapView* map_panel;
|
||||
map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel;
|
||||
map_panel->clearLastClick();
|
||||
mMapView->clearLastClick();
|
||||
|
||||
{
|
||||
// reset pan on show, so it centers on you again
|
||||
if (!center_on_target)
|
||||
{
|
||||
LLWorldMapView::setPan(0, 0, TRUE);
|
||||
mMapView->setPan(0, 0, true);
|
||||
}
|
||||
map_panel->updateVisibleBlocks();
|
||||
mMapView->updateVisibleBlocks();
|
||||
|
||||
// Reload items as they may have changed
|
||||
LLWorldMap::getInstance()->reloadItems();
|
||||
|
|
@ -485,18 +480,21 @@ BOOL LLFloaterWorldMap::handleHover(S32 x, S32 y, MASK mask)
|
|||
|
||||
BOOL LLFloaterWorldMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
{
|
||||
if (!isMinimized() && isFrontmost())
|
||||
{
|
||||
if(mPanel->pointInView(x, y))
|
||||
{
|
||||
F32 slider_value = (F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal();
|
||||
slider_value += ((F32)clicks * -0.3333f);
|
||||
getChild<LLUICtrl>("zoom slider")->setValue(LLSD(slider_value));
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return LLFloater::handleScrollWheel(x, y, clicks);
|
||||
if (!isMinimized() && isFrontmost())
|
||||
{
|
||||
S32 map_x = x - mMapView->getRect().mLeft;
|
||||
S32 map_y = y - mMapView->getRect().mBottom;
|
||||
if (mMapView->pointInView(map_x, map_y))
|
||||
{
|
||||
F32 old_slider_zoom = (F32) getChild<LLUICtrl>("zoom slider")->getValue().asReal();
|
||||
F32 slider_zoom = old_slider_zoom + ((F32) clicks * -0.3333f);
|
||||
getChild<LLUICtrl>("zoom slider")->setValue(LLSD(slider_zoom));
|
||||
mMapView->zoomWithPivot(slider_zoom, map_x, map_y);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return LLFloater::handleScrollWheel(x, y, clicks);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -630,32 +628,13 @@ void LLFloaterWorldMap::draw()
|
|||
|
||||
setMouseOpaque(TRUE);
|
||||
getDragHandle()->setMouseOpaque(TRUE);
|
||||
|
||||
//RN: snaps to zoom value because interpolation caused jitter in the text rendering
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//if (!mZoomTimer.getStarted() && mCurZoomVal != (F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal())
|
||||
if (!mZoomTimer.getStarted() && mCurZoomVal != (F32)zoom_slider->getValue().asReal())
|
||||
// </FS:Ansariel> Performance improvement
|
||||
{
|
||||
mZoomTimer.start();
|
||||
}
|
||||
F32 interp = mZoomTimer.getElapsedTimeF32() / MAP_ZOOM_TIME;
|
||||
if (interp > 1.f)
|
||||
{
|
||||
interp = 1.f;
|
||||
mZoomTimer.stop();
|
||||
}
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//mCurZoomVal = lerp(mCurZoomVal, (F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal(), interp);
|
||||
mCurZoomVal = lerp(mCurZoomVal, (F32)zoom_slider->getValue().asReal(), interp);
|
||||
// </FS:Ansariel> Performance improvement
|
||||
F32 map_scale = 256.f*pow(2.f, mCurZoomVal);
|
||||
LLWorldMapView::setScale( map_scale );
|
||||
|
||||
mMapView->zoom((F32)getChild<LLUICtrl>("zoom slider")->getValue().asReal());
|
||||
|
||||
// Enable/disable checkboxes depending on the zoom level
|
||||
// If above threshold level (i.e. low res) -> Disable all checkboxes
|
||||
// If under threshold level (i.e. high res) -> Enable all checkboxes
|
||||
bool enable = LLWorldMapView::showRegionInfo();
|
||||
bool enable = mMapView->showRegionInfo();
|
||||
// <FS:Ansariel> Performance improvement
|
||||
//getChildView("people_chk")->setEnabled(enable);
|
||||
//getChildView("infohub_chk")->setEnabled(enable);
|
||||
|
|
@ -1358,9 +1337,7 @@ void LLFloaterWorldMap::adjustZoomSliderBounds()
|
|||
S32 world_height_regions = MAX_VISIBLE_REGIONS;
|
||||
|
||||
// Find how much space we have to display the world
|
||||
LLWorldMapView* map_panel;
|
||||
map_panel = (LLWorldMapView*)mPanel;
|
||||
LLRect view_rect = map_panel->getRect();
|
||||
LLRect view_rect = mMapView->getRect();
|
||||
|
||||
// View size in pixels
|
||||
S32 view_width = view_rect.getWidth();
|
||||
|
|
@ -1628,9 +1605,9 @@ void LLFloaterWorldMap::onShowTargetBtn()
|
|||
|
||||
void LLFloaterWorldMap::onShowAgentBtn()
|
||||
{
|
||||
LLWorldMapView::setPan( 0, 0, FALSE); // FALSE == animate
|
||||
// Set flag so user's location will be displayed if not tracking anything else
|
||||
mSetToUserPosition = TRUE;
|
||||
mMapView->setPan(0, 0, false); // false == animate
|
||||
// Set flag so user's location will be displayed if not tracking anything else
|
||||
mSetToUserPosition = true;
|
||||
}
|
||||
|
||||
void LLFloaterWorldMap::onClickTeleportBtn()
|
||||
|
|
@ -1714,9 +1691,10 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate)
|
|||
pos_global.clearVec();
|
||||
}
|
||||
|
||||
LLWorldMapView::setPan( -llfloor((F32)(pos_global.mdV[VX] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)),
|
||||
-llfloor((F32)(pos_global.mdV[VY] * (F64)LLWorldMapView::sMapScale / REGION_WIDTH_METERS)),
|
||||
!animate);
|
||||
F64 map_scale = (F64)mMapView->getScale();
|
||||
mMapView->setPan(-llfloor((F32)(pos_global.mdV[VX] * map_scale / REGION_WIDTH_METERS)),
|
||||
-llfloor((F32)(pos_global.mdV[VY] * map_scale / REGION_WIDTH_METERS)),
|
||||
!animate);
|
||||
mWaitingForTracker = FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1951,7 +1929,7 @@ void LLFloaterWorldMap::onTeleportFinished()
|
|||
{
|
||||
if(isInVisibleChain())
|
||||
{
|
||||
LLWorldMapView::setPan(0, 0, TRUE);
|
||||
mMapView->setPan(0, 0, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2026,9 +2004,8 @@ void LLFloaterWorldMap::onChangeMaturity()
|
|||
|
||||
void LLFloaterWorldMap::onFocusLost()
|
||||
{
|
||||
gViewerWindow->showCursor();
|
||||
LLWorldMapView* map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel;
|
||||
map_panel->mPanning = FALSE;
|
||||
gViewerWindow->showCursor();
|
||||
mMapView->mPanning = false;
|
||||
}
|
||||
|
||||
LLPanelHideBeacon::LLPanelHideBeacon() :
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class LLInventoryObserver;
|
|||
class LLItemInfo;
|
||||
class LLLineEditor;
|
||||
class LLTabContainer;
|
||||
class LLWorldMapView;
|
||||
|
||||
// <FS:Ansariel> Parcel details on map
|
||||
class FSWorldMapParcelInfoObserver : public LLRemoteParcelInfoObserver
|
||||
|
|
@ -186,11 +187,7 @@ protected:
|
|||
// </FS:Ansariel> Parcel details on map
|
||||
|
||||
private:
|
||||
LLPanel* mPanel; // Panel displaying the map
|
||||
|
||||
// Ties to LLWorldMapView::sMapScale, in pixels per region
|
||||
F32 mCurZoomVal;
|
||||
LLFrameTimer mZoomTimer;
|
||||
LLWorldMapView* mMapView; // Panel displaying the map
|
||||
|
||||
// update display of teleport destination coordinates - pos is in global coordinates
|
||||
void updateTeleportCoordsDisplay( const LLVector3d& pos );
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
#include "llfloatersidepanelcontainer.h"
|
||||
// [/SL:KB]
|
||||
#include "llcallingcard.h" // LLAvatarTracker
|
||||
#include "llfloaterland.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llparcel.h"
|
||||
#include "lltracker.h"
|
||||
|
|
@ -92,7 +93,10 @@
|
|||
static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map");
|
||||
|
||||
const F32 LLNetMap::MAP_SCALE_MIN = 32;
|
||||
const F32 LLNetMap::MAP_SCALE_MID = 1024;
|
||||
const F32 LLNetMap::MAP_SCALE_FAR = 32;
|
||||
const F32 LLNetMap::MAP_SCALE_MEDIUM = 128;
|
||||
const F32 LLNetMap::MAP_SCALE_CLOSE = 256;
|
||||
const F32 LLNetMap::MAP_SCALE_VERY_CLOSE = 1024;
|
||||
const F32 LLNetMap::MAP_SCALE_MAX = 4096;
|
||||
|
||||
const F32 MAP_SCALE_ZOOM_FACTOR = 1.04f; // Zoom in factor per click of scroll wheel (4%)
|
||||
|
|
@ -112,13 +116,13 @@ F32 LLNetMap::sScale; // <FS:Ansariel> Synchronizing netmaps throughout instance
|
|||
LLNetMap::LLNetMap (const Params & p)
|
||||
: LLUICtrl (p),
|
||||
mBackgroundColor (p.bg_color()),
|
||||
mScale( MAP_SCALE_MID ),
|
||||
mPixelsPerMeter( MAP_SCALE_MID / REGION_WIDTH_METERS ),
|
||||
mScale( MAP_SCALE_MEDIUM ),
|
||||
mPixelsPerMeter( MAP_SCALE_MEDIUM / REGION_WIDTH_METERS ),
|
||||
mObjectMapTPM(0.f),
|
||||
mObjectMapPixels(0.f),
|
||||
mTargetPan(0.f, 0.f),
|
||||
mCurPan(0.f, 0.f),
|
||||
mStartPan(0.f, 0.f),
|
||||
mPopupWorldPos(0.f, 0.f, 0.f),
|
||||
mMouseDown(0, 0),
|
||||
mPanning(false),
|
||||
// mUpdateNow(false),
|
||||
|
|
@ -177,59 +181,63 @@ LLNetMap::~LLNetMap()
|
|||
|
||||
BOOL LLNetMap::postBuild()
|
||||
{
|
||||
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
|
||||
|
||||
registrar.add("Minimap.Zoom", boost::bind(&LLNetMap::handleZoom, this, _2));
|
||||
registrar.add("Minimap.Tracker", boost::bind(&LLNetMap::handleStopTracking, this, _2));
|
||||
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar commitRegistrar;
|
||||
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enableRegistrar;
|
||||
enableRegistrar.add("Minimap.Zoom.Check", boost::bind(&LLNetMap::isZoomChecked, this, _2));
|
||||
commitRegistrar.add("Minimap.Zoom.Set", boost::bind(&LLNetMap::setZoom, this, _2));
|
||||
commitRegistrar.add("Minimap.Tracker", boost::bind(&LLNetMap::handleStopTracking, this, _2));
|
||||
commitRegistrar.add("Minimap.Center.Activate", boost::bind(&LLNetMap::activateCenterMap, this, _2));
|
||||
enableRegistrar.add("Minimap.MapOrientation.Check", boost::bind(&LLNetMap::isMapOrientationChecked, this, _2));
|
||||
commitRegistrar.add("Minimap.MapOrientation.Set", boost::bind(&LLNetMap::setMapOrientation, this, _2));
|
||||
commitRegistrar.add("Minimap.AboutLand", boost::bind(&LLNetMap::popupShowAboutLand, this, _2));
|
||||
// <FS:Ansariel>
|
||||
registrar.add("Minimap.Mark", boost::bind(&LLNetMap::handleMark, this, _2));
|
||||
registrar.add("Minimap.ClearMark", boost::bind(&LLNetMap::handleClearMark, this));
|
||||
registrar.add("Minimap.ClearMarks", boost::bind(&LLNetMap::handleClearMarks, this));
|
||||
commitRegistrar.add("Minimap.Mark", boost::bind(&LLNetMap::handleMark, this, _2));
|
||||
commitRegistrar.add("Minimap.ClearMark", boost::bind(&LLNetMap::handleClearMark, this));
|
||||
commitRegistrar.add("Minimap.ClearMarks", boost::bind(&LLNetMap::handleClearMarks, this));
|
||||
// </FS:Ansariel>
|
||||
registrar.add("Minimap.Cam", boost::bind(&LLNetMap::handleCam, this));
|
||||
registrar.add("Minimap.StartTracking", boost::bind(&LLNetMap::handleStartTracking, this));
|
||||
commitRegistrar.add("Minimap.Cam", boost::bind(&LLNetMap::handleCam, this));
|
||||
commitRegistrar.add("Minimap.StartTracking", boost::bind(&LLNetMap::handleStartTracking, this));
|
||||
// [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3)
|
||||
registrar.add("Minimap.ShowProfile", boost::bind(&LLNetMap::handleShowProfile, this, _2));
|
||||
registrar.add("Minimap.TextureType", boost::bind(&LLNetMap::handleTextureType, this, _2));
|
||||
registrar.add("Minimap.ToggleOverlay", boost::bind(&LLNetMap::handleOverlayToggle, this, _2));
|
||||
commitRegistrar.add("Minimap.ShowProfile", boost::bind(&LLNetMap::handleShowProfile, this, _2));
|
||||
commitRegistrar.add("Minimap.TextureType", boost::bind(&LLNetMap::handleTextureType, this, _2));
|
||||
commitRegistrar.add("Minimap.ToggleOverlay", boost::bind(&LLNetMap::handleOverlayToggle, this, _2));
|
||||
|
||||
registrar.add("Minimap.AddFriend", boost::bind(&LLNetMap::handleAddFriend, this));
|
||||
registrar.add("Minimap.AddToContactSet", boost::bind(&LLNetMap::handleAddToContactSet, this));
|
||||
registrar.add("Minimap.RemoveFriend", boost::bind(&LLNetMap::handleRemoveFriend, this));
|
||||
registrar.add("Minimap.IM", boost::bind(&LLNetMap::handleIM, this));
|
||||
registrar.add("Minimap.Call", boost::bind(&LLNetMap::handleCall, this));
|
||||
registrar.add("Minimap.Map", boost::bind(&LLNetMap::handleMap, this));
|
||||
registrar.add("Minimap.Share", boost::bind(&LLNetMap::handleShare, this));
|
||||
registrar.add("Minimap.Pay", boost::bind(&LLNetMap::handlePay, this));
|
||||
registrar.add("Minimap.OfferTeleport", boost::bind(&LLNetMap::handleOfferTeleport, this));
|
||||
registrar.add("Minimap.RequestTeleport", boost::bind(&LLNetMap::handleRequestTeleport, this));
|
||||
registrar.add("Minimap.TeleportToAvatar", boost::bind(&LLNetMap::handleTeleportToAvatar, this));
|
||||
registrar.add("Minimap.GroupInvite", boost::bind(&LLNetMap::handleGroupInvite, this));
|
||||
registrar.add("Minimap.GetScriptInfo", boost::bind(&LLNetMap::handleGetScriptInfo, this));
|
||||
registrar.add("Minimap.BlockUnblock", boost::bind(&LLNetMap::handleBlockUnblock, this));
|
||||
registrar.add("Minimap.Report", boost::bind(&LLNetMap::handleReport, this));
|
||||
registrar.add("Minimap.Freeze", boost::bind(&LLNetMap::handleFreeze, this));
|
||||
registrar.add("Minimap.Eject", boost::bind(&LLNetMap::handleEject, this));
|
||||
registrar.add("Minimap.Kick", boost::bind(&LLNetMap::handleKick, this));
|
||||
registrar.add("Minimap.TeleportHome", boost::bind(&LLNetMap::handleTeleportHome, this));
|
||||
registrar.add("Minimap.EstateBan", boost::bind(&LLNetMap::handleEstateBan, this));
|
||||
registrar.add("Minimap.Derender", boost::bind(&LLNetMap::handleDerender, this, false));
|
||||
registrar.add("Minimap.DerenderPermanent", boost::bind(&LLNetMap::handleDerender, this, true));
|
||||
commitRegistrar.add("Minimap.AddFriend", boost::bind(&LLNetMap::handleAddFriend, this));
|
||||
commitRegistrar.add("Minimap.AddToContactSet", boost::bind(&LLNetMap::handleAddToContactSet, this));
|
||||
commitRegistrar.add("Minimap.RemoveFriend", boost::bind(&LLNetMap::handleRemoveFriend, this));
|
||||
commitRegistrar.add("Minimap.IM", boost::bind(&LLNetMap::handleIM, this));
|
||||
commitRegistrar.add("Minimap.Call", boost::bind(&LLNetMap::handleCall, this));
|
||||
commitRegistrar.add("Minimap.Map", boost::bind(&LLNetMap::handleMap, this));
|
||||
commitRegistrar.add("Minimap.Share", boost::bind(&LLNetMap::handleShare, this));
|
||||
commitRegistrar.add("Minimap.Pay", boost::bind(&LLNetMap::handlePay, this));
|
||||
commitRegistrar.add("Minimap.OfferTeleport", boost::bind(&LLNetMap::handleOfferTeleport, this));
|
||||
commitRegistrar.add("Minimap.RequestTeleport", boost::bind(&LLNetMap::handleRequestTeleport, this));
|
||||
commitRegistrar.add("Minimap.TeleportToAvatar", boost::bind(&LLNetMap::handleTeleportToAvatar, this));
|
||||
commitRegistrar.add("Minimap.GroupInvite", boost::bind(&LLNetMap::handleGroupInvite, this));
|
||||
commitRegistrar.add("Minimap.GetScriptInfo", boost::bind(&LLNetMap::handleGetScriptInfo, this));
|
||||
commitRegistrar.add("Minimap.BlockUnblock", boost::bind(&LLNetMap::handleBlockUnblock, this));
|
||||
commitRegistrar.add("Minimap.Report", boost::bind(&LLNetMap::handleReport, this));
|
||||
commitRegistrar.add("Minimap.Freeze", boost::bind(&LLNetMap::handleFreeze, this));
|
||||
commitRegistrar.add("Minimap.Eject", boost::bind(&LLNetMap::handleEject, this));
|
||||
commitRegistrar.add("Minimap.Kick", boost::bind(&LLNetMap::handleKick, this));
|
||||
commitRegistrar.add("Minimap.TeleportHome", boost::bind(&LLNetMap::handleTeleportHome, this));
|
||||
commitRegistrar.add("Minimap.EstateBan", boost::bind(&LLNetMap::handleEstateBan, this));
|
||||
commitRegistrar.add("Minimap.Derender", boost::bind(&LLNetMap::handleDerender, this, false));
|
||||
commitRegistrar.add("Minimap.DerenderPermanent", boost::bind(&LLNetMap::handleDerender, this, true));
|
||||
|
||||
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
|
||||
enable_registrar.add("Minimap.CheckTextureType", boost::bind(&LLNetMap::checkTextureType, this, _2));
|
||||
enableRegistrar.add("Minimap.CheckTextureType", boost::bind(&LLNetMap::checkTextureType, this, _2));
|
||||
|
||||
enable_registrar.add("Minimap.CanAddFriend", boost::bind(&LLNetMap::canAddFriend, this));
|
||||
enable_registrar.add("Minimap.CanRemoveFriend", boost::bind(&LLNetMap::canRemoveFriend, this));
|
||||
enable_registrar.add("Minimap.CanCall", boost::bind(&LLNetMap::canCall, this));
|
||||
enable_registrar.add("Minimap.CanMap", boost::bind(&LLNetMap::canMap, this));
|
||||
enable_registrar.add("Minimap.CanShare", boost::bind(&LLNetMap::canShare, this));
|
||||
enable_registrar.add("Minimap.CanOfferTeleport", boost::bind(&LLNetMap::canOfferTeleport, this));
|
||||
enable_registrar.add("Minimap.CanRequestTeleport", boost::bind(&LLNetMap::canRequestTeleport, this));
|
||||
enable_registrar.add("Minimap.IsBlocked", boost::bind(&LLNetMap::isBlocked, this));
|
||||
enable_registrar.add("Minimap.CanBlock", boost::bind(&LLNetMap::canBlock, this));
|
||||
enable_registrar.add("Minimap.VisibleFreezeEject", boost::bind(&LLNetMap::canFreezeEject, this));
|
||||
enable_registrar.add("Minimap.VisibleKickTeleportHome", boost::bind(&LLNetMap::canKickTeleportHome, this));
|
||||
enableRegistrar.add("Minimap.CanAddFriend", boost::bind(&LLNetMap::canAddFriend, this));
|
||||
enableRegistrar.add("Minimap.CanRemoveFriend", boost::bind(&LLNetMap::canRemoveFriend, this));
|
||||
enableRegistrar.add("Minimap.CanCall", boost::bind(&LLNetMap::canCall, this));
|
||||
enableRegistrar.add("Minimap.CanMap", boost::bind(&LLNetMap::canMap, this));
|
||||
enableRegistrar.add("Minimap.CanShare", boost::bind(&LLNetMap::canShare, this));
|
||||
enableRegistrar.add("Minimap.CanOfferTeleport", boost::bind(&LLNetMap::canOfferTeleport, this));
|
||||
enableRegistrar.add("Minimap.CanRequestTeleport", boost::bind(&LLNetMap::canRequestTeleport, this));
|
||||
enableRegistrar.add("Minimap.IsBlocked", boost::bind(&LLNetMap::isBlocked, this));
|
||||
enableRegistrar.add("Minimap.CanBlock", boost::bind(&LLNetMap::canBlock, this));
|
||||
enableRegistrar.add("Minimap.VisibleFreezeEject", boost::bind(&LLNetMap::canFreezeEject, this));
|
||||
enableRegistrar.add("Minimap.VisibleKickTeleportHome", boost::bind(&LLNetMap::canKickTeleportHome, this));
|
||||
// [/SL:KB]
|
||||
|
||||
// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3)
|
||||
|
|
@ -237,9 +245,11 @@ BOOL LLNetMap::postBuild()
|
|||
mParcelOverlayConn = LLViewerParcelOverlay::setUpdateCallback(boost::bind(&LLNetMap::refreshParcelOverlay, this));
|
||||
// [/SL:KB]
|
||||
|
||||
mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_mini_map.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
|
||||
mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_mini_map.xml", gMenuHolder,
|
||||
LLViewerMenuHolderGL::child_registry_t::instance());
|
||||
mPopupMenu->setItemEnabled("Re-center map", false);
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLNetMap::setScale( F32 scale )
|
||||
|
|
@ -302,7 +312,6 @@ void LLNetMap::draw()
|
|||
static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
|
||||
//static LLUIColor map_track_disabled_color = LLUIColorTable::instance().getColor("MapTrackDisabledColor", LLColor4::white);
|
||||
static LLUIColor map_frustum_color = LLUIColorTable::instance().getColor("MapFrustumColor", LLColor4::white);
|
||||
static LLUIColor map_frustum_rotating_color = LLUIColorTable::instance().getColor("MapFrustumRotatingColor", LLColor4::white);
|
||||
static LLUIColor map_parcel_outline_color = LLUIColorTable::instance().getColor("MapParcelOutlineColor", LLColor4(LLColor3(LLColor4::yellow), 0.5f));
|
||||
static LLUIColor map_whisper_ring_color = LLUIColorTable::instance().getColor("MapWhisperRingColor", LLColor4::blue); // <FS:LO> FIRE-17460 Add Whisper Chat Ring to Minimap
|
||||
static LLUIColor map_chat_ring_color = LLUIColorTable::instance().getColor("MapChatRingColor", LLColor4::yellow);
|
||||
|
|
@ -320,11 +329,25 @@ void LLNetMap::draw()
|
|||
}
|
||||
// [/SL:KB]
|
||||
|
||||
static LLUICachedControl<bool> auto_center("MiniMapAutoCenter", true);
|
||||
if (auto_center)
|
||||
static LLUICachedControl<bool> auto_center("MiniMapAutoCenter", true);
|
||||
bool auto_centering = auto_center && !mPanning;
|
||||
mCentering = mCentering && !mPanning;
|
||||
|
||||
if (auto_centering || mCentering)
|
||||
{
|
||||
mCurPan = lerp(mCurPan, mTargetPan, LLSmoothInterpolation::getInterpolant(0.1f));
|
||||
mCurPan = lerp(mCurPan, LLVector2(0.0f, 0.0f) , LLSmoothInterpolation::getInterpolant(0.1f));
|
||||
}
|
||||
bool centered = abs(mCurPan.mV[VX]) < 0.5f && abs(mCurPan.mV[VY]) < 0.5f;
|
||||
if (centered)
|
||||
{
|
||||
mCurPan.mV[0] = 0.0f;
|
||||
mCurPan.mV[1] = 0.0f;
|
||||
mCentering = false;
|
||||
}
|
||||
|
||||
bool can_recenter_map = !(centered || mCentering || auto_centering);
|
||||
mPopupMenu->setItemEnabled("Re-center map", can_recenter_map);
|
||||
updateAboutLandPopupButton();
|
||||
|
||||
// Prepare a scissor region
|
||||
F32 rotation = 0;
|
||||
|
|
@ -885,47 +908,40 @@ void LLNetMap::draw()
|
|||
F32 horiz_fov = LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect();
|
||||
F32 far_clip_meters = LLViewerCamera::getInstance()->getFar();
|
||||
F32 far_clip_pixels = far_clip_meters * meters_to_pixels;
|
||||
|
||||
F32 half_width_meters = far_clip_meters * tan( horiz_fov / 2 );
|
||||
F32 half_width_pixels = half_width_meters * meters_to_pixels;
|
||||
|
||||
F32 ctr_x = (F32)center_sw_left;
|
||||
F32 ctr_y = (F32)center_sw_bottom;
|
||||
F32 ctr_x = (F32)center_sw_left;
|
||||
F32 ctr_y = (F32)center_sw_bottom;
|
||||
|
||||
const F32 steps_per_circle = 40.0f;
|
||||
const F32 steps_per_radian = steps_per_circle / F_TWO_PI;
|
||||
const F32 arc_start = -(horiz_fov / 2.0f) + F_PI_BY_TWO;
|
||||
const F32 arc_end = (horiz_fov / 2.0f) + F_PI_BY_TWO;
|
||||
const S32 steps = llmax(1, (S32)((horiz_fov * steps_per_radian) + 0.5f));
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
// <FS:Ansariel> Draw pick radius; from Ayamo Nozaki (Exodus Viewer)
|
||||
static LLUIColor pick_radius_color = LLUIColorTable::instance().getColor("MapPickRadiusColor", map_frustum_color());
|
||||
gGL.color4fv((pick_radius_color()).mV);
|
||||
gl_circle_2d(local_mouse_x, local_mouse_y, mDotRadius * fsMinimapPickScale, 32, true);
|
||||
// </FS:Ansariel>
|
||||
// <FS:Ansariel> Draw pick radius; from Ayamo Nozaki (Exodus Viewer)
|
||||
static LLUIColor pick_radius_color = LLUIColorTable::instance().getColor("MapPickRadiusColor", map_frustum_color());
|
||||
gGL.color4fv((pick_radius_color()).mV);
|
||||
gl_circle_2d(local_mouse_x, local_mouse_y, mDotRadius * fsMinimapPickScale, 32, true);
|
||||
// </FS:Ansariel>
|
||||
|
||||
if( rotate_map )
|
||||
{
|
||||
gGL.color4fv((map_frustum_color()).mV);
|
||||
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
gGL.vertex2f( ctr_x, ctr_y );
|
||||
gGL.vertex2f( ctr_x - half_width_pixels, ctr_y + far_clip_pixels );
|
||||
gGL.vertex2f( ctr_x + half_width_pixels, ctr_y + far_clip_pixels );
|
||||
gGL.end();
|
||||
}
|
||||
else
|
||||
{
|
||||
gGL.color4fv((map_frustum_rotating_color()).mV);
|
||||
|
||||
// If we don't rotate the map, we have to rotate the frustum.
|
||||
gGL.pushMatrix();
|
||||
gGL.translatef( ctr_x, ctr_y, 0 );
|
||||
gGL.rotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f);
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
gGL.vertex2f( 0, 0 );
|
||||
gGL.vertex2f( -half_width_pixels, far_clip_pixels );
|
||||
gGL.vertex2f( half_width_pixels, far_clip_pixels );
|
||||
gGL.end();
|
||||
gGL.popMatrix();
|
||||
}
|
||||
if( rotate_map )
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
gGL.translatef( ctr_x, ctr_y, 0 );
|
||||
gl_washer_segment_2d(far_clip_pixels, 0, arc_start, arc_end, steps, map_frustum_color(), map_frustum_color());
|
||||
gGL.popMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
gGL.translatef( ctr_x, ctr_y, 0 );
|
||||
// If we don't rotate the map, we have to rotate the frustum.
|
||||
gGL.rotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f);
|
||||
gl_washer_segment_2d(far_clip_pixels, 0, arc_start, arc_end, steps, map_frustum_color(), map_frustum_color());
|
||||
gGL.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
gGL.popMatrix();
|
||||
|
|
@ -1014,6 +1030,65 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
|
|||
}
|
||||
}
|
||||
|
||||
bool LLNetMap::isMouseOnPopupMenu()
|
||||
{
|
||||
if (!mPopupMenu->isOpen())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
S32 popup_x;
|
||||
S32 popup_y;
|
||||
LLUI::getInstance()->getMousePositionLocal(mPopupMenu, &popup_x, &popup_y);
|
||||
// *NOTE: Tolerance is larger than it needs to be because the context menu is offset from the mouse when the menu is opened from certain
|
||||
// directions. This may be a quirk of LLMenuGL::showPopup. -Cosmic,2022-03-22
|
||||
constexpr S32 tolerance = 10;
|
||||
// Test tolerance from all four corners, as the popup menu can appear from a different direction if there's not enough space.
|
||||
// Assume the size of the popup menu is much larger than the provided tolerance.
|
||||
// In practice, this is a [tolerance]px margin around the popup menu.
|
||||
for (S32 sign_x = -1; sign_x <= 1; sign_x += 2)
|
||||
{
|
||||
for (S32 sign_y = -1; sign_y <= 1; sign_y += 2)
|
||||
{
|
||||
if (mPopupMenu->pointInView(popup_x + (sign_x * tolerance), popup_y + (sign_y * tolerance)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLNetMap::updateAboutLandPopupButton()
|
||||
{
|
||||
if (!mPopupMenu->isOpen())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosGlobal(mPopupWorldPos);
|
||||
if (!region)
|
||||
{
|
||||
mPopupMenu->setItemEnabled("About Land", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if the mouse is in the bounds of the popup. If so, it's safe to assume no other hover function will be called, so the hover
|
||||
// parcel can be used to check if location-sensitive tooltip options are available.
|
||||
if (isMouseOnPopupMenu())
|
||||
{
|
||||
LLViewerParcelMgr::getInstance()->setHoverParcel(mPopupWorldPos);
|
||||
LLParcel *hover_parcel = LLViewerParcelMgr::getInstance()->getHoverParcel();
|
||||
bool valid_parcel = false;
|
||||
if (hover_parcel)
|
||||
{
|
||||
valid_parcel = hover_parcel->getOwnerID().notNull();
|
||||
}
|
||||
mPopupMenu->setItemEnabled("About Land", valid_parcel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
|
||||
{
|
||||
x -= ll_round(getRect().getWidth() / 2 + mCurPan.mV[VX]);
|
||||
|
|
@ -1044,23 +1119,23 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
|
|||
|
||||
BOOL LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks)
|
||||
{
|
||||
// note that clicks are reversed from what you'd think: i.e. > 0 means zoom out, < 0 means zoom in
|
||||
F32 new_scale = mScale * pow(MAP_SCALE_ZOOM_FACTOR, -clicks);
|
||||
// note that clicks are reversed from what you'd think: i.e. > 0 means zoom out, < 0 means zoom in
|
||||
F32 new_scale = mScale * pow(MAP_SCALE_ZOOM_FACTOR, -clicks);
|
||||
F32 old_scale = mScale;
|
||||
|
||||
setScale(new_scale);
|
||||
setScale(new_scale);
|
||||
|
||||
static LLUICachedControl<bool> auto_center("MiniMapAutoCenter", true);
|
||||
if (!auto_center)
|
||||
{
|
||||
// Adjust pan to center the zoom on the mouse pointer
|
||||
LLVector2 zoom_offset;
|
||||
zoom_offset.mV[VX] = x - getRect().getWidth() / 2;
|
||||
zoom_offset.mV[VY] = y - getRect().getHeight() / 2;
|
||||
mCurPan -= zoom_offset * mScale / old_scale - zoom_offset;
|
||||
}
|
||||
static LLUICachedControl<bool> auto_center("MiniMapAutoCenter", true);
|
||||
if (!auto_center)
|
||||
{
|
||||
// Adjust pan to center the zoom on the mouse pointer
|
||||
LLVector2 zoom_offset;
|
||||
zoom_offset.mV[VX] = x - getRect().getWidth() / 2;
|
||||
zoom_offset.mV[VY] = y - getRect().getHeight() / 2;
|
||||
mCurPan -= zoom_offset * mScale / old_scale - zoom_offset;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLNetMap::handleToolTip(S32 x, S32 y, MASK mask)
|
||||
|
|
@ -1081,6 +1156,15 @@ BOOL LLNetMap::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
// The popup menu uses the hover parcel when it is open and the mouse is on
|
||||
// top of it, with some additional tolerance. Returning early here prevents
|
||||
// fighting over that hover parcel when getting tooltip info in the
|
||||
// tolerance region.
|
||||
if (isMouseOnPopupMenu())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: RLVa-1.2.2
|
||||
LLStringUtil::format_map_t args; LLAvatarName avName;
|
||||
args["[AGENT]"] = ( (!fRlvCanShowName) && (mClosestAgentToCursor.notNull()) && (LLAvatarNameCache::get(mClosestAgentToCursor, &avName)) ) ? RlvStrings::getAnonym(avName) + "\n" : "";
|
||||
|
|
@ -1587,50 +1671,48 @@ void LLNetMap::createParcelImage()
|
|||
}
|
||||
// [/SL:KB]
|
||||
|
||||
BOOL LLNetMap::handleMouseDown( S32 x, S32 y, MASK mask )
|
||||
BOOL LLNetMap::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if (!(mask & MASK_SHIFT)) return FALSE;
|
||||
// Start panning
|
||||
gFocusMgr.setMouseCapture(this);
|
||||
|
||||
// Start panning
|
||||
gFocusMgr.setMouseCapture(this);
|
||||
|
||||
mStartPan = mCurPan;
|
||||
mMouseDown.mX = x;
|
||||
mMouseDown.mY = y;
|
||||
return TRUE;
|
||||
mStartPan = mCurPan;
|
||||
mMouseDown.mX = x;
|
||||
mMouseDown.mY = y;
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL LLNetMap::handleMouseUp( S32 x, S32 y, MASK mask )
|
||||
BOOL LLNetMap::handleMouseUp(S32 x, S32 y, MASK mask)
|
||||
{
|
||||
if(abs(mMouseDown.mX-x)<3 && abs(mMouseDown.mY-y)<3)
|
||||
handleClick(x,y,mask);
|
||||
if (abs(mMouseDown.mX - x) < 3 && abs(mMouseDown.mY - y) < 3)
|
||||
{
|
||||
handleClick(x, y, mask);
|
||||
}
|
||||
|
||||
if (hasMouseCapture())
|
||||
{
|
||||
if (mPanning)
|
||||
{
|
||||
// restore mouse cursor
|
||||
S32 local_x, local_y;
|
||||
local_x = mMouseDown.mX + llfloor(mCurPan.mV[VX] - mStartPan.mV[VX]);
|
||||
local_y = mMouseDown.mY + llfloor(mCurPan.mV[VY] - mStartPan.mV[VY]);
|
||||
LLRect clip_rect = getRect();
|
||||
clip_rect.stretch(-8);
|
||||
clip_rect.clipPointToRect(mMouseDown.mX, mMouseDown.mY, local_x, local_y);
|
||||
LLUI::getInstance()->setMousePositionLocal(this, local_x, local_y);
|
||||
if (hasMouseCapture())
|
||||
{
|
||||
if (mPanning)
|
||||
{
|
||||
// restore mouse cursor
|
||||
S32 local_x, local_y;
|
||||
local_x = mMouseDown.mX + llfloor(mCurPan.mV[VX] - mStartPan.mV[VX]);
|
||||
local_y = mMouseDown.mY + llfloor(mCurPan.mV[VY] - mStartPan.mV[VY]);
|
||||
LLRect clip_rect = getRect();
|
||||
clip_rect.stretch(-8);
|
||||
clip_rect.clipPointToRect(mMouseDown.mX, mMouseDown.mY, local_x, local_y);
|
||||
LLUI::getInstance()->setMousePositionLocal(this, local_x, local_y);
|
||||
|
||||
// finish the pan
|
||||
mPanning = false;
|
||||
// finish the pan
|
||||
mPanning = false;
|
||||
|
||||
mMouseDown.set(0, 0);
|
||||
mMouseDown.set(0, 0);
|
||||
}
|
||||
gViewerWindow->showCursor();
|
||||
gFocusMgr.setMouseCapture(NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
// auto centre
|
||||
mTargetPan.setZero();
|
||||
}
|
||||
gViewerWindow->showCursor();
|
||||
gFocusMgr.setMouseCapture(NULL);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3)
|
||||
|
|
@ -1676,9 +1758,9 @@ void LLNetMap::handleShowProfile(const LLSD& sdParam) const
|
|||
{
|
||||
LLSD sdParams;
|
||||
sdParams["type"] = "remote_place";
|
||||
sdParams["x"] = mPosGlobalRightClick.mdV[VX];
|
||||
sdParams["y"] = mPosGlobalRightClick.mdV[VY];
|
||||
sdParams["z"] = mPosGlobalRightClick.mdV[VZ];
|
||||
sdParams["x"] = mPopupWorldPos.mdV[VX];
|
||||
sdParams["y"] = mPopupWorldPos.mdV[VY];
|
||||
sdParams["z"] = mPopupWorldPos.mdV[VZ];
|
||||
|
||||
FSFloaterPlaceDetails::showPlaceDetails(sdParams);
|
||||
}
|
||||
|
|
@ -1706,10 +1788,10 @@ BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
if (mPopupMenu)
|
||||
{
|
||||
mPopupWorldPos = viewPosToGlobal(x, y);
|
||||
// [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3)
|
||||
mClosestAgentRightClick = mClosestAgentToCursor;
|
||||
mClosestAgentsRightClick = mClosestAgentsToCursor;
|
||||
mPosGlobalRightClick = viewPosToGlobal(x, y);
|
||||
|
||||
mPopupMenu->setItemVisible("Add to Set Multiple", mClosestAgentsToCursor.size() > 1);
|
||||
mPopupMenu->setItemVisible("More Options", mClosestAgentsToCursor.size() == 1);
|
||||
|
|
@ -1770,10 +1852,10 @@ BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
mPopupMenu->buildDrawLabels();
|
||||
mPopupMenu->updateParent(LLMenuGL::sMenuContainer);
|
||||
// [SL:KB] - Patch: World-MiniMap | Checked: 2012-07-08 (Catznip-3.3)
|
||||
mPopupMenu->setItemVisible("Stop Tracking", LLTracker::isTracking(0));
|
||||
mPopupMenu->setItemVisible("Stop tracking", LLTracker::isTracking(0));
|
||||
mPopupMenu->setItemVisible("Stop Tracking Separator", LLTracker::isTracking(0));
|
||||
// [/SL:KB]
|
||||
// mPopupMenu->setItemEnabled("Stop Tracking", LLTracker::isTracking(0));
|
||||
// mPopupMenu->setItemEnabled("Stop tracking", LLTracker::isTracking(0));
|
||||
LLMenuGL::showPopup(this, mPopupMenu, x, y);
|
||||
}
|
||||
return TRUE;
|
||||
|
|
@ -1825,6 +1907,27 @@ BOOL LLNetMap::handleDoubleClick(S32 x, S32 y, MASK mask)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
F32 LLNetMap::getScaleForName(std::string scale_name)
|
||||
{
|
||||
if (scale_name == "very close")
|
||||
{
|
||||
return LLNetMap::MAP_SCALE_VERY_CLOSE;
|
||||
}
|
||||
else if (scale_name == "close")
|
||||
{
|
||||
return LLNetMap::MAP_SCALE_CLOSE;
|
||||
}
|
||||
else if (scale_name == "medium")
|
||||
{
|
||||
return LLNetMap::MAP_SCALE_MEDIUM;
|
||||
}
|
||||
else if (scale_name == "far")
|
||||
{
|
||||
return LLNetMap::MAP_SCALE_FAR;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLNetMap::outsideSlop( S32 x, S32 y, S32 start_x, S32 start_y, S32 slop )
|
||||
{
|
||||
|
|
@ -1842,7 +1945,7 @@ BOOL LLNetMap::handleHover( S32 x, S32 y, MASK mask )
|
|||
{
|
||||
if (!mPanning)
|
||||
{
|
||||
// just started panning, so hide cursor
|
||||
// Just started panning. Hide cursor.
|
||||
mPanning = true;
|
||||
gViewerWindow->hideCursor();
|
||||
}
|
||||
|
|
@ -1852,62 +1955,40 @@ BOOL LLNetMap::handleHover( S32 x, S32 y, MASK mask )
|
|||
|
||||
// Set pan to value at start of drag + offset
|
||||
mCurPan += delta;
|
||||
mTargetPan = mCurPan;
|
||||
|
||||
gViewerWindow->moveCursorToCenter();
|
||||
}
|
||||
}
|
||||
|
||||
// Doesn't really matter, cursor should be hidden
|
||||
gViewerWindow->setCursor( UI_CURSOR_TOOLPAN );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mask & MASK_SHIFT)
|
||||
{
|
||||
// If shift is held, change the cursor to hint that the map can be dragged
|
||||
gViewerWindow->setCursor( UI_CURSOR_TOOLPAN );
|
||||
}
|
||||
else
|
||||
{
|
||||
gViewerWindow->setCursor( UI_CURSOR_CROSS );
|
||||
}
|
||||
}
|
||||
if (mask & MASK_SHIFT)
|
||||
{
|
||||
// If shift is held, change the cursor to hint that the map can be
|
||||
// dragged. However, holding shift is not required to drag the map.
|
||||
gViewerWindow->setCursor( UI_CURSOR_TOOLPAN );
|
||||
}
|
||||
else
|
||||
{
|
||||
gViewerWindow->setCursor( UI_CURSOR_CROSS );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLNetMap::handleZoom(const LLSD& userdata)
|
||||
bool LLNetMap::isZoomChecked(const LLSD &userdata)
|
||||
{
|
||||
std::string level = userdata.asString();
|
||||
|
||||
F32 scale = 0.0f;
|
||||
// [SL:KB] - Patch: World-MinimapZoom | Checked: 2012-08-15 (Catznip-3.3)
|
||||
//if (level == "close")
|
||||
// scale = 2048.f;
|
||||
//else if (level == "medium")
|
||||
// scale = 512.f;
|
||||
//else if (level == "far")
|
||||
// scale = 128.f;
|
||||
// [/Sl:KB]
|
||||
if (level == std::string("default"))
|
||||
{
|
||||
LLControlVariable *pvar = gSavedSettings.getControl("MiniMapScale");
|
||||
if(pvar)
|
||||
{
|
||||
pvar->resetToDefault();
|
||||
scale = gSavedSettings.getF32("MiniMapScale");
|
||||
}
|
||||
}
|
||||
else if (level == std::string("close"))
|
||||
scale = LLNetMap::MAP_SCALE_MAX;
|
||||
else if (level == std::string("medium"))
|
||||
scale = LLNetMap::MAP_SCALE_MID;
|
||||
else if (level == std::string("far"))
|
||||
scale = LLNetMap::MAP_SCALE_MIN;
|
||||
if (scale != 0.0f)
|
||||
{
|
||||
setScale(scale);
|
||||
}
|
||||
std::string level = userdata.asString();
|
||||
F32 scale = getScaleForName(level);
|
||||
return scale == mScale;
|
||||
}
|
||||
|
||||
void LLNetMap::setZoom(const LLSD &userdata)
|
||||
{
|
||||
std::string level = userdata.asString();
|
||||
F32 scale = getScaleForName(level);
|
||||
if (scale != 0.0f)
|
||||
{
|
||||
setScale(scale);
|
||||
}
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Mark avatar feature
|
||||
|
|
@ -2040,13 +2121,55 @@ void LLNetMap::handleStopTracking (const LLSD& userdata)
|
|||
if (mPopupMenu)
|
||||
{
|
||||
// <FS:Ansariel> Hide tracking option instead of disabling
|
||||
//mPopupMenu->setItemEnabled ("Stop Tracking", false);
|
||||
mPopupMenu->setItemVisible ("Stop Tracking", false);
|
||||
//mPopupMenu->setItemEnabled ("Stop tracking", false);
|
||||
mPopupMenu->setItemVisible ("Stop tracking", false);
|
||||
// </FS:Ansariel>
|
||||
LLTracker::stopTracking (LLTracker::isTracking(NULL));
|
||||
}
|
||||
}
|
||||
|
||||
void LLNetMap::activateCenterMap(const LLSD &userdata) { mCentering = true; }
|
||||
|
||||
bool LLNetMap::isMapOrientationChecked(const LLSD &userdata)
|
||||
{
|
||||
const std::string command_name = userdata.asString();
|
||||
const bool rotate_map = gSavedSettings.getBOOL("MiniMapRotate");
|
||||
if (command_name == "north_at_top")
|
||||
{
|
||||
return !rotate_map;
|
||||
}
|
||||
|
||||
if (command_name == "camera_at_top")
|
||||
{
|
||||
return rotate_map;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLNetMap::setMapOrientation(const LLSD &userdata)
|
||||
{
|
||||
const std::string command_name = userdata.asString();
|
||||
if (command_name == "north_at_top")
|
||||
{
|
||||
gSavedSettings.setBOOL("MiniMapRotate", false);
|
||||
}
|
||||
else if (command_name == "camera_at_top")
|
||||
{
|
||||
gSavedSettings.setBOOL("MiniMapRotate", true);
|
||||
}
|
||||
}
|
||||
|
||||
void LLNetMap::popupShowAboutLand(const LLSD &userdata)
|
||||
{
|
||||
// Update parcel selection. It's important to deselect land first so the "About Land" floater doesn't refresh with the old selection.
|
||||
LLViewerParcelMgr::getInstance()->deselectLand();
|
||||
LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstance()->selectParcelAt(mPopupWorldPos);
|
||||
gMenuHolder->setParcelSelection(selection);
|
||||
|
||||
LLFloaterReg::showInstance("about_land", LLSD(), false);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Synchronize double click handling throughout instances
|
||||
void LLNetMap::performDoubleClickAction(LLVector3d pos_global)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,9 +66,12 @@ protected:
|
|||
public:
|
||||
virtual ~LLNetMap();
|
||||
|
||||
static const F32 MAP_SCALE_MIN;
|
||||
static const F32 MAP_SCALE_MID;
|
||||
static const F32 MAP_SCALE_MAX;
|
||||
static const F32 MAP_SCALE_MIN;
|
||||
static const F32 MAP_SCALE_FAR;
|
||||
static const F32 MAP_SCALE_MEDIUM;
|
||||
static const F32 MAP_SCALE_CLOSE;
|
||||
static const F32 MAP_SCALE_VERY_CLOSE;
|
||||
static const F32 MAP_SCALE_MAX;
|
||||
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
|
||||
|
|
@ -127,6 +130,8 @@ private:
|
|||
const LLColor4& color,
|
||||
BOOL draw_arrow = TRUE);
|
||||
void drawRing(const F32 radius, LLVector3 pos_map, const LLUIColor& color);
|
||||
bool isMouseOnPopupMenu();
|
||||
void updateAboutLandPopupButton();
|
||||
BOOL handleToolTipAgent(const LLUUID& avatar_id);
|
||||
static void showAvatarInspector(const LLUUID& avatar_id);
|
||||
|
||||
|
|
@ -135,6 +140,7 @@ private:
|
|||
void createObjectImage();
|
||||
void createParcelImage();
|
||||
|
||||
F32 getScaleForName(std::string scale_name);
|
||||
void renderPropertyLinesForRegion(const LLViewerRegion* pRegion, const LLColor4U& clrOverlay);
|
||||
// [/SL:KB]
|
||||
// void createObjectImage();
|
||||
|
|
@ -157,11 +163,12 @@ private:
|
|||
F32 mObjectMapPixels; // Width of object map in pixels
|
||||
F32 mDotRadius; // Size of avatar markers
|
||||
|
||||
bool mPanning; // map is being dragged
|
||||
LLVector2 mTargetPan;
|
||||
LLVector2 mCurPan;
|
||||
LLVector2 mStartPan; // pan offset at start of drag
|
||||
LLCoordGL mMouseDown; // pointer position at start of drag
|
||||
bool mPanning; // map is being dragged
|
||||
bool mCentering; // map is being re-centered around the agent
|
||||
LLVector2 mCurPan;
|
||||
LLVector2 mStartPan; // pan offset at start of drag
|
||||
LLVector3d mPopupWorldPos; // world position picked under mouse when context menu is opened
|
||||
LLCoordGL mMouseDown; // pointer position at start of drag
|
||||
|
||||
LLVector3d mObjectImageCenterGlobal;
|
||||
LLPointer<LLImageRaw> mObjectRawImagep;
|
||||
|
|
@ -198,14 +205,18 @@ public:
|
|||
// <FS:CR> Minimap improvements
|
||||
void handleShowProfile(const LLSD& sdParam) const;
|
||||
uuid_vec_t mClosestAgentsToCursor;
|
||||
LLVector3d mPosGlobalRightClick;
|
||||
LLUUID mClosestAgentRightClick;
|
||||
uuid_vec_t mClosestAgentsRightClick;
|
||||
// </FS:CR>
|
||||
|
||||
private:
|
||||
void handleZoom(const LLSD& userdata);
|
||||
void handleStopTracking (const LLSD& userdata);
|
||||
bool isZoomChecked(const LLSD& userdata);
|
||||
void setZoom(const LLSD& userdata);
|
||||
void handleStopTracking(const LLSD& userdata);
|
||||
void activateCenterMap(const LLSD& userdata);
|
||||
bool isMapOrientationChecked(const LLSD& userdata);
|
||||
void setMapOrientation(const LLSD& userdata);
|
||||
void popupShowAboutLand(const LLSD& userdata);
|
||||
void handleStartTracking();
|
||||
void handleMark(const LLSD& userdata);
|
||||
void handleClearMark();
|
||||
|
|
|
|||
|
|
@ -68,9 +68,15 @@
|
|||
|
||||
#include "llglheaders.h"
|
||||
|
||||
// # Constants
|
||||
static const F32 MAP_DEFAULT_SCALE = 128.f;
|
||||
static const F32 MAP_ITERP_TIME_CONSTANT = 0.75f;
|
||||
static const F32 MAP_ZOOM_ACCELERATION_TIME = 0.3f;
|
||||
static const F32 MAP_ZOOM_MAX_INTERP = 0.5f;
|
||||
static const F32 MAP_SCALE_SNAP_THRESHOLD = 0.005f;
|
||||
|
||||
// Basically a C++ implementation of the OCEAN_COLOR defined in mapstitcher.py
|
||||
// Please ensure consistency between those 2 files (TODO: would be better to get that color from an asset source...)
|
||||
// # Constants
|
||||
// OCEAN_COLOR = "#1D475F"
|
||||
const F32 OCEAN_RED = (F32)(0x1D)/255.f;
|
||||
const F32 OCEAN_GREEN = (F32)(0x47)/255.f;
|
||||
|
|
@ -102,14 +108,12 @@ LLUIImagePtr LLWorldMapView::sClassifiedsImage = NULL;
|
|||
LLUIImagePtr LLWorldMapView::sForSaleImage = NULL;
|
||||
LLUIImagePtr LLWorldMapView::sForSaleAdultImage = NULL;
|
||||
|
||||
F32 LLWorldMapView::sPanX = 0.f;
|
||||
F32 LLWorldMapView::sPanY = 0.f;
|
||||
F32 LLWorldMapView::sTargetPanX = 0.f;
|
||||
F32 LLWorldMapView::sTargetPanY = 0.f;
|
||||
S32 LLWorldMapView::sTrackingArrowX = 0;
|
||||
S32 LLWorldMapView::sTrackingArrowY = 0;
|
||||
bool LLWorldMapView::sVisibleTilesLoaded = false;
|
||||
F32 LLWorldMapView::sMapScale = 128.f;
|
||||
F32 LLWorldMapView::sMapScaleSetting = MAP_DEFAULT_SCALE;
|
||||
LLVector2 LLWorldMapView::sZoomPivot = LLVector2(0.0f, 0.0f);
|
||||
LLFrameTimer LLWorldMapView::sZoomTimer = LLFrameTimer();
|
||||
|
||||
std::map<std::string,std::string> LLWorldMapView::sStringsMap;
|
||||
|
||||
|
|
@ -181,20 +185,26 @@ void LLWorldMapView::cleanupClass()
|
|||
sForSaleAdultImage = NULL;
|
||||
}
|
||||
|
||||
LLWorldMapView::LLWorldMapView()
|
||||
: LLPanel(),
|
||||
mBackgroundColor( LLColor4( OCEAN_RED, OCEAN_GREEN, OCEAN_BLUE, 1.f ) ),
|
||||
mItemPicked(FALSE),
|
||||
mPanning( FALSE ),
|
||||
mMouseDownPanX( 0 ),
|
||||
mMouseDownPanY( 0 ),
|
||||
mMouseDownX( 0 ),
|
||||
mMouseDownY( 0 ),
|
||||
mSelectIDStart(0)
|
||||
LLWorldMapView::LLWorldMapView() :
|
||||
LLPanel(),
|
||||
mBackgroundColor(LLColor4(OCEAN_RED, OCEAN_GREEN, OCEAN_BLUE, 1.f)),
|
||||
mItemPicked(FALSE),
|
||||
mPanX(0.f),
|
||||
mPanY(0.f),
|
||||
mTargetPanX(0.f),
|
||||
mTargetPanY(0.f),
|
||||
mPanning(FALSE),
|
||||
mMouseDownPanX(0),
|
||||
mMouseDownPanY(0),
|
||||
mMouseDownX(0),
|
||||
mMouseDownY(0),
|
||||
mSelectIDStart(0),
|
||||
mMapScale(0.f),
|
||||
mTargetMapScale(0.f)
|
||||
{
|
||||
//LL_INFOS("WorldMap") << "Creating the Map -> LLWorldMapView::LLWorldMapView()" << LL_ENDL;
|
||||
// LL_INFOS("WorldMap") << "Creating the Map -> LLWorldMapView::LLWorldMapView()" << LL_ENDL;
|
||||
|
||||
clearLastClick();
|
||||
clearLastClick();
|
||||
}
|
||||
|
||||
BOOL LLWorldMapView::postBuild()
|
||||
|
|
@ -225,6 +235,9 @@ BOOL LLWorldMapView::postBuild()
|
|||
mTextBoxNorthEast ->reshapeToFitText();
|
||||
mTextBoxSouthWest->reshapeToFitText();
|
||||
mTextBoxNorthWest ->reshapeToFitText();
|
||||
|
||||
sZoomTimer.stop();
|
||||
setScale(sMapScaleSetting, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -242,58 +255,102 @@ void LLWorldMapView::cleanupTextures()
|
|||
{
|
||||
}
|
||||
|
||||
void LLWorldMapView::zoom(F32 zoom)
|
||||
{
|
||||
mTargetMapScale = scaleFromZoom(zoom);
|
||||
if (!sZoomTimer.getStarted() && mMapScale != mTargetMapScale)
|
||||
{
|
||||
sZoomPivot = LLVector2(0, 0);
|
||||
sZoomTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
void LLWorldMapView::zoomWithPivot(F32 zoom, S32 x, S32 y)
|
||||
{
|
||||
mTargetMapScale = scaleFromZoom(zoom);
|
||||
sZoomPivot = LLVector2(x, y);
|
||||
if (!sZoomTimer.getStarted() && mMapScale != mTargetMapScale)
|
||||
{
|
||||
sZoomTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
F32 LLWorldMapView::getZoom() { return LLWorldMapView::zoomFromScale(mMapScale); }
|
||||
|
||||
F32 LLWorldMapView::getScale() { return mMapScale; }
|
||||
|
||||
// static
|
||||
void LLWorldMapView::setScale( F32 scale )
|
||||
void LLWorldMapView::setScaleSetting(F32 scaleSetting) { sMapScaleSetting = scaleSetting; }
|
||||
|
||||
// static
|
||||
F32 LLWorldMapView::getScaleSetting() { return sMapScaleSetting; }
|
||||
|
||||
void LLWorldMapView::setScale(F32 scale, bool snap)
|
||||
{
|
||||
if (scale != sMapScale)
|
||||
{
|
||||
F32 old_scale = sMapScale;
|
||||
if (scale != mMapScale)
|
||||
{
|
||||
F32 old_scale = mMapScale;
|
||||
|
||||
sMapScale = scale;
|
||||
if (sMapScale <= 0.f)
|
||||
{
|
||||
sMapScale = 0.1f;
|
||||
}
|
||||
mMapScale = scale;
|
||||
// Set the scale used when saving the setting
|
||||
sMapScaleSetting = scale;
|
||||
if (mMapScale <= 0.f)
|
||||
{
|
||||
mMapScale = 0.1f;
|
||||
}
|
||||
|
||||
F32 ratio = (scale / old_scale);
|
||||
sPanX *= ratio;
|
||||
sPanY *= ratio;
|
||||
sTargetPanX = sPanX;
|
||||
sTargetPanY = sPanY;
|
||||
sVisibleTilesLoaded = false;
|
||||
}
|
||||
F32 ratio = (scale / old_scale);
|
||||
mPanX *= ratio;
|
||||
mPanY *= ratio;
|
||||
mTargetPanX = mPanX;
|
||||
mTargetPanY = mPanY;
|
||||
sVisibleTilesLoaded = false;
|
||||
|
||||
// If we are zooming relative to somewhere else rather than the center of the map, compensate for the difference in panning here
|
||||
if (!sZoomPivot.isExactlyZero())
|
||||
{
|
||||
LLVector2 relative_pivot;
|
||||
relative_pivot.mV[VX] = sZoomPivot.mV[VX] - (getRect().getWidth() / 2.0);
|
||||
relative_pivot.mV[VY] = sZoomPivot.mV[VY] - (getRect().getHeight() / 2.0);
|
||||
LLVector2 zoom_pan_offset = relative_pivot - (relative_pivot * scale / old_scale);
|
||||
mPanX += zoom_pan_offset.mV[VX];
|
||||
mPanY += zoom_pan_offset.mV[VY];
|
||||
mTargetPanX += zoom_pan_offset.mV[VX];
|
||||
mTargetPanY += zoom_pan_offset.mV[VY];
|
||||
}
|
||||
}
|
||||
|
||||
if (snap)
|
||||
{
|
||||
mTargetMapScale = scale;
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLWorldMapView::translatePan(S32 delta_x, S32 delta_y)
|
||||
{
|
||||
mPanX += delta_x;
|
||||
mPanY += delta_y;
|
||||
mTargetPanX = mPanX;
|
||||
mTargetPanY = mPanY;
|
||||
sVisibleTilesLoaded = false;
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLWorldMapView::translatePan( S32 delta_x, S32 delta_y )
|
||||
void LLWorldMapView::setPan(S32 x, S32 y, BOOL snap)
|
||||
{
|
||||
sPanX += delta_x;
|
||||
sPanY += delta_y;
|
||||
sTargetPanX = sPanX;
|
||||
sTargetPanY = sPanY;
|
||||
sVisibleTilesLoaded = false;
|
||||
mTargetPanX = (F32) x;
|
||||
mTargetPanY = (F32) y;
|
||||
if (snap)
|
||||
{
|
||||
mPanX = mTargetPanX;
|
||||
mPanY = mTargetPanY;
|
||||
}
|
||||
sVisibleTilesLoaded = false;
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLWorldMapView::setPan( S32 x, S32 y, BOOL snap )
|
||||
{
|
||||
sTargetPanX = (F32)x;
|
||||
sTargetPanY = (F32)y;
|
||||
if (snap)
|
||||
{
|
||||
sPanX = sTargetPanX;
|
||||
sPanY = sTargetPanY;
|
||||
}
|
||||
sVisibleTilesLoaded = false;
|
||||
}
|
||||
|
||||
bool LLWorldMapView::showRegionInfo()
|
||||
{
|
||||
return (LLWorldMipmap::scaleToLevel(sMapScale) <= DRAW_SIMINFO_THRESHOLD ? true : false);
|
||||
}
|
||||
bool LLWorldMapView::showRegionInfo() { return (LLWorldMipmap::scaleToLevel(mMapScale) <= DRAW_SIMINFO_THRESHOLD ? true : false); }
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// HELPERS
|
||||
|
|
@ -327,8 +384,27 @@ void LLWorldMapView::draw()
|
|||
mVisibleRegions.clear();
|
||||
|
||||
// animate pan if necessary
|
||||
sPanX = lerp(sPanX, sTargetPanX, LLSmoothInterpolation::getInterpolant(0.1f));
|
||||
sPanY = lerp(sPanY, sTargetPanY, LLSmoothInterpolation::getInterpolant(0.1f));
|
||||
mPanX = lerp(mPanX, mTargetPanX, LLSmoothInterpolation::getInterpolant(MAP_ITERP_TIME_CONSTANT));
|
||||
mPanY = lerp(mPanY, mTargetPanY, LLSmoothInterpolation::getInterpolant(MAP_ITERP_TIME_CONSTANT));
|
||||
|
||||
//RN: snaps to zoom value because interpolation caused jitter in the text rendering
|
||||
if (!sZoomTimer.getStarted() && mMapScale != mTargetMapScale)
|
||||
{
|
||||
sZoomTimer.start();
|
||||
}
|
||||
bool snap_scale = false;
|
||||
F32 interp = llmin(MAP_ZOOM_MAX_INTERP, sZoomTimer.getElapsedTimeF32() / MAP_ZOOM_ACCELERATION_TIME);
|
||||
F32 current_zoom_val = zoomFromScale(mMapScale);
|
||||
F32 target_zoom_val = zoomFromScale(mTargetMapScale);
|
||||
F32 new_zoom_val = lerp(current_zoom_val, target_zoom_val, interp);
|
||||
if (abs(new_zoom_val - current_zoom_val) < MAP_SCALE_SNAP_THRESHOLD)
|
||||
{
|
||||
sZoomTimer.stop();
|
||||
snap_scale = true;
|
||||
new_zoom_val = target_zoom_val;
|
||||
}
|
||||
F32 map_scale = scaleFromZoom(new_zoom_val);
|
||||
setScale(map_scale, snap_scale);
|
||||
|
||||
const S32 width = getRect().getWidth();
|
||||
const S32 height = getRect().getHeight();
|
||||
|
|
@ -336,7 +412,7 @@ void LLWorldMapView::draw()
|
|||
const F32 half_height = F32(height) / 2.0f;
|
||||
LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal();
|
||||
|
||||
S32 level = LLWorldMipmap::scaleToLevel(sMapScale);
|
||||
S32 level = LLWorldMipmap::scaleToLevel(mMapScale);
|
||||
|
||||
LLLocalClipRect clip(getLocalRect());
|
||||
{
|
||||
|
|
@ -390,18 +466,18 @@ void LLWorldMapView::draw()
|
|||
|
||||
// Find x and y position relative to camera's center.
|
||||
LLVector3d rel_region_pos = origin_global - camera_global;
|
||||
F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * sMapScale;
|
||||
F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * sMapScale;
|
||||
F32 relative_x = (rel_region_pos.mdV[0] / REGION_WIDTH_METERS) * mMapScale;
|
||||
F32 relative_y = (rel_region_pos.mdV[1] / REGION_WIDTH_METERS) * mMapScale;
|
||||
|
||||
// Coordinates of the sim in pixels in the UI panel
|
||||
// When the view isn't panned, 0,0 = center of rectangle
|
||||
F32 bottom = sPanY + half_height + relative_y;
|
||||
F32 left = sPanX + half_width + relative_x;
|
||||
F32 bottom = mPanY + half_height + relative_y;
|
||||
F32 left = mPanX + half_width + relative_x;
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 top = bottom + sMapScale ;
|
||||
//F32 right = left + sMapScale ;
|
||||
F32 top = bottom+ (sMapScale * (info->mSizeY / REGION_WIDTH_METERS));
|
||||
F32 right = left + (sMapScale * (info->mSizeX / REGION_WIDTH_METERS));
|
||||
//F32 top = bottom + mMapScale ;
|
||||
//F32 right = left + mMapScale ;
|
||||
F32 top = bottom+ (mMapScale * (info->mSizeY / REGION_WIDTH_METERS));
|
||||
F32 right = left + (mMapScale * (info->mSizeX / REGION_WIDTH_METERS));
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// Discard if region is outside the screen rectangle (not visible on screen)
|
||||
|
|
@ -482,10 +558,10 @@ void LLWorldMapView::draw()
|
|||
{
|
||||
// Inform the fetch mechanism of the size we need
|
||||
// <FS:CR> Aurora Sim
|
||||
//S32 draw_size = ll_round(sMapScale);
|
||||
//S32 draw_size = ll_round(mMapScale);
|
||||
//overlayimage->setKnownDrawSize(ll_round(draw_size * LLUI::getScaleFactor().mV[VX]), ll_round(draw_size * LLUI::getScaleFactor().mV[VY]));
|
||||
S32 x_draw_size = ll_round(sMapScale);
|
||||
S32 y_draw_size = ll_round(sMapScale);
|
||||
S32 x_draw_size = ll_round(mMapScale);
|
||||
S32 y_draw_size = ll_round(mMapScale);
|
||||
x_draw_size *= (info->mSizeX / REGION_WIDTH_METERS);
|
||||
y_draw_size *= (info->mSizeY / REGION_WIDTH_METERS);
|
||||
|
||||
|
|
@ -536,7 +612,7 @@ void LLWorldMapView::draw()
|
|||
}
|
||||
|
||||
// Draw the region name in the lower left corner
|
||||
if (sMapScale >= DRAW_TEXT_THRESHOLD)
|
||||
if (mMapScale >= DRAW_TEXT_THRESHOLD)
|
||||
{
|
||||
LLFontGL* font = LLFontGL::getFont(LLFontDescriptor("SansSerif", "Small", LLFontGL::BOLD));
|
||||
std::string mesg;
|
||||
|
|
@ -555,7 +631,7 @@ void LLWorldMapView::draw()
|
|||
LLColor4::white,
|
||||
LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW,
|
||||
S32_MAX, //max_chars
|
||||
sMapScale, //max_pixels
|
||||
mMapScale, //max_pixels
|
||||
NULL,
|
||||
TRUE); //use ellipses
|
||||
|
||||
|
|
@ -586,7 +662,7 @@ void LLWorldMapView::draw()
|
|||
LLColor4::white,
|
||||
LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW,
|
||||
S32_MAX, //max_chars
|
||||
sMapScale, //max_pixels
|
||||
mMapScale, //max_pixels
|
||||
NULL,
|
||||
TRUE); //use ellipses
|
||||
}
|
||||
|
|
@ -724,7 +800,7 @@ void LLWorldMapView::setVisible(BOOL visible)
|
|||
void LLWorldMapView::drawMipmap(S32 width, S32 height)
|
||||
{
|
||||
// Compute the level of the mipmap to use for the current scale level
|
||||
S32 level = LLWorldMipmap::scaleToLevel(sMapScale);
|
||||
S32 level = LLWorldMipmap::scaleToLevel(mMapScale);
|
||||
// Set the tile boost level so that unused tiles get to 0
|
||||
LLWorldMap::getInstance()->equalizeBoostLevels();
|
||||
|
||||
|
|
@ -1049,7 +1125,7 @@ void LLWorldMapView::drawAgents()
|
|||
void LLWorldMapView::drawFrustum()
|
||||
{
|
||||
// Draw frustum
|
||||
F32 meters_to_pixels = sMapScale/ REGION_WIDTH_METERS;
|
||||
F32 meters_to_pixels = mMapScale/ REGION_WIDTH_METERS;
|
||||
|
||||
F32 horiz_fov = LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect();
|
||||
F32 far_clip_meters = LLViewerCamera::getInstance()->getFar();
|
||||
|
|
@ -1059,8 +1135,8 @@ void LLWorldMapView::drawFrustum()
|
|||
F32 half_width_pixels = half_width_meters * meters_to_pixels;
|
||||
|
||||
// Compute the frustum coordinates. Take the UI scale into account.
|
||||
F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + sPanX) * LLUI::getScaleFactor().mV[VX]);
|
||||
F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + sPanY) * LLUI::getScaleFactor().mV[VY]);
|
||||
F32 ctr_x = ((getLocalRect().getWidth() * 0.5f + mPanX) * LLUI::getScaleFactor().mV[VX]);
|
||||
F32 ctr_y = ((getLocalRect().getHeight() * 0.5f + mPanY) * LLUI::getScaleFactor().mV[VY]);
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
|
|
@ -1117,13 +1193,13 @@ LLVector3 LLWorldMapView::globalPosToView( const LLVector3d& global_pos )
|
|||
LLVector3 pos_local;
|
||||
pos_local.setVec(relative_pos_global); // convert to floats from doubles
|
||||
|
||||
pos_local.mV[VX] *= sMapScale / REGION_WIDTH_METERS;
|
||||
pos_local.mV[VY] *= sMapScale / REGION_WIDTH_METERS;
|
||||
pos_local.mV[VX] *= mMapScale / REGION_WIDTH_METERS;
|
||||
pos_local.mV[VY] *= mMapScale / REGION_WIDTH_METERS;
|
||||
// leave Z component in meters
|
||||
|
||||
|
||||
pos_local.mV[VX] += getRect().getWidth() / 2 + sPanX;
|
||||
pos_local.mV[VY] += getRect().getHeight() / 2 + sPanY;
|
||||
pos_local.mV[VX] += getRect().getWidth() / 2 + mPanX;
|
||||
pos_local.mV[VY] += getRect().getHeight() / 2 + mPanY;
|
||||
|
||||
return pos_local;
|
||||
}
|
||||
|
|
@ -1198,12 +1274,12 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
|
|||
// If you change this, then you need to change LLTracker::getTrackedPositionGlobal() as well
|
||||
LLVector3d LLWorldMapView::viewPosToGlobal( S32 x, S32 y )
|
||||
{
|
||||
x -= llfloor((getRect().getWidth() / 2 + sPanX));
|
||||
y -= llfloor((getRect().getHeight() / 2 + sPanY));
|
||||
x -= llfloor((getRect().getWidth() / 2 + mPanX));
|
||||
y -= llfloor((getRect().getHeight() / 2 + mPanY));
|
||||
|
||||
LLVector3 pos_local( (F32)x, (F32)y, 0.f );
|
||||
|
||||
pos_local *= ( REGION_WIDTH_METERS / sMapScale );
|
||||
pos_local *= ( REGION_WIDTH_METERS / mMapScale );
|
||||
|
||||
LLVector3d pos_global;
|
||||
pos_global.setVec( pos_local );
|
||||
|
|
@ -1665,7 +1741,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
|
|||
|
||||
LLWorldMap::getInstance()->cancelTracking();
|
||||
|
||||
S32 level = LLWorldMipmap::scaleToLevel(sMapScale);
|
||||
S32 level = LLWorldMipmap::scaleToLevel(mMapScale);
|
||||
// If the zoom level is not too far out already, test hits
|
||||
if (level <= DRAW_SIMINFO_THRESHOLD)
|
||||
{
|
||||
|
|
@ -1782,8 +1858,8 @@ BOOL LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask )
|
|||
{
|
||||
gFocusMgr.setMouseCapture( this );
|
||||
|
||||
mMouseDownPanX = ll_round(sPanX);
|
||||
mMouseDownPanY = ll_round(sPanY);
|
||||
mMouseDownPanX = ll_round(mPanX);
|
||||
mMouseDownPanY = ll_round(mPanY);
|
||||
mMouseDownX = x;
|
||||
mMouseDownY = y;
|
||||
sHandledLastClick = TRUE;
|
||||
|
|
@ -1798,8 +1874,8 @@ BOOL LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask )
|
|||
{
|
||||
// restore mouse cursor
|
||||
S32 local_x, local_y;
|
||||
local_x = mMouseDownX + llfloor(sPanX - mMouseDownPanX);
|
||||
local_y = mMouseDownY + llfloor(sPanY - mMouseDownPanY);
|
||||
local_x = mMouseDownX + llfloor(mPanX - mMouseDownPanX);
|
||||
local_y = mMouseDownY + llfloor(mPanY - mMouseDownPanY);
|
||||
LLRect clip_rect = getRect();
|
||||
clip_rect.stretch(-8);
|
||||
clip_rect.clipPointToRect(mMouseDownX, mMouseDownY, local_x, local_y);
|
||||
|
|
@ -1827,7 +1903,7 @@ BOOL LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask )
|
|||
|
||||
void LLWorldMapView::updateVisibleBlocks()
|
||||
{
|
||||
if (LLWorldMipmap::scaleToLevel(sMapScale) > DRAW_SIMINFO_THRESHOLD)
|
||||
if (LLWorldMipmap::scaleToLevel(mMapScale) > DRAW_SIMINFO_THRESHOLD)
|
||||
{
|
||||
// If we're zoomed out too much, we just don't load all those sim info: too much!
|
||||
return;
|
||||
|
|
@ -1843,16 +1919,16 @@ void LLWorldMapView::updateVisibleBlocks()
|
|||
const F32 half_height = F32(height) / 2.0f;
|
||||
|
||||
// Compute center into sim grid coordinates
|
||||
S32 world_center_x = S32((-sPanX / sMapScale) + (camera_global.mdV[0] / REGION_WIDTH_METERS));
|
||||
S32 world_center_y = S32((-sPanY / sMapScale) + (camera_global.mdV[1] / REGION_WIDTH_METERS));
|
||||
S32 world_center_x = S32((-mPanX / mMapScale) + (camera_global.mdV[0] / REGION_WIDTH_METERS));
|
||||
S32 world_center_y = S32((-mPanY / mMapScale) + (camera_global.mdV[1] / REGION_WIDTH_METERS));
|
||||
|
||||
// Compute the boundaries into sim grid coordinates
|
||||
S32 world_left = world_center_x - S32(half_width / sMapScale) - 1;
|
||||
S32 world_right = world_center_x + S32(half_width / sMapScale) + 1;
|
||||
S32 world_bottom = world_center_y - S32(half_height / sMapScale) - 1;
|
||||
S32 world_top = world_center_y + S32(half_height / sMapScale) + 1;
|
||||
S32 world_left = world_center_x - S32(half_width / mMapScale) - 1;
|
||||
S32 world_right = world_center_x + S32(half_width / mMapScale) + 1;
|
||||
S32 world_bottom = world_center_y - S32(half_height / mMapScale) - 1;
|
||||
S32 world_top = world_center_y + S32(half_height / mMapScale) + 1;
|
||||
|
||||
//LL_INFOS("WorldMap") << "LLWorldMapView::updateVisibleBlocks() : sMapScale = " << sMapScale << ", left = " << world_left << ", right = " << world_right << ", bottom = " << world_bottom << ", top = " << world_top << LL_ENDL;
|
||||
//LL_INFOS("WorldMap") << "LLWorldMapView::updateVisibleBlocks() : mMapScale = " << mMapScale << ", left = " << world_left << ", right = " << world_right << ", bottom = " << world_bottom << ", top = " << world_top << LL_ENDL;
|
||||
LLWorldMap::getInstance()->updateRegions(world_left, world_bottom, world_right, world_top);
|
||||
}
|
||||
|
||||
|
|
@ -1873,10 +1949,10 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
|
|||
F32 delta_y = (F32)(gViewerWindow->getCurrentMouseDY());
|
||||
|
||||
// Set pan to value at start of drag + offset
|
||||
sPanX += delta_x;
|
||||
sPanY += delta_y;
|
||||
sTargetPanX = sPanX;
|
||||
sTargetPanY = sPanY;
|
||||
mPanX += delta_x;
|
||||
mPanY += delta_y;
|
||||
mTargetPanX = mPanX;
|
||||
mTargetPanY = mPanY;
|
||||
|
||||
gViewerWindow->moveCursorToCenter();
|
||||
}
|
||||
|
|
@ -1979,4 +2055,8 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// static
|
||||
F32 LLWorldMapView::scaleFromZoom(F32 zoom) { return exp2(zoom) * 256.0f; }
|
||||
|
||||
// static
|
||||
F32 LLWorldMapView::zoomFromScale(F32 scale) { return log2(scale / 256.f); }
|
||||
|
|
|
|||
|
|
@ -67,12 +67,21 @@ public:
|
|||
bool checkItemHit(S32 x, S32 y, LLItemInfo& item, LLUUID* id, bool track);
|
||||
void handleClick(S32 x, S32 y, MASK mask, S32* hit_type, LLUUID* id);
|
||||
|
||||
// Scale and pan are shared across all instances! (i.e. Terrain and Objects maps are always registered)
|
||||
static void setScale( F32 scale );
|
||||
static void translatePan( S32 delta_x, S32 delta_y );
|
||||
static void setPan( S32 x, S32 y, BOOL snap = TRUE );
|
||||
// Scale, aka zoom, is shared across all instances! (i.e. Terrain and Objects maps are always registered)
|
||||
// Zoom is used for UI and will interpolate the map scale over multiple frames.
|
||||
void zoom(F32 zoom);
|
||||
void zoomWithPivot(F32 zoom, S32 x, S32 y);
|
||||
F32 getZoom();
|
||||
// Scale is a linear scaling factor of in-world coordinates
|
||||
F32 getScale();
|
||||
// setScaleSetting/getScaleSetting are for the default map setting on login
|
||||
static void setScaleSetting(F32 scaleSetting);
|
||||
static F32 getScaleSetting();
|
||||
// Pan is in pixels relative to the center of the map.
|
||||
void translatePan( S32 delta_x, S32 delta_y );
|
||||
void setPan( S32 x, S32 y, BOOL snap = TRUE );
|
||||
// Return true if the current scale level is above the threshold for accessing region info
|
||||
static bool showRegionInfo();
|
||||
bool showRegionInfo();
|
||||
|
||||
LLVector3 globalPosToView(const LLVector3d& global_pos);
|
||||
LLVector3d viewPosToGlobal(S32 x,S32 y);
|
||||
|
|
@ -153,14 +162,12 @@ public:
|
|||
static LLUIImagePtr sForSaleImage;
|
||||
static LLUIImagePtr sForSaleAdultImage;
|
||||
|
||||
static F32 sMapScale; // scale = size of a region in pixels
|
||||
|
||||
BOOL mItemPicked;
|
||||
|
||||
static F32 sPanX; // in pixels
|
||||
static F32 sPanY; // in pixels
|
||||
static F32 sTargetPanX; // in pixels
|
||||
static F32 sTargetPanY; // in pixels
|
||||
F32 mPanX; // in pixels
|
||||
F32 mPanY; // in pixels
|
||||
F32 mTargetPanX; // in pixels
|
||||
F32 mTargetPanY; // in pixels
|
||||
static S32 sTrackingArrowX;
|
||||
static S32 sTrackingArrowY;
|
||||
static bool sVisibleTilesLoaded;
|
||||
|
|
@ -194,6 +201,17 @@ public:
|
|||
|
||||
private:
|
||||
void drawTileOutline(S32 level, F32 top, F32 left, F32 bottom, F32 right);
|
||||
|
||||
void setScale(F32 scale, bool snap = true);
|
||||
|
||||
static F32 scaleFromZoom(F32 zoom);
|
||||
static F32 zoomFromScale(F32 scale);
|
||||
|
||||
F32 mMapScale;
|
||||
F32 mTargetMapScale;
|
||||
static F32 sMapScaleSetting;
|
||||
static LLVector2 sZoomPivot;
|
||||
static LLFrameTimer sZoomTimer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -841,9 +841,6 @@
|
|||
name="MapParcelOutlineColor"
|
||||
value="1 1 1 1" />
|
||||
<!-- Changed Color -->
|
||||
<color
|
||||
name="MapFrustumRotatingColor"
|
||||
reference="White_25" />
|
||||
<color
|
||||
name="MapTrackColor"
|
||||
reference="Red" />
|
||||
|
|
|
|||
|
|
@ -838,9 +838,6 @@
|
|||
name="MapParcelOutlineColor"
|
||||
value="1 1 1 1" />
|
||||
<!-- Changed Color -->
|
||||
<color
|
||||
name="MapFrustumRotatingColor"
|
||||
reference="White_25" />
|
||||
<color
|
||||
name="MapTrackColor"
|
||||
reference="Red" />
|
||||
|
|
|
|||
|
|
@ -782,9 +782,6 @@
|
|||
name="MapParcelOutlineColor"
|
||||
value="1 1 1 1" />
|
||||
<!-- Changed Color -->
|
||||
<color
|
||||
name="MapFrustumRotatingColor"
|
||||
reference="White_25" />
|
||||
<color
|
||||
name="MapTrackColor"
|
||||
reference="Red" />
|
||||
|
|
|
|||
|
|
@ -271,38 +271,50 @@
|
|||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
name="Stop Tracking Separator" />
|
||||
|
||||
<menu
|
||||
label="Zoom"
|
||||
name="Minimap Zoom">
|
||||
<menu_item_call
|
||||
<menu_item_check
|
||||
label="Very close"
|
||||
name="Zoom very close">
|
||||
<menu_item_check.on_check
|
||||
function="Minimap.Zoom.Check"
|
||||
parameter="very close" />
|
||||
<menu_item_check.on_click
|
||||
function="Minimap.Zoom.Set"
|
||||
parameter="very close" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Close"
|
||||
name="Zoom Close">
|
||||
<menu_item_call.on_click
|
||||
function="Minimap.Zoom"
|
||||
name="Zoom close">
|
||||
<menu_item_check.on_check
|
||||
function="Minimap.Zoom.Check"
|
||||
parameter="close" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Medium"
|
||||
name="Zoom Medium">
|
||||
<menu_item_call.on_click
|
||||
function="Minimap.Zoom"
|
||||
<menu_item_check.on_click
|
||||
function="Minimap.Zoom.Set"
|
||||
parameter="close" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Medium (Default)"
|
||||
name="Zoom medium">
|
||||
<menu_item_check.on_check
|
||||
function="Minimap.Zoom.Check"
|
||||
parameter="medium" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
<menu_item_check.on_click
|
||||
function="Minimap.Zoom.Set"
|
||||
parameter="medium" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Far"
|
||||
name="Zoom Far">
|
||||
<menu_item_call.on_click
|
||||
function="Minimap.Zoom"
|
||||
name="Zoom far">
|
||||
<menu_item_check.on_check
|
||||
function="Minimap.Zoom.Check"
|
||||
parameter="far" />
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call
|
||||
label="Default"
|
||||
name="Zoom Default">
|
||||
<menu_item_call.on_click
|
||||
function="Minimap.Zoom"
|
||||
parameter="default" />
|
||||
</menu_item_call>
|
||||
<menu_item_check.on_click
|
||||
function="Minimap.Zoom.Set"
|
||||
parameter="far" />
|
||||
</menu_item_check>
|
||||
</menu>
|
||||
<menu
|
||||
label="Show"
|
||||
|
|
@ -396,23 +408,40 @@
|
|||
</menu_item_check>
|
||||
</menu>
|
||||
<menu_item_check
|
||||
label="Rotate Map"
|
||||
name="Rotate Map">
|
||||
label="North at top"
|
||||
name="North at top">
|
||||
<menu_item_check.on_check
|
||||
control="MiniMapRotate" />
|
||||
function="Minimap.MapOrientation.Check"
|
||||
parameter="north_at_top" />
|
||||
<menu_item_check.on_click
|
||||
function="ToggleControl"
|
||||
parameter="MiniMapRotate" />
|
||||
function="Minimap.MapOrientation.Set"
|
||||
parameter="north_at_top" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Auto Center"
|
||||
name="Auto Center">
|
||||
label="Camera at top"
|
||||
name="Camera at top">
|
||||
<menu_item_check.on_check
|
||||
function="Minimap.MapOrientation.Check"
|
||||
parameter="camera_at_top" />
|
||||
<menu_item_check.on_click
|
||||
function="Minimap.MapOrientation.Set"
|
||||
parameter="camera_at_top" />
|
||||
</menu_item_check>
|
||||
<menu_item_check
|
||||
label="Auto-center map"
|
||||
name="Auto-center map">
|
||||
<menu_item_check.on_check
|
||||
control="MiniMapAutoCenter" />
|
||||
<menu_item_check.on_click
|
||||
function="ToggleControl"
|
||||
parameter="MiniMapAutoCenter" />
|
||||
</menu_item_check>
|
||||
<menu_item_call
|
||||
label="Re-center map"
|
||||
name="Re-center map">
|
||||
<menu_item_call.on_click
|
||||
function="Minimap.Center.Activate" />
|
||||
</menu_item_call>
|
||||
<menu
|
||||
label="Chat Distance Rings"
|
||||
name="Chat Distance Rings Menu">
|
||||
|
|
@ -455,6 +484,12 @@
|
|||
</menu_item_check>
|
||||
</menu>
|
||||
<menu_item_separator />
|
||||
<menu_item_call
|
||||
label="About Land"
|
||||
name="About Land">
|
||||
<menu_item_call.on_click
|
||||
function="Minimap.AboutLand" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Place Profile"
|
||||
name="Place Profile">
|
||||
|
|
|
|||
Loading…
Reference in New Issue