Updated FML to newest version

This commit is contained in:
Jocy
2017-04-02 16:32:57 +02:00
parent 83710a9269
commit c5926aded2
21 changed files with 1425 additions and 995 deletions

View File

@ -75,6 +75,7 @@ class ControlScript extends ScriptFeature
public function setControl(Control $control)
{
$control->checkId();
$control->addScriptFeature($this);
$this->control = $control;
$this->updateScriptEvents();
return $this;
@ -104,6 +105,20 @@ class ControlScript extends ScriptFeature
return $this;
}
/**
* Set the script text
*
* @api
* @param string $text Text
* @return static
* @deprecated Use setScriptText()
* @see ControlScript::setScriptText()
*/
public function setText($text)
{
return $this->setScriptText($text);
}
/**
* Get the Script Label name
*
@ -174,8 +189,8 @@ declare Control <=> Event.Control;";
$scriptText .= "
declare Control <=> Page.GetFirstChild({$controlId});";
}
$class = $this->control->getManiaScriptClass();
$name = preg_replace('/^CMl/', '', $class, 1);
$class = $this->control->getManiaScriptClass();
$name = preg_replace('/^CMl/', '', $class, 1);
$scriptText .= "
declare {$name} <=> (Control as {$class});
";