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
b825be4d
Commit
b825be4d
authored
4 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Frameless minimap
parent
8e052db2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llfloatermap.cpp
+39
-9
39 additions, 9 deletions
indra/newview/llfloatermap.cpp
indra/newview/llfloatermap.h
+8
-5
8 additions, 5 deletions
indra/newview/llfloatermap.h
indra/newview/skins/default/xui/en/floater_map.xml
+12
-1
12 additions, 1 deletion
indra/newview/skins/default/xui/en/floater_map.xml
with
59 additions
and
15 deletions
indra/newview/llfloatermap.cpp
+
39
−
9
View file @
b825be4d
...
...
@@ -52,6 +52,10 @@
// The minor cardinal direction labels are hidden if their height is more
// than this proportion of the map.
const
F32
MAP_MINOR_DIR_THRESHOLD
=
0.07
f
;
const
S32
MAP_PADDING_LEFT
=
0
;
const
S32
MAP_PADDING_TOP
=
2
;
const
S32
MAP_PADDING_RIGHT
=
2
;
const
S32
MAP_PADDING_BOTTOM
=
0
;
//
// Member functions
...
...
@@ -59,15 +63,15 @@ const F32 MAP_MINOR_DIR_THRESHOLD = 0.07f;
LLFloaterMap
::
LLFloaterMap
(
const
LLSD
&
key
)
:
LLFloater
(
key
),
mTextBoxEast
(
NULL
),
mTextBoxNorth
(
NULL
),
mTextBoxWest
(
NULL
),
mTextBoxSouth
(
NULL
),
mTextBoxSouthEast
(
NULL
),
mTextBoxNorthEast
(
NULL
),
mTextBoxNorthWest
(
NULL
),
mTextBoxSouthWest
(
NULL
),
mMap
(
NULL
)
mTextBoxEast
(
nullptr
),
mTextBoxNorth
(
nullptr
),
mTextBoxWest
(
nullptr
),
mTextBoxSouth
(
nullptr
),
mTextBoxSouthEast
(
nullptr
),
mTextBoxNorthEast
(
nullptr
),
mTextBoxNorthWest
(
nullptr
),
mTextBoxSouthWest
(
nullptr
),
mMap
(
nullptr
)
{
}
...
...
@@ -97,6 +101,9 @@ BOOL LLFloaterMap::postBuild()
mTextBoxSouthWest
=
getChild
<
LLTextBox
>
(
"floater_map_southwest"
);
mTextBoxNorthWest
=
getChild
<
LLTextBox
>
(
"floater_map_northwest"
);
stretchMiniMap
(
getRect
().
getWidth
()
-
MAP_PADDING_LEFT
-
MAP_PADDING_RIGHT
,
getRect
().
getHeight
()
-
MAP_PADDING_TOP
-
MAP_PADDING_BOTTOM
);
updateMinorDirections
();
// Get the drag handle all the way in back
...
...
@@ -211,10 +218,26 @@ void LLFloaterMap::draw()
LLFloater
::
draw
();
}
void
LLFloaterMap
::
stretchMiniMap
(
S32
width
,
S32
height
)
{
//fix for ext-7112
//by default ctrl can't overlap caption area
if
(
mMap
)
{
LLRect
map_rect
;
map_rect
.
setLeftTopAndSize
(
MAP_PADDING_LEFT
,
getRect
().
getHeight
()
-
MAP_PADDING_TOP
,
width
,
height
);
mMap
->
reshape
(
width
,
height
,
1
);
mMap
->
setRect
(
map_rect
);
}
}
void
LLFloaterMap
::
reshape
(
S32
width
,
S32
height
,
BOOL
called_from_parent
)
{
LLFloater
::
reshape
(
width
,
height
,
called_from_parent
);
stretchMiniMap
(
width
-
MAP_PADDING_LEFT
-
MAP_PADDING_RIGHT
,
height
-
MAP_PADDING_TOP
-
MAP_PADDING_BOTTOM
);
updateMinorDirections
();
}
...
...
@@ -244,6 +267,13 @@ void LLFloaterMap::handleZoom(const LLSD& userdata)
}
}
void
LLFloaterMap
::
setMinimized
(
BOOL
b
)
{
LLFloater
::
setMinimized
(
b
);
setTitle
(
b
?
getString
(
"mini_map_caption"
)
:
""
);
}
LLFloaterMap
*
LLFloaterMap
::
getInstance
()
{
return
LLFloaterReg
::
getTypedInstance
<
LLFloaterMap
>
(
"mini_map"
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llfloatermap.h
+
8
−
5
View file @
b825be4d
...
...
@@ -35,23 +35,26 @@ class LLTextBox;
//
// Classes
//
class
LLFloaterMap
:
public
LLFloater
class
LLFloaterMap
final
:
public
LLFloater
{
public:
LLFloaterMap
(
const
LLSD
&
key
);
static
LLFloaterMap
*
getInstance
();
virtual
~
LLFloaterMap
();
/*virtual*/
BOOL
postBuild
();
/*virtual*/
BOOL
handleDoubleClick
(
S32
x
,
S32
y
,
MASK
mask
);
/*virtual*/
void
reshape
(
S32
width
,
S32
height
,
BOOL
called_from_parent
=
TRUE
);
/*virtual*/
void
draw
();
/*virtual*/
BOOL
postBuild
()
override
;
/*virtual*/
BOOL
handleDoubleClick
(
S32
x
,
S32
y
,
MASK
mask
)
override
;
/*virtual*/
void
reshape
(
S32
width
,
S32
height
,
BOOL
called_from_parent
=
TRUE
)
override
;
/*virtual*/
void
draw
()
override
;
/*virtual*/
void
setMinimized
(
BOOL
b
)
override
;
private:
void
handleZoom
(
const
LLSD
&
userdata
);
void
setDirectionPos
(
LLTextBox
*
text_box
,
F32
rotation
);
void
updateMinorDirections
();
void
stretchMiniMap
(
S32
width
,
S32
height
);
LLTextBox
*
mTextBoxEast
;
LLTextBox
*
mTextBoxNorth
;
LLTextBox
*
mTextBoxWest
;
...
...
This diff is collapsed.
Click to expand it.
indra/newview/skins/default/xui/en/floater_map.xml
+
12
−
1
View file @
b825be4d
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
positioning=
"cascading"
bg_alpha_image_overlay=
"DkGray_33"
can_minimize=
"true"
can_resize=
"true"
header_height=
"0"
chrome=
"true"
height=
"200"
layout=
"topleft"
min_height=
"128"
min_width=
"128"
name=
"Map"
title=
"
MINI-MAP
"
title=
""
help_topic=
"map"
save_rect=
"true"
save_visibility=
"true"
...
...
@@ -27,6 +29,7 @@
Mini-map
</floater.string>
<net_map
bg_color=
"NetMapBackgroundColor"
follows=
"top|left|bottom|right"
layout=
"topleft"
left=
"0"
...
...
@@ -45,6 +48,7 @@
name=
"floater_map_north"
right=
"10"
text_color=
"1 1 1 0.7"
font_shadow=
"hard"
top=
"189"
>
N
</text>
...
...
@@ -58,6 +62,7 @@
name=
"floater_map_east"
right=
"10"
text_color=
"1 1 1 0.7"
font_shadow=
"hard"
top=
"189"
>
E
</text>
...
...
@@ -71,6 +76,7 @@
name=
"floater_map_west"
right=
"11"
text_color=
"1 1 1 0.7"
font_shadow=
"hard"
top=
"175"
>
W
</text>
...
...
@@ -84,6 +90,7 @@
name=
"floater_map_south"
right=
"10"
text_color=
"1 1 1 0.7"
font_shadow=
"hard"
top=
"189"
>
S
</text>
...
...
@@ -97,6 +104,7 @@
name=
"floater_map_southeast"
right=
"20"
text_color=
"1 1 1 0.7"
font_shadow=
"hard"
top=
"189"
>
SE
</text>
...
...
@@ -110,6 +118,7 @@
name=
"floater_map_northeast"
right=
"20"
text_color=
"1 1 1 0.7"
font_shadow=
"hard"
top=
"189"
>
NE
</text>
...
...
@@ -123,6 +132,7 @@
name=
"floater_map_southwest"
right=
"20"
text_color=
"1 1 1 0.7"
font_shadow=
"hard"
top=
"189"
>
SW
</text>
...
...
@@ -136,6 +146,7 @@
name=
"floater_map_northwest"
right=
"20"
text_color=
"1 1 1 0.7"
font_shadow=
"hard"
top=
"189"
>
NW
</text>
...
...
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