mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-25 03:35:18 +01:00
Add smallplayerfaces option for playermarkers component
This commit is contained in:
parent
a878ce7cd1
commit
5ad9d7bf90
@ -49,6 +49,8 @@ components:
|
|||||||
type: playermarkers
|
type: playermarkers
|
||||||
showplayerfaces: true
|
showplayerfaces: true
|
||||||
showplayerhealth: true
|
showplayerhealth: true
|
||||||
|
# Option to make player faces small - don't use with showplayerhealth
|
||||||
|
smallplayerfaces: false
|
||||||
#- class: org.dynmap.ClientComponent
|
#- class: org.dynmap.ClientComponent
|
||||||
# type: digitalclock
|
# type: digitalclock
|
||||||
- class: org.dynmap.ClientComponent
|
- class: org.dynmap.ClientComponent
|
||||||
|
@ -519,6 +519,21 @@
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dynmap .playerNameSm {
|
||||||
|
position: absolute;
|
||||||
|
top: -1px;
|
||||||
|
left: 18px;
|
||||||
|
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
color: #fff;
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
padding: 2px;
|
||||||
|
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
.dynmap .healthContainer {
|
.dynmap .healthContainer {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -14,16 +14,26 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) {
|
|||||||
.append(playerImage = $('<img/>')
|
.append(playerImage = $('<img/>')
|
||||||
.attr({ src: 'images/player.png' }))
|
.attr({ src: 'images/player.png' }))
|
||||||
.append($('<span/>')
|
.append($('<span/>')
|
||||||
.addClass('playerName')
|
.addClass(configuration.smallplayerfaces?'playerNameSm':'playerName')
|
||||||
.text(player.name));
|
.text(player.name));
|
||||||
|
|
||||||
if (configuration.showplayerfaces) {
|
if (configuration.showplayerfaces) {
|
||||||
getMinecraftHead(player.account, 32, function(head) {
|
if(configuration.smallplayerfaces) {
|
||||||
$(head)
|
getMinecraftHead(player.account, 16, function(head) {
|
||||||
.addClass('playericon')
|
$(head)
|
||||||
|
.addClass('playericon')
|
||||||
.prependTo(div);
|
.prependTo(div);
|
||||||
playerImage.remove();
|
playerImage.remove();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
getMinecraftHead(player.account, 32, function(head) {
|
||||||
|
$(head)
|
||||||
|
.addClass('playericon')
|
||||||
|
.prependTo(div);
|
||||||
|
playerImage.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (configuration.showplayerhealth) {
|
if (configuration.showplayerhealth) {
|
||||||
if(!configuration.showplayerfaces) /* Need 32 high */
|
if(!configuration.showplayerfaces) /* Need 32 high */
|
||||||
|
Loading…
Reference in New Issue
Block a user