From 201d17dae64d4e4d1c0bcad660bc2e64ebe787c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Mon, 9 Dec 2013 09:07:55 +0100 Subject: [PATCH] ingame configurator adjustments --- .../core/Configurators/Configurator.php | 6 ++-- .../core/Configurators/ScriptSettings.php | 36 ++++++++++--------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/application/core/Configurators/Configurator.php b/application/core/Configurators/Configurator.php index 524bdca6..21a15b53 100644 --- a/application/core/Configurators/Configurator.php +++ b/application/core/Configurators/Configurator.php @@ -63,9 +63,9 @@ class Configurator implements CallbackListener, ManialinkPageAnswerListener { // Init settings $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_POSX, 0.); - $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_POSY, 0.); + $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_POSY, 3.); $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_WIDTH, 170.); - $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_HEIGHT, 90.); + $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_HEIGHT, 81.); $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_STYLE, Quad_BgRaceScore2::STYLE); $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_SUBSTYLE, Quad_BgRaceScore2::SUBSTYLE_HandleSelectable); @@ -239,7 +239,7 @@ class Configurator implements CallbackListener, ManialinkPageAnswerListener { // Add Close Quad (X) $closeQuad = new Quad_Icons64x64_1(); $frame->add($closeQuad); - $closeQuad->setPosition($menuWidth * 0.484, $menuHeight * 0.47, 3); + $closeQuad->setPosition($menuWidth * 0.483, $menuHeight * 0.467, 3); $closeQuad->setSize(6, 6); $closeQuad->setSubStyle(Quad_Icons64x64_1::SUBSTYLE_QuitRace); $closeQuad->setAction(self::ACTION_TOGGLEMENU); diff --git a/application/core/Configurators/ScriptSettings.php b/application/core/Configurators/ScriptSettings.php index 4af31a09..cf2fb612 100644 --- a/application/core/Configurators/ScriptSettings.php +++ b/application/core/Configurators/ScriptSettings.php @@ -75,7 +75,7 @@ class ScriptSettings implements ConfiguratorMenu { $pagerSize = 9.; $settingHeight = 5.; $labelTextSize = 2; - $pageMaxCount = 15; + $pageMaxCount = 13; // Pagers $pagerPrev = new Quad_Icons64x64_1(); @@ -107,18 +107,34 @@ class ScriptSettings implements ConfiguratorMenu { $pageFrame = new Frame(); $frame->add($pageFrame); array_push($pageFrames, $pageFrame); - $y = $height * 0.43; + $y = $height * 0.41; } + $settingFrame = new Frame(); + $pageFrame->add($settingFrame); + $settingFrame->setY($y); + $nameLabel = new Label(); - $pageFrame->add($nameLabel); + $settingFrame->add($nameLabel); $nameLabel->setHAlign(Control::LEFT); - $nameLabel->setPosition($width * -0.46, $y); + $nameLabel->setX($width * -0.46); $nameLabel->setSize($width * 0.4, $settingHeight); $nameLabel->setStyle($labelStyleSetting); $nameLabel->setTextSize($labelTextSize); $nameLabel->setText($settingName); + $entry = new Entry(); + $settingFrame->add($entry); + $entry->setHAlign(Control::RIGHT); + $entry->setX($width * 0.44); + $entry->setSize($width * 0.43, $settingHeight); + $entry->setName(self::NAME_PREFIX . $settingName); + $settingValue = $scriptSettings[$settingName]; + if ($settingValue === false) { + $settingValue = 0; + } + $entry->setDefault($settingValue); + $decriptionLabel = new Label(); $pageFrame->add($decriptionLabel); $decriptionLabel->setHAlign(Control::LEFT); @@ -130,18 +146,6 @@ class ScriptSettings implements ConfiguratorMenu { $decriptionLabel->setText($scriptParam['Desc']); $tooltips->add($nameLabel, $decriptionLabel); - $entry = new Entry(); - $pageFrame->add($entry); - $entry->setHAlign(Control::RIGHT); - $entry->setPosition($width * 0.46, $y); - $entry->setSize($width * 0.45, $settingHeight); - $entry->setName(self::NAME_PREFIX . $settingName); - $settingValue = $scriptSettings[$settingName]; - if ($settingValue === false) { - $settingValue = 0; - } - $entry->setDefault($settingValue); - $y -= $settingHeight; if ($index % $pageMaxCount == $pageMaxCount - 1) { unset($pageFrame);