ENIGMA Forums

Sharing is caring => Tips, Tutorials, Examples => Topic started by: Benxamix2 on September 05, 2013, 02:55:58 pm

Title: Setting up External Editors
Post by: Benxamix2 on September 05, 2013, 02:55:58 pm
If you didn't know, LGM allows to use your own editors for coding, image editing, background editing, and sound editing.
This isn't issued within the wiki, so I'm making a tutorial here.


To find your external editors, you have to go to "File > Preferences" in the LateralGM menu. There, you'll see a tab called "External Editors".
(https://dl.dropboxusercontent.com/u/52212606/imagenes/capturas%20de%20pantalla/enigmaexample0.png)
(https://dl.dropboxusercontent.com/u/52212606/imagenes/capturas%20de%20pantalla/enigmaexample5.png)


To set an external editor, you have to make an execution command for it. What do I mean? Well, do you know how does Windows shortcuts work, don't you? They store a "destination" value, more likely a Windows command (http://en.wikipedia.org/wiki/Command_Prompt), to be executed when you double click them. These destinations are formatted so they compose of 2 noticeable elements:



The "execution command" for external editors work pretty much the same as the shortcuts' destination.

Now you will ask me, "how do I get those destination things?"... I'll do an example for you.

I will be configuring Paint.NET (http://www.getpaint.net/) as my Sprite Editor.


And that's how it's done.
If you have any problems, feel free to ask!
Title: Re: Setting up External Editors
Post by: Goombert on September 05, 2013, 06:32:23 pm
... Ben, I don't know how you did that, but I thought I never added that functionality o_O for me the image editor just loads paint dot net.
Title: Re: Setting up External Editors
Post by: Josh @ Dreamland on September 05, 2013, 06:53:36 pm
Robert: That is part of LGM's original functionality. I have no idea what compelled you to map that properties file to a UI dialog without mentioning, "by the way, %s indicates the filename and, odds are, your program will want to know that."

Thanks for sharing, Ben.
Title: Re: Setting up External Editors
Post by: Benxamix2 on September 05, 2013, 07:16:04 pm
... Ben, I don't know how you did that, but I thought I never added that functionality o_O for me the image editor just loads paint dot net.

That's weird; for me it used to load the default MSPaint...
This works as much for GIMP or any other image editing software than PaintDotNet (I say so because I tested it).


Robert: That is part of LGM's original functionality. I have no idea what compelled you to map that properties file to a UI dialog without mentioning, "by the way, %s indicates the filename and, odds are, your program will want to know that."

Thanks for sharing, Ben.

Yeah, I read about the %s parameter somewhere and figured out how to use this thing, though I don't remember where I did.
I think someone wrote it within these forums :P
Title: Re: Setting up External Editors
Post by: Goombert on September 05, 2013, 07:22:17 pm
Josh, Ben, I thought I only implemented that UI temporarily though I thought I never made it do anything is what I meant because I was still thinking how I wanted it to look, but anyway glad it works. ^_^

Ben, you also do know there are native themes for LGM that don't make it look like garbage right? The default Swing one is grotesque.
Title: Re: Setting up External Editors
Post by: Benxamix2 on September 05, 2013, 07:26:43 pm
I know. I just like the default because the others don't suit my color preference, and the Windows-theme-based ones (Native, Windows, Windows Classic, Nimbus, CDE/Motif) are kind of buggy;

(https://dl.dropboxusercontent.com/u/52212606/imagenes/capturas%20de%20pantalla/enigmasc1.png)
Title: Re: Setting up External Editors
Post by: Goombert on September 06, 2013, 08:55:25 am
@Ben, its not buggy, you have to restart after changing the themes :P
Title: Re: Setting up External Editors
Post by: Josh @ Dreamland on September 06, 2013, 09:45:15 am
Most people would expect you to write the setting without attempting to change the theme knowing it would fail.
Title: Re: Setting up External Editors
Post by: Benxamix2 on September 06, 2013, 05:12:03 pm
@Ben, its not buggy, you have to restart after changing the themes :P

Darn...
Thanks, man :)
Title: Re: Setting up External Editors
Post by: IsmAvatar on October 02, 2014, 10:35:40 am
By default, it will load whatever your System Default Image Editor is.
This is why it's loading different editors for you guys.
I programmed it that way, which is why Robert wasn't aware of it.
Thanks for documenting it, Benxamix2. Someone should probably add a wiki page for it if there isn't already one.