14 KiB
14 KiB
index / content / gui / main / script_param_util
Module 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🔗
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🔗
[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🔗
enum ScriptParamUtil.ParamForUi.IconStyle "Colored"
"Default"
end
ScriptParamUtil.ParamForUi.IconStyle."Colored"🔗
ScriptParamUtil.ParamForUi.IconStyle."Default"🔗
ScriptParamUtil.ParamForUi.uiType🔗
ScriptParamUtil.ParamForUi.uiType: ScriptParamType
ScriptParamUtil.ParamForUi.iconStyle🔗
ScriptParamUtil.ParamForUi.iconStyle: IconStyle
ScriptParamUtil.ParamForUi.name🔗
ScriptParamUtil.ParamForUi.name: string
ScriptParamUtil.ParamForUi.values🔗
ScriptParamUtil.ParamForUi.values: {string}
ScriptParamUtil.ParamForUi.numbers🔗
ScriptParamUtil.ParamForUi.numbers: {number}
ScriptParamUtil.ParamForUi.tooltips🔗
ScriptParamUtil.ParamForUi.tooltips: {string}
ScriptParamUtil.ParamForUi.defaultIndex🔗
ScriptParamUtil.ParamForUi.defaultIndex: integer
ScriptParamUtil.ParamForUi.hideLabel🔗
ScriptParamUtil.ParamForUi.hideLabel: boolean
ScriptParamUtil.ParamForUi.allowCoalesce🔗
ScriptParamUtil.ParamForUi.allowCoalesce: boolean
ScriptParamUtil.ParamForUi.makeCompactButtonFn🔗
function ScriptParamUtil.ParamForUi.makeCompactButtonFn(number): TreeNodeId
Parameters
number
Returns
TreeNodeId
ScriptParamUtil.ParamForUi.formatValueFn🔗
function ScriptParamUtil.ParamForUi.formatValueFn(number): string
Parameters
number
Returns
string
ScriptParamUtil.ParamForUi.stepValueFn🔗
function ScriptParamUtil.ParamForUi.stepValueFn(number, integer, boolean): number
Parameters
numberintegerboolean
Returns
number
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🔗
ScriptParamUtil.CompSimpleParam.scriptParam: ParamForUi
ScriptParamUtil.CompSimpleParam.currentValue🔗
ScriptParamUtil.CompSimpleParam.currentValue: number
ScriptParamUtil.CompSimpleParam.onValueChange🔗
function ScriptParamUtil.CompSimpleParam.onValueChange(number)
Parameters
number
ScriptParamUtil.CompSimpleParam.toggleButtonsFlowLayout🔗
ScriptParamUtil.CompSimpleParam.toggleButtonsFlowLayout: boolean
ScriptParamUtil.CompSimpleParam.vertical🔗
ScriptParamUtil.CompSimpleParam.vertical: boolean
ScriptParamUtil.CompSimpleParam.compact🔗
ScriptParamUtil.CompSimpleParam.compact: boolean
ScriptParamUtil.CompSimpleParam.addSpacer🔗
ScriptParamUtil.CompSimpleParam.addSpacer: boolean
ScriptParamUtil.CompSimpleParam.disableGamepadNavigation🔗
ScriptParamUtil.CompSimpleParam.disableGamepadNavigation: boolean
ScriptParamUtil.CompSimpleParam.onHover🔗
function ScriptParamUtil.CompSimpleParam.onHover(boolean)
Parameters
boolean
ScriptParamUtil.CompSimpleParam.gameCtx🔗
ScriptParamUtil.CompSimpleParam.gameCtx: GameContext
ScriptParamUtil.CompSimpleParam.updateCurrentValue🔗
ScriptParamUtil.CompSimpleParam.updateCurrentValue: boolean
ScriptParamUtil.buildScriptParamCompSimple🔗
function ScriptParamUtil.buildScriptParamCompSimple(CompSimpleParam): TreeNodeId
Parameters
CompSimpleParam
Returns
TreeNodeId
ScriptParamUtil.buildScriptParamComp🔗
function ScriptParamUtil.buildScriptParamComp(ScriptParam, integer, function(integer), boolean, boolean, function(boolean), boolean): TreeNodeId
Parameters
ScriptParamintegerfunction(integer)booleanbooleanfunction(boolean)boolean
Returns
TreeNodeId
ScriptParamUtil.searchAndBuildScriptParamComp🔗
function ScriptParamUtil.searchAndBuildScriptParamComp(string, function(string) : number, function(string, number), boolean, function(boolean), {string}, boolean): MenuIconReactUtil.HintWidgetParam.Data, TreeNodeId
Parameters
stringfunction(string): numberfunction(string, number)booleanfunction(boolean){string}boolean
Returns
MenuIconReactUtil.HintWidgetParam.DataTreeNodeId
ScriptParamUtil.wrap🔗
function ScriptParamUtil.wrap(string, boolean, TreeNodeId, boolean, function(boolean), string): TreeNodeId
Parameters
stringbooleanTreeNodeIdbooleanfunction(boolean)string
Returns
TreeNodeId
ScriptParamUtil.getScriptParam🔗
function ScriptParamUtil.getScriptParam(string, {string}): ScriptParam
Parameters
string{string}
Returns
ScriptParam
ScriptParamUtil.clampScriptParamToDiscreteValue🔗
function ScriptParamUtil.clampScriptParamToDiscreteValue(number, ScriptParam): number
Parameters
numberScriptParam
Returns
number
ScriptParamUtil.clampScriptParamValueIndex🔗
function ScriptParamUtil.clampScriptParamValueIndex(number, ScriptParam): integer
Parameters
numberScriptParam
Returns
integer
ScriptParamUtil.getScriptParamDefaultValue🔗
function ScriptParamUtil.getScriptParamDefaultValue({number}, integer): number
Parameters
{number}integer
Returns
number
ScriptParamUtil.getScriptParamDefaultValueIndex🔗
function ScriptParamUtil.getScriptParamDefaultValueIndex({number}, integer): integer
Parameters
{number}integer
Returns
integer
ScriptParamUtil.getScriptParamLabel🔗
function ScriptParamUtil.getScriptParamLabel(string, number, {string}): string
Parameters
stringnumber{string}
Returns
string
ScriptParamUtil.getScriptParamLabelUnfiltered🔗
function ScriptParamUtil.getScriptParamLabelUnfiltered(string, number): string
Parameters
stringnumber
Returns
string