JsonWidget

Values:

  • name [ string ]
    • Get: (Client-Only) Get the name of the jsonWidget.

Operations:

Operation Returns Description
JsonWidget == JsonWidget boolean Checks if two instances of JsonWidget refer to the same JsonWidget.

Client-only

getEffect

jsonWidget:getEffect( name )

Gets an effect from a widget.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
name string The name of the effect on the json widget to get.

Returns:

Type Description
Effect The effect.

getUserString

jsonWidget:getUserString( key )

Gets a string associated with the given key from a json widget.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
key string The key connected to the value.

Returns:

Name Type Description
value string The value associated with the key.

isEffectDone

jsonWidget:isEffectDone( name )

Returns if a named effect is done or not.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
name string The name of the effect.

Returns:

Type Description
boolean True if the effect is done, false otherwise.

isEffectPlaying

jsonWidget:isEffectPlaying( name )

Returns if a named effect is playing or not.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
name string The name of the effect.

Returns:

Type Description
boolean True if the effect is playing, false otherwise.

setPosition

jsonWidget:setPosition( x, y )

Sets the position of the widget. This will not change the json data position.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
x integer The x position.
y integer The y position.

setPreview - uuid

jsonWidget:setPreview( uuid )

Sets the item preview uuid for a json widget. Passing nil clears the preview.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
uuid uuid The item uuid.

setPreview - string

jsonWidget:setPreview( string )

Sets the blueprint preview path for a json widget. Passing nil clears the preview.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
string string The blueprint path.

setPreview - no arguments

jsonWidget:setPreview(  )

setUserString

jsonWidget:setUserString( key, value )

Sets a custom string on a json widget that can be fetched using the key.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
key string The key connected to the value.
value string The value being written onto the widget.

setVisible

jsonWidget:setVisible( stopImmediate )

Sets the visibility of a widget.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
stopImmediate boolean The widgets new visibility state.

startEffect

jsonWidget:startEffect( name )

Starts the effect applied to the widget.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
name string The name of the effect on the json widget to start.

stopEffect

jsonWidget:stopEffect( name, stopImmediate )

Stops the effect applied to the widget.

Parameters:

Name Type Description
jsonWidget JsonWidget The JsonWidget.
name string The name of the effect to stop.
stopImmediate (optional) boolean If the effect should stop immediately. (Optional) (Defaults to false)