Skip to content

Latest commit

 

History

History
306 lines (194 loc) · 11.3 KB

File metadata and controls

306 lines (194 loc) · 11.3 KB

Latite Scripting Documentation (Exports)


Exports > feature/module > Module

Module

Class

Source: feature/module.d.ts:34

Hierarchy

Constructors

constructor()

new Module( name: string, displayName: string, description: string, key: KeyCode): Module

Source: feature/module.d.ts:60

Parameters

Parameter Type Description
name string The internal name of the module.
displayName string The display name of the module. Shown in the ClickGUI.
description string A short description of what the module does.
key KeyCode The default keybind to activate the module.

Returns

Module

Properties

description

readonly description: string

Source: feature/module.d.ts:37

displayName

readonly displayName: string

Source: feature/module.d.ts:36

id

readonly id: number

IDs for script modules are always 255.

Source: feature/module.d.ts:43

key

readonly key: KeyCode

Source: feature/module.d.ts:38

name

readonly name: string

Source: feature/module.d.ts:35

on

on: Function

Source: feature/module.d.ts:62

Type declaration (on)

<K>(eventName: K, handler: ModuleEvents[K]): void

Source: feature/module.d.ts:62

Type parameters
Parameter
K extends keyof ModuleEvents
Parameters
Parameter Type
eventName K
handler ModuleEvents[K]
Returns

void

visible

readonly visible: boolean

If the module is visible in the ClickGui

Source: feature/module.d.ts:51

visual

readonly visual: boolean

If the module is a HUD module (that you can move in the hud editor)

Source: feature/module.d.ts:47

Methods

addBoolSetting()

addBoolSetting( name: string, displayName: string, description: string, defVal: boolean): Setting

Adds a setting.

Source: feature/module.d.ts:92

Parameters

Parameter Type Description
name string The internal name
displayName string The name that shows in the menu
description string A short description of what the setting does
defVal boolean The default value

Returns

Setting

addColorSetting()

addColorSetting( name: string, displayName: string, description: string, defVal: Color): Setting

Adds a setting.

Parameters

Parameter Type Description
name string The internal name
*
displayName string The name that shows in the menu
*
description string A short description of what the setting does
*
defVal Color The default value

Returns

Setting

addKeySetting()

addKeySetting( name: string, displayName: string, description: string, defVal: KeyCode): Setting

Adds a setting.

Parameters

Parameter Type Description
name string The internal name
*
displayName string The name that shows in the menu
*
description string A short description of what the setting does
*
defVal KeyCode The default value

Returns

Setting

addNumberSetting()

addNumberSetting( name: string, displayName: string, description: string, min: number, max: number, interval: number, defVal: number): Setting

Adds a setting.

Source: feature/module.d.ts:104

Parameters

Parameter Type Description
name string The internal name
displayName string The name that shows in the menu
description string A short description of what the setting does
min number The minimum value
max number The maximum value
interval number The precision of the setting
defVal number The default value

Returns

Setting

addTextSetting()

addTextSetting( name: string, displayName: string, description: string, defVal: string): Setting

Adds a setting.

Parameters

Parameter Type Description
name string The internal name
*
displayName string The name that shows in the menu
*
description string A short description of what the setting does
*
defVal string The default value

Returns

Setting

getSettings()

getSettings(): Setting[]

Gets the settings of the module.

Source: feature/module.d.ts:83

Returns

Setting[]

isBlocked()

isBlocked(): boolean

Check if the module is blocked.

Source: feature/module.d.ts:78

Returns

boolean

isEnabled()

isEnabled(): boolean

Checks if the module is enabled.

Source: feature/module.d.ts:67

Returns

boolean

setEnabled()

setEnabled(b: boolean): void

Set the module to be enabled or not.

Source: feature/module.d.ts:73

Parameters

Parameter Type Description
b boolean The new status of the module.

Returns

void