Pages: 1
  Print  
Author Topic: Setting up External Editors  (Read 12083 times)
Offline (Male) Benxamix2
Posted on: September 05, 2013, 02:55:58 pm

Member
Location: Chile
Joined: Mar 2012
Posts: 69

View Profile WWW Email
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".




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, to be executed when you double click them. These destinations are formatted so they compose of 2 noticeable elements:

  • Address. This is what the shortcut points to; whether an application, a webpage, etc... It's always set within quotes.
  • Parameters (also called launch options), is a group of specific variables that the adress receives. And is never within quotes.


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 as my Sprite Editor.
  • Go to the location where the software is located, via your Windows File Explorer. In my case, Hard Drive (C:) > Program Files > Paint.NET.
  • Now, click on the address bar. It will turn into an address to that location.


  • Copy and paste that address to the external editor field you want to setup. Don't forget to add the quotes.

  • Now, add a backslash to that address, and write the full filename of the application you're going to run (obviously, it has to be located inside the folder you just addressed).

  • Finally, add a  %s  to the field, after address outside the quotes. That %s is a parameter. It will force the program to start up AND open a file given by LGM. So, when you click into sprite editing, it will send a temporary file to the program. It's a bit complicated to explain, but I'm trying to make it understandable.



And that's how it's done.
If you have any problems, feel free to ask!
« Last Edit: May 04, 2014, 08:53:39 pm by Benxamix2 » Logged
Offline (Male) Goombert
Reply #1 Posted on: September 05, 2013, 06:32:23 pm

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

View Profile
... 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.
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.

Offline (Male) Josh @ Dreamland
Reply #2 Posted on: September 05, 2013, 06:53:36 pm

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Benxamix2
Reply #3 Posted on: September 05, 2013, 07:16:04 pm

Member
Location: Chile
Joined: Mar 2012
Posts: 69

View Profile WWW Email
... 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
Logged
Offline (Male) Goombert
Reply #4 Posted on: September 05, 2013, 07:22:17 pm

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

View Profile
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.
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.

Offline (Male) Benxamix2
Reply #5 Posted on: September 05, 2013, 07:26:43 pm

Member
Location: Chile
Joined: Mar 2012
Posts: 69

View Profile WWW Email
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;

« Last Edit: September 05, 2013, 07:28:29 pm by Benxamix2 » Logged
Offline (Male) Goombert
Reply #6 Posted on: September 06, 2013, 08:55:25 am

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

View Profile
@Ben, its not buggy, you have to restart after changing the themes :P
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.

Offline (Male) Josh @ Dreamland
Reply #7 Posted on: September 06, 2013, 09:45:15 am

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
Most people would expect you to write the setting without attempting to change the theme knowing it would fail.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Benxamix2
Reply #8 Posted on: September 06, 2013, 05:12:03 pm

Member
Location: Chile
Joined: Mar 2012
Posts: 69

View Profile WWW Email
@Ben, its not buggy, you have to restart after changing the themes :P

Darn...
Thanks, man :)
Logged
Offline (Female) IsmAvatar
Reply #9 Posted on: October 02, 2014, 10:35:40 am

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
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.
Logged
Pages: 1
  Print