fixed bug, but still not working due the structure
This commit is contained in:
parent
e71b763075
commit
b529fc5eb7
@ -145,15 +145,15 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener {
|
|||||||
$pagesId = 'ScriptSettingsPages';
|
$pagesId = 'ScriptSettingsPages';
|
||||||
$frame = new Frame();
|
$frame = new Frame();
|
||||||
|
|
||||||
$scriptInfo = (array)$this->maniaControl->client->getModeScriptInfo();
|
$scriptInfo = $this->maniaControl->client->getModeScriptInfo();
|
||||||
if(isset($scriptInfo['faultCode'])) {
|
/*if(isset($scriptInfo->)) {
|
||||||
// Not in script mode
|
// Not in script mode
|
||||||
$label = new Label();
|
$label = new Label(); //TODO
|
||||||
$frame->add($label);
|
$frame->add($label);
|
||||||
$label->setText($scriptInfo['faultString']);
|
$label->setText($scriptInfo['faultString']);
|
||||||
return $frame;
|
return $frame;
|
||||||
}
|
}*/
|
||||||
$scriptParams = $scriptInfo['ParamDescs'];
|
$scriptParams = $scriptInfo->paramDescs;
|
||||||
|
|
||||||
$scriptSettings = (array)$this->maniaControl->client->getModeScriptSettings();
|
$scriptSettings = (array)$this->maniaControl->client->getModeScriptSettings();
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener {
|
|||||||
$pageFrames = array();
|
$pageFrames = array();
|
||||||
$y = 0.;
|
$y = 0.;
|
||||||
foreach($scriptParams as $index => $scriptParam) {
|
foreach($scriptParams as $index => $scriptParam) {
|
||||||
$settingName = $scriptParam['Name'];
|
$settingName = $scriptParam->name;
|
||||||
|
|
||||||
if(!isset($scriptSettings[$settingName])) {
|
if(!isset($scriptSettings[$settingName])) {
|
||||||
continue;
|
continue;
|
||||||
@ -259,7 +259,7 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener {
|
|||||||
$descriptionLabel->setSize($width * 0.7, $settingHeight);
|
$descriptionLabel->setSize($width * 0.7, $settingHeight);
|
||||||
$descriptionLabel->setTextSize($labelTextSize);
|
$descriptionLabel->setTextSize($labelTextSize);
|
||||||
$descriptionLabel->setTranslate(true);
|
$descriptionLabel->setTranslate(true);
|
||||||
$descriptionLabel->setText($scriptParam['Desc']);
|
$descriptionLabel->setText($scriptParam->desc);
|
||||||
$script->addTooltip($nameLabel, $descriptionLabel);
|
$script->addTooltip($nameLabel, $descriptionLabel);
|
||||||
|
|
||||||
$y -= $settingHeight;
|
$y -= $settingHeight;
|
||||||
@ -276,7 +276,7 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener {
|
|||||||
* @see \ManiaControl\Configurators\ConfiguratorMenu::saveConfigData()
|
* @see \ManiaControl\Configurators\ConfiguratorMenu::saveConfigData()
|
||||||
*/
|
*/
|
||||||
public function saveConfigData(array $configData, Player $player) {
|
public function saveConfigData(array $configData, Player $player) {
|
||||||
|
//TODO fix settings
|
||||||
$prefix = explode(".", $configData[3][0]['Name']);
|
$prefix = explode(".", $configData[3][0]['Name']);
|
||||||
if($prefix[0] != self::ACTION_PREFIX_SETTING) {
|
if($prefix[0] != self::ACTION_PREFIX_SETTING) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user