mapwidget strip dirty codes

This commit is contained in:
kremsy 2014-01-03 20:29:42 +01:00
parent 7fc70f4489
commit 231a517f83
2 changed files with 14 additions and 2 deletions

View File

@ -84,10 +84,22 @@ class PlayerDetailed {
$y = $this->height / 2 - 10; $y = $this->height / 2 - 10;
//Nation Quad
$countryQuad = new Quad();
$frame->add($countryQuad);
$countryCode = Formatter::mapCountry($target->getCountry());
$countryQuad->setImage("file://Skins/Avatars/Flags/{$countryCode}.dds");
$countryQuad->setPosition(-$this->width / 2 + 10, $y);
$countryQuad->setSize(5, 5);
$countryQuad->setZ(-0.1);
$countryQuad->setHAlign(Control::LEFT);
//Nickname //Nickname
$label = new Label_Text(); $label = new Label_Text();
$frame->add($label); $frame->add($label);
$label->setPosition(-$this->width / 2 + 10, $y); $label->setPosition(-$this->width / 2 + 15, $y);
$label->setText($target->nickname); $label->setText($target->nickname);
$label->setHAlign(Control::LEFT); $label->setHAlign(Control::LEFT);

View File

@ -315,7 +315,7 @@ class WidgetPlugin implements CallbackListener, Plugin {
$label->setPosition(0, 1.5, 0.2); $label->setPosition(0, 1.5, 0.2);
$label->setAlign(Control::CENTER, Control::CENTER); $label->setAlign(Control::CENTER, Control::CENTER);
$label->setTextSize(1.3); $label->setTextSize(1.3);
$label->setText($serverName); $label->setText(Formatter::stripDirtyCodes($serverName));
$label->setTextColor("FFF"); $label->setTextColor("FFF");
// Player Quad / Label // Player Quad / Label