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

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

Input/Menu System

Post by Cycrow » Fri, 9. Apr 21, 21:27

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.

Deniskos
Posts: 146
Joined: Wed, 11. Jun 08, 21:40
x4

Re: Input/Menu System

Post by Deniskos » Sun, 14. Nov 21, 06:04

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: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Re: Input/Menu System

Post by Cycrow » Sun, 14. Nov 21, 10:41

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: 146
Joined: Wed, 11. Jun 08, 21:40
x4

Re: Input/Menu System

Post by Deniskos » Sun, 14. Nov 21, 11:35

It is in events that I want to do this.
It would be nice to have something like 'kill menus' for this.

Deniskos
Posts: 146
Joined: Wed, 11. Jun 08, 21:40
x4

Re: Input/Menu System

Post by Deniskos » Sat, 20. Nov 21, 12:22

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.

Post Reply

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