Page 1 of 1
[Feature request] append maniascript for gui and get xml
Posted: 29 Jan 2013, 23:53
by reaby
Hi,
A feature I miss at the moment is that i can't get XML from manialib generated code
AND i can't append a Maniascript for a window/element/manialinkpage!!!
or does $window->setScriptEvents() do some magic behind the scenes, or what can it be used ?
Re: [Feature request] append maniascript for gui and get xml
Posted: 30 Jan 2013, 09:59
by reaby
...and all this due I got true windowing working and can't wait to implement it to server side widgets
http://reaby.kapsi.fi/ml/test.xml
(copypaste link to maniaplanet url bar)
Fellow coders, feel free to improve your widgets code using the example

Re: [Feature request] append maniascript for gui and get xml
Posted: 30 Jan 2013, 10:36
by The_Big_Boo
Actually you can use \Manialink\Gui\Elements\Xml to add any custom XML to the output, like your Maniascript.
Example:
Code: Select all
class MyWindow extends \ManiaLive\Gui\Window
{
protected function onConstruct()
{
$xml = new \ManiaLive\Gui\Elements\Xml();
$xml->setContent('<script><!--main() { log("Hello World!"); }--></script>');
$this->addComponent($xml);
}
}
Re: [Feature request] append maniascript for gui and get xml
Posted: 30 Jan 2013, 10:39
by reaby
thanks!!
fixed the graphics in the manialink, it was pointing to localhost :/
and another test:
http://reaby.kapsi.fi/ml/test2.xml