Pages: 1
Author Topic: Get Directory XP  (Read 5040 times)
Offline (Unknown gender) time-killer-games
Posted on: March 19, 2018, 03:46:34 pm

Extension Preview

Extension Screenshot

Installation Instructions

1) Download ENIGMA extension ZIP
(there's also a demo EXE available)

2) Extract the zip under:

3) Make sure the path to the extension's files after extraction looks like this:

4) and NOT like this:

Function Documentation

This extension allows you to use the function get_directory_xp(dname), which is basically the same thing as get_directory(dname) in pre-Studio versions of GameMaker (v4.3 to v8.1 to be exact). This function asks for a directory. dname is the default name. If the user presses "Cancel" an empty string "" is returned. Supports UTF-8 encoding, unlike most of ENIGMA, for the moment. ENIGMA's current implementation of get_directory(dname) uses a much newer dialog, which only works on Windows Vista and upwards.

Backwards Compatibility, GameMaker Compatibility

If you happen to need this function working on Vista and up, but also on XP and older, this extension was made for just that. Another advantage of this function is unlike ENIGMA's get_directory(dname), and get_directory_alt(capt, root), you have a listbox that allows you to see the file contents of the currently selected folder, which is how GameMaker works. The dialog looks and works 99% like GameMaker's get_directory(dname) implementation.

Miscellaneous Information

This will be added to ENIGMA's portable and on GitHub eventually, I just need to make a few minor adjustments, that will not effect how the extension works, such as adding copyright information in the code comments at the top of the source and header files.
« Last Edit: March 19, 2018, 04:25:33 pm by time-killer-games » Logged
Offline (Male) Goombert
Reply #1 Posted on: April 28, 2018, 07:32:37 pm

Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
This is really nice TKG, I actually tried to do this myself when I added [snip]get_directory_alt[/snip] but couldn't figure it out. I'm going to ask you about just patching this into the official ENIGMA for everyone using a macro to use your version when it's Windows XP and lower.

You can see my comment here about not being able to find what GM uses for [snip]get_directory[/snip] on the old Windows:
« Last Edit: April 28, 2018, 11:33:33 pm by Goombert » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: 1