Got a question here...
I've just started using ManiaLib, and it looks great. But my question is, why does this show no background image?
Code: Select all
<?php
use ManiaLib\Gui\Manialink;
use ManiaLib\Gui\Elements\Bgs1InRace;
use ManiaLib\Gui\Elements\Quad;
use ManiaLib\Gui\Elements\Label;
require_once __DIR__.'/libraries/autoload.php';
Manialink::load();
{
//Background
Manialink::beginFrame(-160, 90, 0);
{
$ui = new Quad(320,180);
$ui->setImage('ScreenShot93.jpg'); // <-- This will not load the image.
$ui->save();
}
Manialink::endFrame();
Manialink::beginFrame(-15, 0, 0);
{
$ui = new Label(140);
$ui->setValign('center');
$ui->setText('AAAAAAAAAAAAAAGRH');
$ui->save();
}
Manialink::endFrame();
}
Manialink::render();
?>
Code: Select all
<manialink version="1" background="1" navigable3d="0">
<timeout>0</timeout>
<frame posn="-160 90 0">
<quad sizen="320 180" image="media/images/ScreenShot93.jpg"/> //<-- why is the image link different?
</frame>
<frame posn="-15 0 0">
<label sizen="140 7" valign="center" style="TextStaticSmall" text="AAAAAAAAAAAAAAGRH"/>
</frame>
</manialink>
Do I need to reference another file to display background images?
Thanks for any advice