API ReferenceGE Extensionsflowgraphnodesui
Generic Mission Text (Flowgraph Node)
- **Node Name:** `Generic Mission Text`
Overview
- Node Name:
Generic Mission Text - Category:
repeat_instant - File:
extensions/flowgraph/nodes/ui/genericMissionDataText.lua
Displays generic mission info (time, counters, etc.) in the in-game HUD via ui_apps_genericMissionData.
Pin Schema
Input Pins
| Pin | Type | Default | Description |
|---|---|---|---|
title | string | "missions.missions.general.time" | Title / label (hardcoded) |
txt | any | - | Text or numeric value to display |
icon | string | "info" | Icon identifier |
order | number | - | Display order (higher = rightmost) |
category | string | "flowgraph" | Category key; one message per category (hidden) |
style | string | "text" | Display mode: "text", "time", "timemillis" (hidden, hardcoded) |
clear | bool | - | If true, removes the info (hidden) |
Internals
Key Methods
| Method | Description |
|---|---|
postInit() | Sets up hard templates for style and title pins |
work() | Formats and sends data to ui_apps_genericMissionData.setData(), or clears it |
Style Formatting
| Style | Format | Example |
|---|---|---|
text | Raw value | "42" |
time | MM:SS | "01:30" |
timemillis | MM:SS.mmm | "01:30.456" |
When using time or timemillis styles, the txt input should be a number (seconds). The node formats it and also provides separate minutes, seconds, and milliseconds fields.
How It Works
- Each frame,
work()checks if there's data to display or ifclearis set. - If clearing, calls
clearData()orsetData({category, clear=true}). - Otherwise, builds a data table with title, text, category, style, order, and icon.
- For time styles, formats the numeric input into
MM:SSorMM:SS.mmm. - Sends data via
ui_apps_genericMissionData.setData(data). - Sets
mgr.modules.ui.genericMissionDataChanged = trueto notify the UI.
Usage Example
-- Display a timer in MM:SS format:
-- title = "missions.missions.general.time"
-- txt = 93.5 (seconds)
-- style = "time"
-- Result: "01:33"
-- Display arbitrary text:
-- title = "Score"
-- txt = "1500 pts"
-- style = "text"
-- Clear a category:
-- category = "flowgraph", clear = true
ui_apps_genericMissionData.clearData()Key Dependencies
ui_apps_genericMissionData.setData()- sends HUD dataui_apps_genericMissionData.clearData()- clears all HUD data
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide