Blockland Forums > Modification Help
Adding image overlay/GUI to screen
xS K I D z:
--- Code: ---function periTestImage::onMount(%this,%obj,%slot)
{
PlayGui.getExtent();
echo(%this);
}
--- End code ---
I suppose I could try a different method(getRes?), but originally I wanted to get the PlayGui extents on image mount then use that to resize the bitmap.
PhantOS:
getExtent returns a value. %this returns the periTestImage weaponImage you are packaging it inside.
You'd probably want to do echo(PlayGui.getExtent()); if you want to echo the extent data.
or you can do %extent = PlayGui.GetExtent(); if you want to keep the extent on a local variable
xS K I D z:
--- Quote from: PhantOS on March 03, 2018, 02:58:41 PM ---getExtent returns a value. %this returns the periTestImage weaponImage you are packaging it inside.
You'd probably want to do echo(PlayGui.getExtent()); if you want to echo the extent data.
or you can do %extent = PlayGui.GetExtent(); if you want to keep the extent on a local variable
--- End quote ---
This worked, thanks.