Author Topic: messing with FRED2 popup menus  (Read 2233 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
messing with FRED2 popup menus
I'm working on redoing up the FRED2 sexp popup menus (hoping to have it done before the Christmas release) but I've hit a wall.

What I'm trying to do is add another level of submenus to each category, depending on whether the sexp is in a particular subcategory.  So the Change sexps are further divided into Messaging and Mission Goals, AI and IFF, Beams and Turrets, etc.  I want to leave it customizable, like :v:'s category system, and I'm only subcategorizing the Change sexps (since that's by far the biggest list).  I think this will speed up FREDding tremendously, because it'll cut the time spent searching for a particular sexp (as well as time spent scrolling) to almost nil.

I think I've hit upon a way to do this, but the only problem is I can't select any of my submenus - they're all greyed out.  I checked through the code and I have no idea why this is the case.

I've attached the file I'm working on.  (I'd post a screenshot, but you can't take screenshots of menus in action.)  With a fully-updated CVS project, the thing will compile and you can see what's going on -- start FRED2, make a new event, and try to replace the do-nothing sexp.  Other than the do-nothing sexp itself (which I didn't subcategorize), nothing in the Change menu is enabled.

Any help? :)

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
messing with FRED2 popup menus
Come on, somebody answer. :) DTP, this is your specialty, isn't it?  (What's the Denmark time difference? :nervous: )

 

Offline Solatar

  • 211
messing with FRED2 popup menus
Depends, where are you?

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
messing with FRED2 popup menus
Not sure what the problem is, since I don't have VC++ 6.0, but I do know that you can catch menus in action via a printscreen screenshot. If you mean the submenus are disabled when the program is run, then you might have to set something in the IDE to enable them. (Individual menu items in BCB have an "Enabled" property that can be either true or false.) You might also look for code that might be disabling them. (Remember, FRED2 normally enables and disables menus depending on what exactly you're doing.) Last but not least, make sure they're actually setup to have submenus and it's not treating them as regular menu items. Splitting the change menu up wouldn't be a bad thing, it's longer then my screen is tall.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
messing with FRED2 popup menus
Quote
Originally posted by Hades
Depends, where are you?


East coast.

Quote
Originally posted by EdrickV
Not sure what the problem is, since I don't have VC++ 6.0, but I do know that you can catch menus in action via a printscreen screenshot.


You're right.  For some reason, it didn't work before.  Here's a screenshot - as you can see, none of the subcategories are enabled.



Quote
If you mean the submenus are disabled when the program is run, then you might have to set something in the IDE to enable them. (Individual menu items in BCB have an "Enabled" property that can be either true or false.)


Tried that.

Quote
You might also look for code that might be disabling them. (Remember, FRED2 normally enables and disables menus depending on what exactly you're doing.)


This, I think, is the culprit.  But I already looked through the code and didn't see where this might happen.  (The subroutine in question is sexp_tree::right_clicked.)

Quote
Last but not least, make sure they're actually setup to have submenus and it's not treating them as regular menu items.


Tried this, too.  I don't think this is the problem.

EDIT: Linked the attachment as an image within the post.
« Last Edit: December 21, 2002, 09:05:32 pm by 561 »

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Sleeping on a problem and coming back the next day with a good night's sleep is A-1 SUPAR. :) One of my arrays was using i where it should have been using j, and nothing was being added to the new popup menus. :rolleyes: It's fixed now, though.  Look for it in the next release. :)

EDIT: Change committed; everything works. :) Note that a bunch of stuff has been moved around in some of the files, so ignore any conflicts if you get them. :)
« Last Edit: December 22, 2002, 11:32:19 am by 561 »

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
messing with FRED2 popup menus
:yes: nice job

I may use this occation to tell people that there is now a TBL INFO button present next to initial orders in ship editor.

Pressing this will show the TBL INFO for the current selected ship Type.

if multiple ship types are selected, it cannot be pressed.

Will be availeble from fred2_open 3.4
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline Solatar

  • 211
messing with FRED2 popup menus
:thepimp:

  

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
messing with FRED2 popup menus
Good stuff. :yes:

I just added primaries-depleted and primary-ammo-pct, useful for when you have ships with ballistic primaries.