Pages: 1
  Print  
Author Topic: Get Directory XP  (Read 385 times)
Offline (Male) time-killer-games
Posted on: March 19, 2018, 03:46:34 PM

Contributor
Location: Virginia Beach
Joined: Jan 2013
Posts: 1157

View Profile Email
Extension Preview



Extension Screenshot



Installation Instructions

1) Download ENIGMA extension ZIP
(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.
« 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

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

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