-
Notifications
You must be signed in to change notification settings - Fork 4
LCARS Basic Interface
The Basic LCARS Interface is a LCARS Style menu, that displays a number of buttons to the user. If any of buttons are pressed it toggles an FireUser[I] command with I being the number of the button. It the closes the menu, ready to be used again.
It can be used by mapper, by calling the function:
Star_Trek.LCARS:OpenMenu()
from lua_run entity trigered by a button in the map.
The menu will appear on the button's origin with it's movedir used for rotation.
You can figure the button with custom keyvalues as follows:
-
lcars_width, lcars_height: Determine the width and height of the generated menu. If not provided the height will be generated automatically, to fit all buttons.
-
lcars_scale: Determine the resolution of the menu given in pixels/unit
-
lcars_title: Determine the title of the opened menu.
-
lcars_title_short: Determine the short title of the opened menu displayed on the side of the frame.
-
lcars_button_name_[I]: Determines the name of button number I that will placed on the menu. If a button is given a name it is displayed. If no name is given no button will be created.
-
lcars_button_disabled_[I]: Determines if the button with number I will be currently useable or if he should be disabled.
-
lcars_button_color_[I]: Determines the color of the button. This uses an enum system. Possible values can found in the config of the lcars module in: /lua/star_trek/lcars/resources/sh_colors.lua as the keys of the Star_Trek.LCARS.Colors table.
-
lcars_linked_case: Gives the name of an logic_case entity, that can be optionally provided, to expand the number of possible outputs. If a button is pressed, the menu fires the InValue input of the given entity with the number of the button being its parameter.
-
lcars_keep_open: If set, the menu will stay open, when a button is pressed. It will also make a beeping sound instead of a closing sound.
The Text and "disabled state" of a button can be changed dynamically while the menu is open and will update properly. All other changes will require the menu to be closed and opened again.