selected setting header label

This commit is contained in:
Steffen Schröder 2014-06-15 01:58:25 +02:00
parent 2408dba961
commit 65919efb43

View File

@ -88,7 +88,7 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
$pagerSize = 9.; $pagerSize = 9.;
$settingHeight = 5.; $settingHeight = 5.;
$labelTextSize = 2; $labelTextSize = 2;
$pageMaxCount = 13; $pageMaxCount = 11;
// Pagers // Pagers
$pagerPrev = new Quad_Icons64x64_1(); $pagerPrev = new Quad_Icons64x64_1();
@ -124,35 +124,30 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
$backLabel->setText('Back'); $backLabel->setText('Back');
$backLabel->setAction(self::ACTION_SETTINGCLASS_BACK); $backLabel->setAction(self::ACTION_SETTINGCLASS_BACK);
$headLabel = new Label_Text();
$frame->add($headLabel);
$headLabel->setHAlign($headLabel::LEFT);
$headLabel->setPosition($width * -0.46, $height * 0.41);
$headLabel->setSize($width * 0.6, $settingHeight);
$headLabel->setStyle($headLabel::STYLE_TextCardSmall);
$headLabel->setTextSize(3);
$headLabel->setText($settingClass);
$headLabel->setTextColor('ff0');
$pageFrame = null; $pageFrame = null;
$index = 0; $index = 0;
$y = 0; $posY = 0;
foreach ($settings as $setting) { foreach ($settings as $setting) {
if ($index % $pageMaxCount === 0) { if ($index % $pageMaxCount === 0) {
$pageFrame = new Frame(); $pageFrame = new Frame();
$frame->add($pageFrame); $frame->add($pageFrame);
$paging->addPage($pageFrame); $paging->addPage($pageFrame);
$y = $height * 0.41; $posY = $height * 0.41 - $settingHeight * 1.5;
} }
$settingFrame = new Frame(); $settingFrame = new Frame();
$pageFrame->add($settingFrame); $pageFrame->add($settingFrame);
$settingFrame->setY($y); $settingFrame->setY($posY);
// TODO: display currently select setting class
// Headline Label
if (false) {
$headLabel = new Label_Text();
$settingFrame->add($headLabel);
$headLabel->setHAlign(Control::LEFT);
$headLabel->setX($width * -0.46);
$headLabel->setSize($width * 0.6, $settingHeight);
$headLabel->setStyle($headLabel::STYLE_TextCardSmall);
$headLabel->setTextSize($labelTextSize);
$headLabel->setText($setting->class);
$headLabel->setTextColor("F00");
} // Headline
$nameLabel = new Label_Text(); $nameLabel = new Label_Text();
$settingFrame->add($nameLabel); $settingFrame->add($nameLabel);
@ -194,7 +189,7 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
$entry->setDefault($setting->value); $entry->setDefault($setting->value);
} }
$y -= $settingHeight; $posY -= $settingHeight;
$index++; $index++;
} }