mission_framework_react_util¶
Source: base/tealdef/mission/mission_framework/mission_framework_react_util.d.tl
Notes
GUI building blocks of the mission window (task progress, option buttons, instruction buttons, links).
MissionFrameworkReactUtil¶
record global base/tealdef/mission/mission_framework/mission_framework_react_util.d.tl:3
global record MissionFrameworkReactUtil
Load: local mission_framework_react_util = ug_require "/mission/mission_framework/mission_framework_react_util.tl"
Notes
GUI building blocks of the mission window.
Fields
| Name | Type | Description |
|---|---|---|
MissionTaskOptionButtons |
Recipe<MissionTaskOptionButtonsParam> |
Recipe that shows option buttons; clicking sends a Decision event with the option key to the task. used 1× in the base game |
MissionTaskProgress |
Recipe2<MissionInterface.TaskInfo, boolean> |
Recipe that shows a task's progress and sub-task progress, optionally with its name. used 2× in the base game |
MissionTaskInstructionsOverlayButton |
Recipe<MissionTaskInstructionsOverlayButtonParam> |
Recipe of the portrait button that plays or stops a task's instruction. used 2× in the base game |
Functions
makeTaskProgressItem(progress : MissionInterface.TaskProgressData) : TreeNodeId base/tealdef/mission/mission_framework/mission_framework_react_util.d.tl:4
Call as mission_framework_react_util.makeTaskProgressItem
Notes
Builds the GUI node that shows one progress entry (see MissionInterface.TaskProgressData for the forms).
| Parameter | Type | Description |
|---|---|---|
progress |
MissionInterface.TaskProgressData |
Progress to show. |
Returns TreeNodeId: GUI node, or nil if nothing applies.
followLink(link : MissionInterface.TaskInfo.LinkDef) base/tealdef/mission/mission_framework/mission_framework_react_util.d.tl:5
Call as mission_framework_react_util.followLink
Notes
Moves the camera to a link's entity or area.
| Parameter | Type | Description |
|---|---|---|
link |
MissionInterface.TaskInfo.LinkDef |
Link to follow. |
handleLinkClick(taskInfo : MissionInterface.TaskInfo, target : string) base/tealdef/mission/mission_framework/mission_framework_react_util.d.tl:6
Call as mission_framework_react_util.handleLinkClick
Notes
Follows the link with the given key of a task info.
| Parameter | Type | Description |
|---|---|---|
taskInfo |
MissionInterface.TaskInfo |
Task info with links. |
target |
string |
Link key clicked in a paragraph text. |
fixParagraphsForInputMode(original : MissionInterface.TaskInfo) : MissionInterface.TaskInfo base/tealdef/mission/mission_framework/mission_framework_react_util.d.tl:7
Call as mission_framework_react_util.fixParagraphsForInputMode
Notes
Replaces paragraphs that only have textMouse / textGamepad with the text for the current input mode.
| Parameter | Type | Description |
|---|---|---|
original |
MissionInterface.TaskInfo |
Task info. |
Returns MissionInterface.TaskInfo: The task info, copied if a paragraph changed.
MissionFrameworkReactUtil.MissionTaskOptionButtonsParam¶
record base/tealdef/mission/mission_framework/mission_framework_react_util.d.tl:9
record MissionTaskOptionButtonsParam
Notes
Params of the option-button recipe.
Used in the base game: 1 time in 1 file
base/content/mission/mission/mission_framework/mission_framework_react_util.tl:313
Fields
| Name | Type | Description |
|---|---|---|
taskUid |
string |
Task that receives the Decision event. |
options |
{MissionInterface.TaskInfo.Option} |
Options to show. |
Functions
onSelectOption(option : MissionInterface.TaskInfo.Option) base/tealdef/mission/mission_framework/mission_framework_react_util.d.tl:12
Notes
Called after an option was clicked.
MissionFrameworkReactUtil.MissionTaskInstructionsOverlayButtonParam¶
record base/tealdef/mission/mission_framework/mission_framework_react_util.d.tl:17
record MissionTaskInstructionsOverlayButtonParam is IRecipeParamWithMeta
Notes
Params of the instruction (voice-over) button.
Used in the base game: 2 times in 2 files
base/content/mission/mission/mission_framework/mission_framework_react_util.tl:347
mission_framework_react_util.MissionTaskInstructionsOverlayButton = react.RegisterRecipe("MissionTaskInstructionsOverlayButton", function(param : MissionFramewo
base/content/mission/mission/mission_framework/mission_framework_react.tl:235
Fields
| Name | Type | Description |
|---|---|---|
gameCtx |
GameContext |
Game context (gives access to the dialogue overlay). |
taskUid |
string |
Task the instruction belongs to. |
instructionData |
MissionDialogueData.InstructionData |
Instruction to play. |
paragraph |
MissionInterface.TaskInfo.Paragraph |
Paragraph shown next to the button. |
taskInfo |
MissionInterface.TaskInfo |
Task info used to resolve paragraph links. |
autoPlay |
boolean |
Starts the instruction when the button appears. |
isTaskComplete |
boolean |
Disables paragraph links for completed tasks. |