some changes, but endless loop timeout

This commit is contained in:
kremsy
2014-01-03 18:37:51 +01:00
parent 5e798f6fa1
commit fedc58c077
5 changed files with 60 additions and 27 deletions

View File

@ -218,8 +218,29 @@ class PlayerDetailed {
$mainLabel->setHAlign(Control::LEFT);
$mainLabel->setText("Statistics");*/
var_dump($this->maniaControl->statisticManager->getAllPlayerStats($player));
$playerStats = $this->maniaControl->statisticManager->getAllPlayerStats($player);
$y = $this->height / 2 - 15;
foreach($playerStats as $stat){
$statProperties = $stat[0];
$value = $stat[1];
$label = new Label_Text();
$frame->add($label);
$label->setPosition(-$this->width / 2 + 70, $y);
$label->setText($statProperties->name);
$label->setHAlign(Control::LEFT);
$label->setTextSize(1.5);
$label = new Label_Text();
$frame->add($label);
$label->setPosition(-$this->width / 2 + 100, $y);
$label->setText($value);
$label->setHAlign(Control::LEFT);
$label->setTextSize(1.5);
$y -= 4;
}
return $frame;
}
}

View File

@ -26,8 +26,8 @@ class PlayerManager implements CallbackListener {
const CB_PLAYERINFOCHANGED = 'PlayerManagerCallback.PlayerInfoChanged';
const TABLE_PLAYERS = 'mc_players';
const SETTING_JOIN_LEAVE_MESSAGES = 'Enable Join & Leave Messages';
const STAT_JOIN_COUNT = 'joinCount';
const STAT_PLAYTIME = 'playTime';
const STAT_JOIN_COUNT = 'Joins';
const STAT_PLAYTIME = 'Playtime';
/**
* Public Properties