feedback_list_util¶
Source: base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl
Notes
A feedback strip that shows one timed message at a time (info, warning, error or a question with an accept button), used by the line and vehicle manager and the vehicle entity window.
FeedbackListUtil¶
record global base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:3
global record FeedbackListUtil
Load: local feedback_list_util = ug_require "::/gui/line_vehicle_mgmt/feedback_list_util.tl"
Notes
Feedback strip for short command results and confirmation questions; the recipe is FeedbackList.
Fields
| Name | Type | Description |
|---|---|---|
FeedbackList |
RecipeWithApi<FeedbackListParams, FeedBackViewerAPI> |
Recipe of the feedback strip; its node ref gives access to FeedBackViewerAPI. used 4× in the base game |
FeedbackListUtil.FeedbackDialogParam¶
record base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:4
record FeedbackDialogParam
Notes
Accept button of a Question or Info feedback message.
Used in the base game: 3 times in 3 files
base/content/gui/gui/line_vehicle_mgmt/feedback_list_util.tl:113
base/content/gui/gui/line_vehicle_mgmt/manager_window.tl:6361
base/content/gui/gui/entity_window/vehicle/vehicle.tl:306
Fields
| Name | Type | Description |
|---|---|---|
acceptText |
string |
Label of the accept button (e.g. _("Delete")). |
soundOnAccept |
SoundOnAccept |
Optional sound style of the accept button. |
Functions
onAccept() base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:10
Notes
Called when the accept button is clicked; the message is dismissed afterwards.
FeedbackListUtil.FeedbackDialogParam.SoundOnAccept¶
enum base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:5
enum SoundOnAccept
Notes
Sound style applied to the accept button.
Used in the base game: 1 time in 1 file
base/content/gui/gui/line_vehicle_mgmt/feedback_list_util.tl:56
| Value | Description |
|---|---|
"SellVehicle" |
Accept button gets the sell-vehicle-sfx style class (sell sound). |
"DeleteLine" |
Accept button gets the delete-line-sfx style class (delete-line sound). |
FeedbackListUtil.CommandFeedback¶
record base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:15
record CommandFeedback
Notes
One queued feedback message, as stored by FeedbackList.
Used in the base game: 2 times in 1 file
base/content/gui/gui/line_vehicle_mgmt/feedback_list_util.tl:10
Fields
| Name | Type | Description |
|---|---|---|
time |
number |
Application time (from api.util.getApplicationTime()) at which the message expires; set to 0 to dismiss it. |
message |
string |
Text shown to the player. |
mode |
Mode |
Kind of message. |
dialogData |
FeedbackDialogParam |
Accept button settings for Info and Question messages. |
timeout |
number |
Display duration in seconds (default 5). |
id |
number |
Optional id; adding a message with the id of a queued message replaces that message instead of queueing a new one. |
dismissible |
boolean |
If true, a Dismiss button (Cancel for questions) is shown. |
FeedbackListUtil.CommandFeedback.Mode¶
enum base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:16
enum Mode
Notes
Kind of message; selects the tape style and whether an accept button is shown.
Used in the base game: 1 time in 1 file
base/content/gui/gui/line_vehicle_mgmt/feedback_list_util.tl:112
FeedbackListUtil.FeedBackViewerAPI¶
record base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:31
record FeedBackViewerAPI
Notes
API of a FeedbackList node.
Used in the base game: 1 time in 1 file
base/content/gui/gui/line_vehicle_mgmt/feedback_list_util.tl:185
Functions
addFeedback(message : string, mode? : string, dialogData? : FeedbackDialogParam, timeout? : number, id? : number, dismissible? : boolean) base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:32
Notes
Queues a feedback message and plays LvmSFX.Feedback.
| Parameter | Type | Description |
|---|---|---|
message |
string |
Text to show. |
mode? |
string |
Info, Warning, Error or Question. Without a mode the message gets the warning style. |
dialogData? |
FeedbackDialogParam |
Accept button for Info and Question messages. |
timeout? |
number |
Display time in seconds; default 5. |
id? |
number |
Replaces a queued message with the same id instead of adding one. |
dismissible? |
boolean |
Shows a Dismiss / Cancel button. |
Details
Only the first queued message is displayed, with a +N counter for the rest.
Messages behind the first one have their expiry pushed back every frame, so each
message gets its full timeout once it becomes visible.
hasFeedback() : boolean base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:39
Notes
Tells whether any message is queued.
Returns boolean: True if at least one message is queued.
FeedbackListUtil.FeedbackListParams¶
record base/tealdef/gui/line_vehicle_mgmt/feedback_list_util.d.tl:42
record FeedbackListParams
Notes
Parameters of FeedbackList (none; pass {}).