Load message when loading PNG
mikey186
Posts: 84
I'm trying to let the user know when a file with a PNG extension is used, it gives a notice about transparent PNGs, how do I give a message box when it loads a PNG?
var sPath = FileDialog.doFileDialog(true, "Select an Image File", oImageMgr.getImageOpenPath(), "Image Files(*.png *.jpg *.tif)");if(sPath){ oImage = new Image(); if(oImageMgr.loadImage(sPath, oImage)){ var oTexture = oImageMgr.getImage(sPath); var oFileInfo = new DzFileInfo(sPath); oImageMgr.setImageOpenPath(sPath); var sNodeName = "%1".arg(oFileInfo.baseName()); if( DzFileInfo( String( "PNG" )) { MessageBox.information( "Your image is now PNG.", "Plane created!", "OK", "" ); }
Post edited by mikey186 on
Comments
Don't you want
to check the extension? Though I am not entirely following what you are doing anyway.
OK, first I goofed above - had DzFileInfo instead of the actual variable oFileInfo so I've fixed that, though Rob has in any event supplied a more thorough answer:
Points to note, as I understand them:
Thank you! Now in the message box, is there a way when someone clicks a button in the message box, it takes you to a webpage OR a asset to load within DAZ?
I'm nots sure - DS can certainly do that, and I wold think the needed functions are in Content Manager and Asset Manager (for content that is in the databasse).