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
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Alchemy Archive
Alchemy Viewer
Commits
a3303990
Commit
a3303990
authored
14 years ago
by
Aimee Linden
Browse files
Options
Downloads
Patches
Plain Diff
VWR-17653 (SNOW-734) FIXED Show inspectors for avatars on the MiniMap
Imported from Snowglobe.
parent
2b5cfc2a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llnetmap.cpp
+50
-16
50 additions, 16 deletions
indra/newview/llnetmap.cpp
indra/newview/llnetmap.h
+2
-1
2 additions, 1 deletion
indra/newview/llnetmap.h
indra/newview/skins/default/xui/en/floater_map.xml
+1
-1
1 addition, 1 deletion
indra/newview/skins/default/xui/en/floater_map.xml
with
53 additions
and
18 deletions
indra/newview/llnetmap.cpp
+
50
−
16
View file @
a3303990
...
...
@@ -361,7 +361,8 @@ void LLNetMap::draw()
show_as_friend
?
map_avatar_friend_color
:
map_avatar_color
,
pos_map
.
mV
[
VZ
],
mDotRadius
);
F32
dist_to_cursor
=
dist_vec
(
LLVector2
(
pos_map
.
mV
[
VX
],
pos_map
.
mV
[
VY
]),
LLVector2
(
local_mouse_x
,
local_mouse_y
));
F32
dist_to_cursor
=
dist_vec
(
LLVector2
(
pos_map
.
mV
[
VX
],
pos_map
.
mV
[
VY
]),
LLVector2
(
local_mouse_x
,
local_mouse_y
));
if
(
dist_to_cursor
<
min_pick_dist
&&
dist_to_cursor
<
closest_dist
)
{
closest_dist
=
dist_to_cursor
;
...
...
@@ -400,8 +401,14 @@ void LLNetMap::draw()
llround
(
pos_map
.
mV
[
VY
]
-
mDotRadius
),
dot_width
,
dot_width
);
}
F32
dist_to_cursor
=
dist_vec
(
LLVector2
(
pos_map
.
mV
[
VX
],
pos_map
.
mV
[
VY
]),
LLVector2
(
local_mouse_x
,
local_mouse_y
));
if
(
dist_to_cursor
<
min_pick_dist
&&
dist_to_cursor
<
closest_dist
)
{
mClosestAgentToCursor
=
gAgent
.
getID
();
}
}
// Draw frustum
F32
meters_to_pixels
=
mScale
/
LLWorld
::
getInstance
()
->
getRegionWidthInMeters
();
...
...
@@ -560,20 +567,32 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
{
return
FALSE
;
}
// mToolTipMsg = "[AGENT][REGION](Double-click to open Map)"
LLStringUtil
::
format_map_t
args
;
std
::
string
fullname
;
if
(
mClosestAgentToCursor
.
notNull
()
&&
gCacheName
->
getFullName
(
mClosestAgentToCursor
,
fullname
))
{
args
[
"[AGENT]"
]
=
fullname
+
"
\n
"
;
}
else
std
::
string
avatar_name
;
if
(
mClosestAgentToCursor
.
notNull
()
&&
gCacheName
->
getFullName
(
mClosestAgentToCursor
,
avatar_name
))
{
args
[
"[AGENT]"
]
=
""
;
// only show tooltip if same inspector not already open
LLFloater
*
existing_inspector
=
LLFloaterReg
::
findInstance
(
"inspect_avatar"
);
if
(
!
existing_inspector
||
!
existing_inspector
->
getVisible
()
||
existing_inspector
->
getKey
()[
"avatar_id"
].
asUUID
()
!=
mClosestAgentToCursor
)
{
LLInspector
::
Params
p
;
p
.
fillFrom
(
LLUICtrlFactory
::
instance
().
getDefaultParams
<
LLInspector
>
());
p
.
message
(
avatar_name
);
p
.
image
.
name
(
"Inspector_I"
);
p
.
click_callback
(
boost
::
bind
(
showAvatarInspector
,
mClosestAgentToCursor
));
p
.
visible_time_near
(
6.
f
);
p
.
visible_time_far
(
3.
f
);
p
.
delay_time
(
0.35
f
);
p
.
wrap
(
false
);
LLToolTipMgr
::
instance
().
show
(
p
);
}
return
TRUE
;
}
LLStringUtil
::
format_map_t
args
;
LLViewerRegion
*
region
=
LLWorld
::
getInstance
()
->
getRegionFromPosGlobal
(
viewPosToGlobal
(
x
,
y
)
);
if
(
region
)
{
...
...
@@ -583,10 +602,10 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
{
args
[
"[REGION]"
]
=
""
;
}
std
::
string
msg
=
mToolTipMsg
;
LLStringUtil
::
format
(
msg
,
args
);
LLRect
sticky_rect
;
// set sticky_rect
if
(
region
)
...
...
@@ -606,6 +625,21 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
return
TRUE
;
}
// static
void
LLNetMap
::
showAvatarInspector
(
const
LLUUID
&
avatar_id
)
{
LLSD
params
;
params
[
"avatar_id"
]
=
avatar_id
;
if
(
LLToolTipMgr
::
instance
().
toolTipVisible
())
{
LLRect
rect
=
LLToolTipMgr
::
instance
().
getToolTipRect
();
params
[
"pos"
][
"x"
]
=
rect
.
mLeft
;
params
[
"pos"
][
"y"
]
=
rect
.
mTop
;
}
LLFloaterReg
::
showInstance
(
"inspect_avatar"
,
params
);
}
void
LLNetMap
::
renderScaledPointGlobal
(
const
LLVector3d
&
pos
,
const
LLColor4U
&
color
,
F32
radius_meters
)
{
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llnetmap.h
+
2
−
1
View file @
a3303990
...
...
@@ -86,7 +86,8 @@ private:
void
drawTracking
(
const
LLVector3d
&
pos_global
,
const
LLColor4
&
color
,
BOOL
draw_arrow
=
TRUE
);
static
void
showAvatarInspector
(
const
LLUUID
&
avatar_id
);
void
createObjectImage
();
private
:
...
...
This diff is collapsed.
Click to expand it.
indra/newview/skins/default/xui/en/floater_map.xml
+
1
−
1
View file @
a3303990
...
...
@@ -20,7 +20,7 @@
width=
"200"
>
<floater.string
name=
"ToolTipMsg"
>
[AGENT]
[REGION](Double-click to open Map, shift-drag to pan)
[REGION](Double-click to open Map, shift-drag to pan)
</floater.string>
<floater.string
name=
"mini_map_caption"
>
MINIMAP
...
...
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