it returns an array of strings. That was the final command I needed to make this useful little image previewer. But it seems to show images from the local folder and not from the server?
Also the image Bitmap control does not even show the initial bomb.png image...
This is a free for all script that I think every graphics artist or lat looking for an image would appreciate once it works. Feel free to tweak it to have it work and look right.
PHP Code:
//#CLIENTSIDE
function onWeaponfired()
{
images.loadfolder("levels/images/*.png",0);
player.chat="found "@images.size()@" images";
new GuiWindowCtrl("image_viewer")
{
profile = GuiBlueWindowProfile;
width = 600;
height = 600;
x = (screenwidth - width) / 2;
y = (screenheight - height) / 2;
canMove = true;
canResize = false;
canMaximize = false;
canClose = true;
text = "Image Viewer"; //text in the top left title bar of the window
visible = true;
new GuiScrollCtrl("image_scroll")
{
profile = GuiBlueScrollProfile;
width=150;
height=300;
x=7;
y=10;
new GuiTreeViewCtrl("image_list")
{
profile = GuiBlueTreeViewProfile;
width=150;
height=400;
x=5;
y=10;
columns="0 5";
visible=true;
for (i=0; i<images.size(); i++)
{
addnodebypath(images[i],"blah");
}
} //end image list
} //end image scroll
new GuiBitmapCtrl("image_here")
{
x=20;
y=7;
width=300;
height=300;
image="bomb.png";
}
} //end window
} //end weaponfired
function image_list.onSelect()
{
player.chat=image_list.getselectednode(); //for variable testing
image_here.image=image_list.getselectednode();
}
so .. if u can make the image show up in the window then please post an update of this here. this should work but it dosent quite show the pics.