From 231a517f8398568513f2037d471fa4b6b78959fd Mon Sep 17 00:00:00 2001 From: kremsy Date: Fri, 3 Jan 2014 20:29:42 +0100 Subject: [PATCH] mapwidget strip dirty codes --- application/core/Players/PlayerDetailed.php | 14 +++++++++++++- application/plugins/WidgetPlugin.php | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/application/core/Players/PlayerDetailed.php b/application/core/Players/PlayerDetailed.php index 5331909a..898bca5c 100644 --- a/application/core/Players/PlayerDetailed.php +++ b/application/core/Players/PlayerDetailed.php @@ -84,10 +84,22 @@ class PlayerDetailed { $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 + $label = new Label_Text(); $frame->add($label); - $label->setPosition(-$this->width / 2 + 10, $y); + $label->setPosition(-$this->width / 2 + 15, $y); $label->setText($target->nickname); $label->setHAlign(Control::LEFT); diff --git a/application/plugins/WidgetPlugin.php b/application/plugins/WidgetPlugin.php index 7bddd287..b7db66cc 100644 --- a/application/plugins/WidgetPlugin.php +++ b/application/plugins/WidgetPlugin.php @@ -315,7 +315,7 @@ class WidgetPlugin implements CallbackListener, Plugin { $label->setPosition(0, 1.5, 0.2); $label->setAlign(Control::CENTER, Control::CENTER); $label->setTextSize(1.3); - $label->setText($serverName); + $label->setText(Formatter::stripDirtyCodes($serverName)); $label->setTextColor("FFF"); // Player Quad / Label