mirror of https://github.com/webbukkit/dynmap.git
Add support for largeplayerfaces option for bigger player markers
This commit is contained in:
parent
8c3c0e980e
commit
634eb5fd2f
|
@ -584,6 +584,13 @@
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dynmap .playerIconLg {
|
||||||
|
margin-top: -32px;
|
||||||
|
margin-left: -32px;
|
||||||
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
|
}
|
||||||
|
|
||||||
.dynmap .playerName {
|
.dynmap .playerName {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -19px;
|
top: -19px;
|
||||||
|
@ -615,6 +622,22 @@
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dynmap .playerNameLg {
|
||||||
|
position: absolute;
|
||||||
|
top: -19px;
|
||||||
|
left: 34px;
|
||||||
|
z-index:20;
|
||||||
|
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
color: #fff;
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
padding: 2px;
|
||||||
|
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
.dynmap .playerNameNoHealth {
|
.dynmap .playerNameNoHealth {
|
||||||
top: -7px;
|
top: -7px;
|
||||||
}
|
}
|
||||||
|
@ -651,6 +674,23 @@
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dynmap .healthContainerLg {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
left: 34px;
|
||||||
|
|
||||||
|
width: 50px;
|
||||||
|
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
padding: 2px;
|
||||||
|
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
z-index: 21;
|
||||||
|
}
|
||||||
|
|
||||||
.dynmap .playerHealth {
|
.dynmap .playerHealth {
|
||||||
height: 7px;
|
height: 7px;
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) {
|
||||||
$(div)
|
$(div)
|
||||||
.addClass('Marker')
|
.addClass('Marker')
|
||||||
.addClass('playerMarker')
|
.addClass('playerMarker')
|
||||||
.append(playerImage = $('<img/>').addClass(configuration.smallplayerfaces?'playerIconSm':'playerIcon')
|
.append(playerImage = $('<img/>').addClass(configuration.smallplayerfaces?'playerIconSm':(configuration.largeplayerfaces?'playerIconLg':'playerIcon'))
|
||||||
.attr({ src: 'images/player.png' }))
|
.attr({ src: 'images/player.png' }))
|
||||||
.append(player.namefield = $('<span/>')
|
.append(player.namefield = $('<span/>')
|
||||||
.addClass(configuration.smallplayerfaces?'playerNameSm':'playerName')
|
.addClass(configuration.smallplayerfaces?'playerNameSm':(configuration.largeplayerfaces?'playerNameLg':'playerName'))
|
||||||
.append(player.name));
|
.append(player.name));
|
||||||
|
|
||||||
if (configuration.showplayerfaces) {
|
if (configuration.showplayerfaces) {
|
||||||
|
@ -32,6 +32,14 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) {
|
||||||
playerImage.remove();
|
playerImage.remove();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else if(configuration.largeplayerfaces) {
|
||||||
|
getMinecraftHead(player.account, 32, function(head) {
|
||||||
|
$(head)
|
||||||
|
.addClass('playerIconLg')
|
||||||
|
.prependTo(div);
|
||||||
|
playerImage.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
else if(configuration.showplayerbody) {
|
else if(configuration.showplayerbody) {
|
||||||
getMinecraftHead(player.account, 'body', function(head) {
|
getMinecraftHead(player.account, 'body', function(head) {
|
||||||
$(head)
|
$(head)
|
||||||
|
@ -51,7 +59,7 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) {
|
||||||
}
|
}
|
||||||
if (configuration.showplayerhealth) {
|
if (configuration.showplayerhealth) {
|
||||||
player.healthContainer = $('<div/>')
|
player.healthContainer = $('<div/>')
|
||||||
.addClass(configuration.smallplayerfaces?'healthContainerSm':'healthContainer')
|
.addClass(configuration.smallplayerfaces?'healthContainerSm':(configuration.largeplayerfaces?'healthContainerLg':'healthContainer'))
|
||||||
.appendTo(div);
|
.appendTo(div);
|
||||||
if (player.health !== undefined && player.armor !== undefined) {
|
if (player.health !== undefined && player.armor !== undefined) {
|
||||||
player.healthBar = $('<div/>')
|
player.healthBar = $('<div/>')
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -151,10 +151,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
|
@ -152,10 +152,12 @@ components:
|
||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
# If true, show player body too (only valid if showplayerfaces=true
|
# If true, show player body too (only valid if showplayerfaces=true)
|
||||||
showplayerbody: false
|
showplayerbody: false
|
||||||
# Option to make player faces small - don't use with showplayerhealth
|
# Option to make player faces small - don't use with showplayerhealth or largeplayerfaces
|
||||||
smallplayerfaces: false
|
smallplayerfaces: false
|
||||||
|
# Option to make player faces larger - don't use with showplayerhealth or smallplayerfaces
|
||||||
|
largeplayerfaces: false
|
||||||
# Optional - make player faces layer hidden by default
|
# Optional - make player faces layer hidden by default
|
||||||
hidebydefault: false
|
hidebydefault: false
|
||||||
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
# Optional - ordering priority in layer menu (low goes before high - default is 0)
|
||||||
|
|
Loading…
Reference in New Issue