OnDynamicMenuListItemChanged

From GT-MP
Jump to: navigation, search
OnDynamicMenuListItemChanged
Client-Side Function
System-users.png Client-Side Javascript.png JavaScript

This event triggers when a DynamiListItem changes.

Dialog-warning.png API.onDynamicMenuListItemChanged() will be removed in version 0.1.7, see Deprecated.

Syntax

API.onDynamicMenuListItemChanged.connect(function (UIMenuDynamicListItem sender, UIMenuDynamicListItem.ChangeDirection direction));

Required Arguments

  • sender: parameter input should be in UIMenuDynamicListItem type.
  • direction: parameter input should be in UIMenuDynamicListItem.ChangeDirection type. (Possible change directions are "Left" and "Right")

Usage example

API.onDynamicMenuListItemChanged.connect(function (sender, direction) {
    // Do something.
    API.sendNotification('Direction ' + direction);
})

References