Nonstop Brightscript SDK

Points Widget

How to Use

Include via XML:

<NonstopPointsWidget
    id="pointsWidget"
    visible="true"
    translation="[1700,965]"/>

Customize in Brightscript:

    m.pointsWidget = m.top.findNode("pointsWidget")
    m.pointsWidget.canBeDisabled = false
    m.pointsWidget.roundingStyle = "both"
    m.pointsWidget.dropdownAlignment = "top"

Note that all of these properties are optional. See below for details.

Additional Attributes

  • canBeDisabled - (Default value: true) Determines whether the widget will change appearance when the user exceeds their points limit for the day. This should be set to false in the app's menu.
  • dropdownEnabled - (Default value: true) Determines whether the dropdown will appear when the user exceeds their points limit for the day.
  • roundingStyle - (Default value: "both") Can be set to "left", "right" or "both". Determines which sides of the widget are rounded.
  • dropdownAlignment - (Default value: "bottom") Can be set to "top", "left", "right" or "bottom". Determines where the dropdown message is displayed relative to the widget. In general, this should either be "bottom" for center aligned widgets or "left" for left aligned widgets.

Methods

showMessage

This can be used to force the widget to reshow the most recently received message. Note that calling this when there is no message to show will do nothing. Also note that if the widget has dropdownEnabled set to false this method will do nothing.

Example:

    m.pointsWidget = m.top.findNode("pointsWidget")
    m.pointsWidget.showMessage()
In this document