docs(research): TpF3 mod tooling and structure, offline wiki/script-doc copies
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
0213e22d66
39 files changed
+66135
No files matched your search
@@ -0,0 +1,505 @@
|
||||
<!-- Source: https://wiki.transportfever3.com/script-doc/content/gui/main/script_param_util.html (fetched 2026-10-04) -->
|
||||
|
||||
[index](../../../index.html) / content / gui / main / script\_param\_util
|
||||
|
||||
---
|
||||
|
||||
# Module content.gui.main.script\_param\_util[🔗](#content.gui.main.script_param_util)
|
||||
|
||||
```
|
||||
[Expand All] [Collapse All]
|
||||
|
||||
global record ScriptParamUtil record ParamForUi enum IconStyle "Colored"
|
||||
"Default"
|
||||
end
|
||||
uiType: ScriptParamType
|
||||
iconStyle: IconStyle
|
||||
name: string
|
||||
values: {string}
|
||||
numbers: {number}
|
||||
tooltips: {string}
|
||||
defaultIndex: integer
|
||||
hideLabel: boolean
|
||||
allowCoalesce: boolean
|
||||
makeCompactButtonFn: function(number): TreeNodeId
|
||||
formatValueFn: function(number): string
|
||||
stepValueFn: function(number, integer, boolean): number
|
||||
end
|
||||
record CompSimpleParam scriptParam: ParamForUi
|
||||
currentValue: number
|
||||
onValueChange: function(number)
|
||||
toggleButtonsFlowLayout: boolean
|
||||
vertical: boolean
|
||||
compact: boolean
|
||||
addSpacer: boolean
|
||||
disableGamepadNavigation: boolean
|
||||
onHover: function(boolean)
|
||||
gameCtx: GameContext
|
||||
updateCurrentValue: boolean
|
||||
end
|
||||
buildScriptParamCompSimple: function(CompSimpleParam): TreeNodeId
|
||||
buildScriptParamComp: function(ScriptParam, integer, function(integer), boolean, boolean, function(boolean), boolean): TreeNodeId
|
||||
searchAndBuildScriptParamComp: function(string, function(string) : number, function(string, number), boolean, function(boolean), {string}, boolean): MenuIconReactUtil.HintWidgetParam.Data, TreeNodeId
|
||||
wrap: function(string, boolean, TreeNodeId, boolean, function(boolean), string): TreeNodeId
|
||||
getScriptParam: function(string, {string}): ScriptParam
|
||||
clampScriptParamToDiscreteValue: function(number, ScriptParam): number
|
||||
clampScriptParamValueIndex: function(number, ScriptParam): integer
|
||||
getScriptParamDefaultValue: function({number}, integer): number
|
||||
getScriptParamDefaultValueIndex: function({number}, integer): integer
|
||||
getScriptParamLabel: function(string, number, {string}): string
|
||||
getScriptParamLabelUnfiltered: function(string, number): string
|
||||
end
|
||||
```
|
||||
|
||||
## Category: globals[🔗](#category-globals)
|
||||
|
||||
### ScriptParamUtil[🔗](#$content.gui.main.script_param_util~ScriptParamUtil)
|
||||
|
||||
```
|
||||
[Expand All] [Collapse All]
|
||||
|
||||
global record ScriptParamUtil record ParamForUi enum IconStyle "Colored"
|
||||
"Default"
|
||||
end
|
||||
uiType: ScriptParamType
|
||||
iconStyle: IconStyle
|
||||
name: string
|
||||
values: {string}
|
||||
numbers: {number}
|
||||
tooltips: {string}
|
||||
defaultIndex: integer
|
||||
hideLabel: boolean
|
||||
allowCoalesce: boolean
|
||||
makeCompactButtonFn: function(number): TreeNodeId
|
||||
formatValueFn: function(number): string
|
||||
stepValueFn: function(number, integer, boolean): number
|
||||
end
|
||||
record CompSimpleParam scriptParam: ParamForUi
|
||||
currentValue: number
|
||||
onValueChange: function(number)
|
||||
toggleButtonsFlowLayout: boolean
|
||||
vertical: boolean
|
||||
compact: boolean
|
||||
addSpacer: boolean
|
||||
disableGamepadNavigation: boolean
|
||||
onHover: function(boolean)
|
||||
gameCtx: GameContext
|
||||
updateCurrentValue: boolean
|
||||
end
|
||||
buildScriptParamCompSimple: function(CompSimpleParam): TreeNodeId
|
||||
buildScriptParamComp: function(ScriptParam, integer, function(integer), boolean, boolean, function(boolean), boolean): TreeNodeId
|
||||
searchAndBuildScriptParamComp: function(string, function(string) : number, function(string, number), boolean, function(boolean), {string}, boolean): MenuIconReactUtil.HintWidgetParam.Data, TreeNodeId
|
||||
wrap: function(string, boolean, TreeNodeId, boolean, function(boolean), string): TreeNodeId
|
||||
getScriptParam: function(string, {string}): ScriptParam
|
||||
clampScriptParamToDiscreteValue: function(number, ScriptParam): number
|
||||
clampScriptParamValueIndex: function(number, ScriptParam): integer
|
||||
getScriptParamDefaultValue: function({number}, integer): number
|
||||
getScriptParamDefaultValueIndex: function({number}, integer): integer
|
||||
getScriptParamLabel: function(string, number, {string}): string
|
||||
getScriptParamLabelUnfiltered: function(string, number): string
|
||||
end
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi)
|
||||
|
||||
```
|
||||
[Expand All] [Collapse All]
|
||||
|
||||
record ScriptParamUtil.ParamForUi enum IconStyle "Colored"
|
||||
"Default"
|
||||
end
|
||||
uiType: ScriptParamType
|
||||
iconStyle: IconStyle
|
||||
name: string
|
||||
values: {string}
|
||||
numbers: {number}
|
||||
tooltips: {string}
|
||||
defaultIndex: integer
|
||||
hideLabel: boolean
|
||||
allowCoalesce: boolean
|
||||
makeCompactButtonFn: function(number): TreeNodeId
|
||||
formatValueFn: function(number): string
|
||||
stepValueFn: function(number, integer, boolean): number
|
||||
end
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.IconStyle[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.IconStyle)
|
||||
|
||||
```
|
||||
enum ScriptParamUtil.ParamForUi.IconStyle "Colored"
|
||||
"Default"
|
||||
end
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.IconStyle."Colored"[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.IconStyle.)
|
||||
|
||||
### ScriptParamUtil.ParamForUi.IconStyle."Default"[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.IconStyle.)
|
||||
|
||||
### ScriptParamUtil.ParamForUi.uiType[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.uiType)
|
||||
|
||||
```
|
||||
ScriptParamUtil.ParamForUi.uiType: ScriptParamType
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.iconStyle[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.iconStyle)
|
||||
|
||||
```
|
||||
ScriptParamUtil.ParamForUi.iconStyle: IconStyle
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.name[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.name)
|
||||
|
||||
```
|
||||
ScriptParamUtil.ParamForUi.name: string
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.values[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.values)
|
||||
|
||||
```
|
||||
ScriptParamUtil.ParamForUi.values: {string}
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.numbers[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.numbers)
|
||||
|
||||
```
|
||||
ScriptParamUtil.ParamForUi.numbers: {number}
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.tooltips[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.tooltips)
|
||||
|
||||
```
|
||||
ScriptParamUtil.ParamForUi.tooltips: {string}
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.defaultIndex[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.defaultIndex)
|
||||
|
||||
```
|
||||
ScriptParamUtil.ParamForUi.defaultIndex: integer
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.hideLabel[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.hideLabel)
|
||||
|
||||
```
|
||||
ScriptParamUtil.ParamForUi.hideLabel: boolean
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.allowCoalesce[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.allowCoalesce)
|
||||
|
||||
```
|
||||
ScriptParamUtil.ParamForUi.allowCoalesce: boolean
|
||||
```
|
||||
|
||||
### ScriptParamUtil.ParamForUi.makeCompactButtonFn[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.makeCompactButtonFn)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.ParamForUi.makeCompactButtonFn(number): TreeNodeId
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `number`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `TreeNodeId`
|
||||
|
||||
### ScriptParamUtil.ParamForUi.formatValueFn[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.formatValueFn)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.ParamForUi.formatValueFn(number): string
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `number`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `string`
|
||||
|
||||
### ScriptParamUtil.ParamForUi.stepValueFn[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.ParamForUi.stepValueFn)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.ParamForUi.stepValueFn(number, integer, boolean): number
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `number`
|
||||
* `integer`
|
||||
* `boolean`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `number`
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam)
|
||||
|
||||
```
|
||||
record ScriptParamUtil.CompSimpleParam scriptParam: ParamForUi
|
||||
currentValue: number
|
||||
onValueChange: function(number)
|
||||
toggleButtonsFlowLayout: boolean
|
||||
vertical: boolean
|
||||
compact: boolean
|
||||
addSpacer: boolean
|
||||
disableGamepadNavigation: boolean
|
||||
onHover: function(boolean)
|
||||
gameCtx: GameContext
|
||||
updateCurrentValue: boolean
|
||||
end
|
||||
```
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.scriptParam[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.scriptParam)
|
||||
|
||||
```
|
||||
ScriptParamUtil.CompSimpleParam.scriptParam: ParamForUi
|
||||
```
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.currentValue[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.currentValue)
|
||||
|
||||
```
|
||||
ScriptParamUtil.CompSimpleParam.currentValue: number
|
||||
```
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.onValueChange[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.onValueChange)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.CompSimpleParam.onValueChange(number)
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `number`
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.toggleButtonsFlowLayout[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.toggleButtonsFlowLayout)
|
||||
|
||||
```
|
||||
ScriptParamUtil.CompSimpleParam.toggleButtonsFlowLayout: boolean
|
||||
```
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.vertical[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.vertical)
|
||||
|
||||
```
|
||||
ScriptParamUtil.CompSimpleParam.vertical: boolean
|
||||
```
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.compact[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.compact)
|
||||
|
||||
```
|
||||
ScriptParamUtil.CompSimpleParam.compact: boolean
|
||||
```
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.addSpacer[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.addSpacer)
|
||||
|
||||
```
|
||||
ScriptParamUtil.CompSimpleParam.addSpacer: boolean
|
||||
```
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.disableGamepadNavigation[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.disableGamepadNavigation)
|
||||
|
||||
```
|
||||
ScriptParamUtil.CompSimpleParam.disableGamepadNavigation: boolean
|
||||
```
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.onHover[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.onHover)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.CompSimpleParam.onHover(boolean)
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `boolean`
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.gameCtx[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.gameCtx)
|
||||
|
||||
```
|
||||
ScriptParamUtil.CompSimpleParam.gameCtx: GameContext
|
||||
```
|
||||
|
||||
### ScriptParamUtil.CompSimpleParam.updateCurrentValue[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.CompSimpleParam.updateCurrentValue)
|
||||
|
||||
```
|
||||
ScriptParamUtil.CompSimpleParam.updateCurrentValue: boolean
|
||||
```
|
||||
|
||||
### ScriptParamUtil.buildScriptParamCompSimple[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.buildScriptParamCompSimple)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.buildScriptParamCompSimple(CompSimpleParam): TreeNodeId
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `CompSimpleParam`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `TreeNodeId`
|
||||
|
||||
### ScriptParamUtil.buildScriptParamComp[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.buildScriptParamComp)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.buildScriptParamComp(ScriptParam, integer, function(integer), boolean, boolean, function(boolean), boolean): TreeNodeId
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `ScriptParam`
|
||||
* `integer`
|
||||
* `function(integer)`
|
||||
* `boolean`
|
||||
* `boolean`
|
||||
* `function(boolean)`
|
||||
* `boolean`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `TreeNodeId`
|
||||
|
||||
### ScriptParamUtil.searchAndBuildScriptParamComp[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.searchAndBuildScriptParamComp)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.searchAndBuildScriptParamComp(string, function(string) : number, function(string, number), boolean, function(boolean), {string}, boolean): MenuIconReactUtil.HintWidgetParam.Data, TreeNodeId
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `string`
|
||||
* `function(string): number`
|
||||
* `function(string, number)`
|
||||
* `boolean`
|
||||
* `function(boolean)`
|
||||
* `{string}`
|
||||
* `boolean`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `MenuIconReactUtil.HintWidgetParam.Data`
|
||||
2. `TreeNodeId`
|
||||
|
||||
### ScriptParamUtil.wrap[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.wrap)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.wrap(string, boolean, TreeNodeId, boolean, function(boolean), string): TreeNodeId
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `string`
|
||||
* `boolean`
|
||||
* `TreeNodeId`
|
||||
* `boolean`
|
||||
* `function(boolean)`
|
||||
* `string`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `TreeNodeId`
|
||||
|
||||
### ScriptParamUtil.getScriptParam[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.getScriptParam)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.getScriptParam(string, {string}): ScriptParam
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `string`
|
||||
* `{string}`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `ScriptParam`
|
||||
|
||||
### ScriptParamUtil.clampScriptParamToDiscreteValue[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.clampScriptParamToDiscreteValue)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.clampScriptParamToDiscreteValue(number, ScriptParam): number
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `number`
|
||||
* `ScriptParam`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `number`
|
||||
|
||||
### ScriptParamUtil.clampScriptParamValueIndex[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.clampScriptParamValueIndex)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.clampScriptParamValueIndex(number, ScriptParam): integer
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `number`
|
||||
* `ScriptParam`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `integer`
|
||||
|
||||
### ScriptParamUtil.getScriptParamDefaultValue[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.getScriptParamDefaultValue)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.getScriptParamDefaultValue({number}, integer): number
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `{number}`
|
||||
* `integer`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `number`
|
||||
|
||||
### ScriptParamUtil.getScriptParamDefaultValueIndex[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.getScriptParamDefaultValueIndex)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.getScriptParamDefaultValueIndex({number}, integer): integer
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `{number}`
|
||||
* `integer`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `integer`
|
||||
|
||||
### ScriptParamUtil.getScriptParamLabel[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.getScriptParamLabel)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.getScriptParamLabel(string, number, {string}): string
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `string`
|
||||
* `number`
|
||||
* `{string}`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `string`
|
||||
|
||||
### ScriptParamUtil.getScriptParamLabelUnfiltered[🔗](#$content.gui.main.script_param_util~ScriptParamUtil.getScriptParamLabelUnfiltered)
|
||||
|
||||
```
|
||||
function ScriptParamUtil.getScriptParamLabelUnfiltered(string, number): string
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
* `string`
|
||||
* `number`
|
||||
|
||||
**Returns**
|
||||
|
||||
1. `string`
|
||||
Reference in new issue
Block a user