Input/Menu System

The place to discuss scripting and game modifications for X³: Farnham's Legacy

Moderators: Moderators for English X Forum, Scripting / Modding Moderators, Moderators for the X3:FL Forums

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22466
Joined: Sun, 14. Nov 04, 23:26
x4

Input/Menu System

Post by Cycrow »

The new input system is an event driven script, allowing you to create a complete menu system. (The old system is still available)

The old custom menu/get user input would allow you to get input from the user by displaying the menu, then waiting for the player to choose the option, which closes the menu and returns the result. Then the next input can be opened. The problem with this is that each input is not properly connected together, so it doesn't look quite right when opening multiple menus. This also meant that scripts had no control over the menu while its open (with the exception of manipulating the menu array externally)

The new system is tied into the core menu system, so each input is correctly connected together, allowing it to appear just like the built in menus. The event script can also control the various menus while they are currently running.

In depth details can be found in the Input / Menu System page on confluence, but post questions and discussion in this topic.
Last edited by N8M4R3 on Sun, 29. Dec 24, 00:15, edited 1 time in total.
Reason: Corrected the link so that it now leads to the correct subpage of the new wiki
Deniskos
Posts: 179
Joined: Wed, 11. Jun 08, 21:40
x4

Re: Input/Menu System

Post by Deniskos »

How to force exit the menu started from 'open menu script:' using a script command?
'Return null' doesn't help.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22466
Joined: Sun, 14. Nov 04, 23:26
x4

Re: Input/Menu System

Post by Cycrow »

it depends when and why you are trying to close the menu.

returning null should work if its in the middle of a new input. But it wont work for all events
Deniskos
Posts: 179
Joined: Wed, 11. Jun 08, 21:40
x4

Re: Input/Menu System

Post by Deniskos »

It is in events that I want to do this.
It would be nice to have something like 'kill menus' for this.
Deniskos
Posts: 179
Joined: Wed, 11. Jun 08, 21:40
x4

Re: Input/Menu System

Post by Deniskos »

The game has the following script commands:
this opens the info menu
Show

Code: Select all

$Input = create input: id = 'InfoMenu' object info page, object = $Dock
Image
this opens the command menu
Show

Code: Select all

$Input = create input: id = 'CommandMenu' open command console menu, object = $Dock
Image
is there a script command that opens the station parameters menu?
Show
Image
It is very convenient to enter various game menus without leaving a third-party menu.

Return to “X³: Farnham's Legacy - Scripts and Modding”