From 5e6318b6b55d9bba00f9b2401942d1d43c902956 Mon Sep 17 00:00:00 2001 From: kremsy Date: Mon, 9 Dec 2013 21:11:43 +0100 Subject: [PATCH] aktive buttons on menu plugin --- application/core/Plugins/PluginMenu.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/application/core/Plugins/PluginMenu.php b/application/core/Plugins/PluginMenu.php index 3edf5d16..ed3944b8 100644 --- a/application/core/Plugins/PluginMenu.php +++ b/application/core/Plugins/PluginMenu.php @@ -2,9 +2,7 @@ namespace ManiaControl\Plugins; -use FML\Controls\Labels\Label_Button; use FML\Controls\Quad; -use FML\Controls\Quads\Quad_Icons64x64_1; use ManiaControl\ManiaControl; use ManiaControl\Players\Player; use ManiaControl\Configurators\ConfiguratorMenu; @@ -76,12 +74,16 @@ class PluginMenu implements ConfiguratorMenu { $settingFrame->setY($y); //TODO: Red or Green quad to see if the plugin is aktiv (not working yet) - $aktivQuad = new Quad_Icons64x64_1(); + $aktivQuad = new Quad(); $settingFrame->add($aktivQuad); - $aktivQuad->setStyle(Quad_Icons64x64_1::SUBSTYLE_ArrowRed); - $aktivQuad->setHeight(10); - $aktivQuad->setWidth(10); - $aktivQuad->setX($width * 0.2); + if($aktiv) + $aktivQuad->setStyles("Icons64x64_1", "LvlGreen"); + else + $aktivQuad->setStyles("Icons64x64_1", "LvlRed"); + $aktivQuad->setHeight(5); + $aktivQuad->setWidth(5); + $aktivQuad->setX($width * -0.455); + //TODO handle z position automatically in fml pls $nameLabel = new Label(); $settingFrame->add($nameLabel); @@ -105,12 +107,12 @@ class PluginMenu implements ConfiguratorMenu { $tooltips->add($nameLabel, $descriptionLabel); //TODO set aktive button - $aktivButton = new Quad(); - $aktivButton->setBgColor("Red"); + /*$aktivButton = new Quad(); + $aktivButton->setBgColor("F00"); $aktivButton->setHeight(10); $aktivButton->setWidth(10); $aktivButton->setX($width * 0.2); - $settingFrame->add($aktivButton); + $settingFrame->add($aktivButton);*/ //$aktivButton = new Labels\Label_Button();