Page 1 of 1

Loadpicture()

PostPosted: Thu Oct 20, 2016 4:54 pm
by Robertspark
with the Loadpicture() function, what does IsLastpicturetoload mean (not listed in the screenset manual despite the function being listed).


Loadpicture()
Function: void Loadpicture( string pictureupURL, string picturedownURL,
int picturenumber, bool IsLastpicturetoload )
Description: This function loads 2 images into memory; the first 2 parameters are the filenames with the directory path for the image files. The base path is the UCCNC installation /Flashscreen/ path.
Parameters:
• pictureupURL defines the image which is shown when a button is not pressed (i.e. is released)
• picturedownURL defines the image which is shown when the button is being pressed. For screen elements like for backgrounds where only one image is used set both parameters the same and the software will automatically load one instance only into the memory.
• picturenumber defines the numeric identifier for the picture, this identifier can be later used to identify this image when the image has to be rendered onto a screen object like on a button or a background, tab layer etc.
IsLastpicturetoload defines
Example: AS3.Loadpicture(bitmapfolder + "plus_up.png", bitmapfolder + "plus_down.png", 22, false);

Re: Loadpicture()

PostPosted: Thu Oct 20, 2016 5:13 pm
by cncdrive
It tells the software that it is the last picture to load and that there will be no more pictures.
The picture loading went totally out of syncron when the UCCNC screen was Flash based, so the software had to inform the Flashplayer that this is the last image to load and the Flashplayer sent back info when all the images got loaded. Image loading worked also asyncronous inside Flash, so it was a pretty complex task to syncronise these to eachother and we had to add several events and checkpoints for this, the mentioned parametes served as a checkpoint for this.
With the new OpenGL screen engine this parameter basicly lost it's functionality, because the images are load in the C# main program in syncron with other codes execution, but we kept the parameter for backwards compatibility of the Loadpicture function prototype.

Re: Loadpicture()

PostPosted: Thu Oct 20, 2016 6:17 pm
by Robertspark
Thanks Balazs, I'll list it as "legacy parameter, set to false", that should maintain some consistency plus ensure there is no issues... if there is... set the last loadpicture() to true if you're using old software... most the functions listed in the manual won't work anyway.... suggested to upgrade anyway