Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Axem on May 16, 2007, 01:57:51 pm

Title: FRED UI Idea/Request
Post by: Axem on May 16, 2007, 01:57:51 pm
I thought of this while tediously counting through the arguments of warp-effect and create-explosion. Its easy to accidentally edit the wrong argument in "long sexps", so I was wondering if it would be possible to number the sexp arguments. 2 minutes in Photoshop gave me this as an idea.

(http://img.photobucket.com/albums/v109/NarfPics/fredidea.png)

Would something like this be feasible at all?
Title: Re: FRED UI Idea/Request
Post by: Goober5000 on May 16, 2007, 05:09:17 pm
Brilliant idea.

Unfortunately I have no idea how to go about doing this.  It's probably pretty easy but someone would have to sit down and seriously look at the MFC documentation, which is an exercise in masochism.
Title: Re: FRED UI Idea/Request
Post by: karajorma on May 16, 2007, 06:38:58 pm
Maybe tooltips would be easier.
Title: Re: FRED UI Idea/Request
Post by: phreak on May 18, 2007, 12:13:11 pm
Maybe tooltips would be easier.

As in mouse over the arguement shows what the arguement does, and mouse over the sexp operator shows the entire sexp help text.  That would be way easier if we took the sexp help and threw it into some XML file.  Which would also mean we'd be able to modify it without having to recompile which is a plus.  I don't think what Axem is asking is easily (if at all) possible.  Of course, i wouldn't mind something like intellisense for fred.
Title: Re: FRED UI Idea/Request
Post by: karajorma on May 18, 2007, 02:40:06 pm
Actually I was just thinking about the tooltip saying the number for now. I considered having it give the info from the help file but quickly realised that would require completely rewriting how the help file works.

The problem with an XML file is that I, for instance, have at least 3 different versions of FRED in my FS2 folder at any one times (BtRL (which I'll be killing off soon), 3.6.9 CVS and HEAD) All 3 have different lists of SEXPs.
Title: Re: FRED UI Idea/Request
Post by: phreak on May 18, 2007, 04:04:18 pm
The problem with an XML file is that I, for instance, have at least 3 different versions of FRED in my FS2 folder at any one times (BtRL (which I'll be killing off soon), 3.6.9 CVS and HEAD) All 3 have different lists of SEXPs.

That really shouldn't matter unless those three versions of fred have different implementations of the same sexp.  Unlikely, but we could add a "version" attribute to the XML entry to say use this xml entry if the fred build is at most or at least the given build number.

The only other issue i would see is actually writing the damn thing ;),  its really easy in C# (XML parsing that is)
Title: Re: FRED UI Idea/Request
Post by: karajorma on May 19, 2007, 03:09:31 am
To be honest I don't see that much point in making it an external file really. It means that there is one more file to take care of and support. You're going to get issues with old XML files and newer FRED builds.

And since you'd have to restructure the FRED help array to make this work anyway it just seems more sensible to me to just keep it internal.
Title: Re: FRED UI Idea/Request
Post by: WMCoolmon on May 19, 2007, 04:57:08 am
I thought of this while tediously counting through the arguments of warp-effect and create-explosion. Its easy to accidentally edit the wrong argument in "long sexps", so I was wondering if it would be possible to number the sexp arguments. 2 minutes in Photoshop gave me this as an idea.

(http://img.photobucket.com/albums/v109/NarfPics/fredidea.png)

Would something like this be feasible at all?

http://fs2source.warpcore.org/exes/latest/C05192007.zip
Title: Re: FRED UI Idea/Request
Post by: karajorma on May 19, 2007, 07:35:30 am
Looks good to me. :)
Title: Re: FRED UI Idea/Request
Post by: Axem on May 19, 2007, 09:04:50 am
Cool. :) The extra box showing the current selection is a nice touch too.

(Though the numbering stops at 15 :p)
Title: Re: FRED UI Idea/Request
Post by: WMCoolmon on May 19, 2007, 02:59:00 pm
How far do you want them to go?
Title: Re: FRED UI Idea/Request
Post by: karajorma on May 19, 2007, 04:08:54 pm
Well I have a send-message-list SEXP in BtRL with 18 messages in it.

So for that to work I'd need 72 at least. :p
Title: Re: FRED UI Idea/Request
Post by: Snail on May 20, 2007, 01:22:04 pm
Infinity?
Title: Re: FRED UI Idea/Request
Post by: karajorma on May 20, 2007, 02:03:47 pm
No need to go that far. The limit is INT_MAX anyway. :p