Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Shivan Hunter on August 28, 2011, 04:00:52 pm

Title: crazy thought, ingame menus
Post by: Shivan Hunter on August 28, 2011, 04:00:52 pm
I think the ability to bring up an ingame menu would be really helpful for certain kinds of situations. I originally came up with the idea when I was deciding how to handle opening containers and possibly taking their contents, but I think there could be a variety of uses.

It would look something like this (rough mockup):

(http://i.imgur.com/PlFAD.png)

It could be drawn just using colored boxes and text, or defined with images (possibly some weird kind of HUD gauge)?

For dialogue trees, the top part could be done away with, since the other ship would simply send a message.

The SEXP would look like:
draw-menu
 - variable to store choice in
 - number of choice/response buttons
 - button 1 text
 - button 2 text
 - etc
 - [optional] top area text (top area not shown if this is not used)

I have no idea if this would be moderately difficult or nigh-impossible due to some aspect of the engine, so just tell me if it is and I'll forget about it.
Title: Re: crazy thought, ingame menus
Post by: The E on August 28, 2011, 04:04:30 pm
This can be done with hud gauges.
Title: Re: crazy thought, ingame menus
Post by: Shivan Hunter on August 28, 2011, 04:16:32 pm
I sort of see how I can do that... how would I define the different text though? Going by the Wiki it seems I can only set one string, not several with different locations, which I need here.
Title: Re: crazy thought, ingame menus
Post by: mjn.mixael on August 28, 2011, 04:22:51 pm
Multiple gauges.
Title: Re: crazy thought, ingame menus
Post by: Shivan Hunter on August 28, 2011, 04:45:41 pm
Ah, I see how it'd be done now. Thanks.
Title: Re: crazy thought, ingame menus
Post by: Nuke on August 28, 2011, 05:41:11 pm
i think id use scripting for this kinda thing.
Title: Re: crazy thought, ingame menus
Post by: mjn.mixael on August 28, 2011, 05:47:10 pm
Not all of us can script.. and with hud gauges.. it's really easy.
Title: Re: crazy thought, ingame menus
Post by: Nuke on August 28, 2011, 09:45:28 pm
yea but how much can you do with the gauge based menus? scripted menus are much more versatile.
Title: Re: crazy thought, ingame menus
Post by: Black Wolf on August 28, 2011, 10:00:39 pm
I'd expect the 31 charachter limit would be a pain in the arse here, no matter how it was done, if you wanted to make menu's a regular part of your campaign (as might be needed in many non-military based campigns, or any character based campaigns even.

While a table based system might be workable, I'd love to see something like this available through the sexp system, though only if it worked with messages (much like the way training messages do) rather that 31 character strings. It'd be much more flexible I suspect.
Title: Re: crazy thought, ingame menus
Post by: Reprobator on August 29, 2011, 02:27:24 am
I'd like the idea of a "comm like" menu called by another key where you could fill it up in fred to interact with the mission via sexp
A default free and common key so the players does know they can call 'interact menu' to call specificitie of the campaign/mods
Something like
When
menu selection done
xxxx
false (your action intended)
Title: Re: crazy thought, ingame menus
Post by: The E on August 29, 2011, 03:10:21 am

While a table based system might be workable, I'd love to see something like this available through the sexp system, though only if it worked with messages (much like the way training messages do) rather that 31 character strings. It'd be much more flexible I suspect.


hud-set-message and hud-set-directive say hello.
Title: Re: crazy thought, ingame menus
Post by: Reprobator on August 29, 2011, 03:17:40 am
interesting
Title: Re: crazy thought, ingame menus
Post by: Nuke on August 29, 2011, 03:29:03 am
you could also just use this (http://wxlua.sourceforge.net/).
Title: Re: crazy thought, ingame menus
Post by: m!m on August 29, 2011, 03:46:49 am
:wtf: How would you use wxWidgets inside FreeSpace?
Title: Re: crazy thought, ingame menus
Post by: Reprobator on August 29, 2011, 04:18:10 am
I wonder if we could not make some king of circular menu like in iwar2 via lua (guess yes anyway, i'd really love to learn lua ^^ )
Title: Re: crazy thought, ingame menus
Post by: Nuke on August 29, 2011, 07:50:33 pm
:wtf: How would you use wxWidgets inside FreeSpace?

apparently you can load it as a lua module witout any changes in c. im not sure if it would be useful or not to make ingame menus, or if it would even work, but it is an idea.

i think id just use my own home grown gui, even though it aint done yet. buttons and sliders work (i had intended to make a config ui for my megascripts), i figure if i implement frames, labels, text boxes it should be sufficient for most menus. it just takes a function call to create an interface object and once defined you just read the output values of the object. making it easy to do this through a script-eval sexp would be mostly trivial.
Title: Re: crazy thought, ingame menus
Post by: m!m on August 30, 2011, 03:20:16 am
:wtf: How would you use wxWidgets inside FreeSpace?

apparently you can load it as a lua module witout any changes in c. im not sure if it would be useful or not to make ingame menus, or if it would even work, but it is an idea.

i think id just use my own home grown gui, even though it aint done yet. buttons and sliders work (i had intended to make a config ui for my megascripts), i figure if i implement frames, labels, text boxes it should be sufficient for most menus. it just takes a function call to create an interface object and once defined you just read the output values of the object. making it easy to do this through a script-eval sexp would be mostly trivial.
You'd still need to get it to draw to the FreeSpace screen somehow and I don't think that's possible :(.

I wonder if we could not make some king of circular menu like in iwar2 via lua (guess yes anyway, i'd really love to learn lua ^^ )
Definitely possible. Would surely be fun to play with :D
Title: Re: crazy thought, ingame menus
Post by: Reprobator on August 30, 2011, 03:32:21 am
(http://www.i-war2.com/EdgeOFChaosDemoGuide/images/hud/hud_menu.jpg)

That would be awesome to have some menu like dock/stealth or  whatever you want to do in mods and campaign ^^
maintaining middle mouse for it to pop up (deactivate mouse ship control when middle mouse is maintained and just move the mouse in the direction you want to select in the menu)