Outsourcing saves money => Third Party => Topic started by: time-killer-games on March 19, 2018, 03:46:34 PM

Title: Get Directory XP
Post by: time-killer-games on March 19, 2018, 03:46:34 PM
Extension Preview


Extension Screenshot


Installation Instructions

1) Download ENIGMA extension ZIP (https://www.dropbox.com/sh/g5jotklkufmdt45/AAAqN-HdWlQyfHXoWN_Ra5LQa?dl=0)
(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.
Title: Re: Get Directory XP
Post by: Goombert on April 28, 2018, 07:32:37 PM
This is really nice TKG, I actually tried to do this myself when I added get_directory_alt 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 get_directory on the old Windows: