Daily Report #4 - Museum Project
“I did it!” as Hiro Nakamura from Heroes would say.
I finally managed to create the import GUI with the help of Thomas Bang
Before i had many ideas how to display the current folder and browse through it. It also worked very well but there were always some bugs that couldn’t be change without the use of another DLL function. So i wanted to ask Thomas Bang to write a new function, but in the same moment, he sent me a link to an interesting article about API Save and Open Dialogs for Torque Game Builder (the 2D Engine). Fortunately, it also works with TGE and TGEA.
So now the user can click “Import texture” and browse through all of his folders, choose a file and click “Open”. It delivers a string with the full path to the file.
Then i can manipulate the string a bit to use Thomas Bang’s SaveFileTo function to copy the new file to the folder where the frame is located, rename the file and list it in the texture gui.
As mentioned before, i had a problem displaying imported file cause the engines Resource Manager must refresh before you see the file. There is a small trick to do this:
setModPath(getModPath());
This will re-check the folders of the current game and implement new file.
So the texturing Part is done now. I’m really happy about it and can now go on with manipulating the frame model ingame (make it bigger, smaller, change the ration, etc).
See ya next time, and don’t forget - Save the Cheerleader, save the world!
