ENIGMA Forums

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

(https://i.imgur.com/26OR97P.png)

Extension Screenshot

(https://i.imgur.com/rxWGTuu.png)

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:
"[YourEnimgaFolder]\enigma-dev\ENIGMAsystem\SHELL\Universal_System\Extensions\"

3) Make sure the path to the extension's files after extraction looks like this:
"[YourEnimgaFolder]\enigma-dev\ENIGMAsystem\SHELL\Universal_System\Extensions\GetDirectoryXP\[ExtensionFiles]"

4) and NOT like this:
"[YourEnimgaFolder]\enigma-dev\ENIGMAsystem\SHELL\Universal_System\Extensions\GetDirectoryXP\GetDirectoryXP\[ExtensionFiles]"

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 [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:
https://github.com/enigma-dev/enigma-dev/blob/60b14308ad56dddeccd750be3e25843cd005d073/ENIGMAsystem/SHELL/Widget_Systems/Win32/dialogs.cpp#L549