Files
tpf3-overtake/docs/reference/script-doc/content_gui_main_script_param_util.md
T

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

  1. TreeNodeId

ScriptParamUtil.ParamForUi.formatValueFn🔗

function ScriptParamUtil.ParamForUi.formatValueFn(number): string

Parameters

  • number

Returns

  1. string

ScriptParamUtil.ParamForUi.stepValueFn🔗

function ScriptParamUtil.ParamForUi.stepValueFn(number, integer, boolean): number

Parameters

  • number
  • integer
  • boolean

Returns

  1. 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

  1. TreeNodeId

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🔗

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🔗

function ScriptParamUtil.wrap(string, boolean, TreeNodeId, boolean, function(boolean), string): TreeNodeId

Parameters

  • string
  • boolean
  • TreeNodeId
  • boolean
  • function(boolean)
  • string

Returns

  1. TreeNodeId

ScriptParamUtil.getScriptParam🔗

function ScriptParamUtil.getScriptParam(string, {string}): ScriptParam

Parameters

  • string
  • {string}

Returns

  1. ScriptParam

ScriptParamUtil.clampScriptParamToDiscreteValue🔗

function ScriptParamUtil.clampScriptParamToDiscreteValue(number, ScriptParam): number

Parameters

  • number
  • ScriptParam

Returns

  1. number

ScriptParamUtil.clampScriptParamValueIndex🔗

function ScriptParamUtil.clampScriptParamValueIndex(number, ScriptParam): integer

Parameters

  • number
  • ScriptParam

Returns

  1. integer

ScriptParamUtil.getScriptParamDefaultValue🔗

function ScriptParamUtil.getScriptParamDefaultValue({number}, integer): number

Parameters

  • {number}
  • integer

Returns

  1. number

ScriptParamUtil.getScriptParamDefaultValueIndex🔗

function ScriptParamUtil.getScriptParamDefaultValueIndex({number}, integer): integer

Parameters

  • {number}
  • integer

Returns

  1. integer

ScriptParamUtil.getScriptParamLabel🔗

function ScriptParamUtil.getScriptParamLabel(string, number, {string}): string

Parameters

  • string
  • number
  • {string}

Returns

  1. string

ScriptParamUtil.getScriptParamLabelUnfiltered🔗

function ScriptParamUtil.getScriptParamLabelUnfiltered(string, number): string

Parameters

  • string
  • number

Returns

  1. string