Class: Toybox::Media::CustomButton

Inherits:
Lang::Object show all

Overview

A CustomButton allows for a media player action other than one of the PLAYBACK_CONTROL_* actions. When a CustomButton is pressed in the media player the ContentDelegate.onCustomButton(button) function is called with the pressed button as a parameter.

Since:

  • 3.0.3

Instance Method Summary collapse

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Instance Method Details

getImage(image, highlighted) ⇒ Toybox::WatchUi::BitmapResource

Called by the system to draw the button in the Media Player

Parameters:

Returns:

Since:

  • 3.0.3


7653
7654
# File 'Monkeybrains.rb', line 7653

def getImage(image, highlighted)
end

getStateToybox::Lang::Number

Called by the system to determine if the current state of the button

Returns:

  • (Toybox::Lang::Number)

    A BUTTON_STATE_* enum value representing the current state of the button

Since:

  • 3.0.3


7659
7660
# File 'Monkeybrains.rb', line 7659

def getState()
end

getText(state) ⇒ Toybox::Lang::String

Called by the system to draw the name of the button

Parameters:

  • state (Toybox::Lang::Number)

    A BUTTON_STATE_* value indicating the current state of the button

Returns:

Since:

  • 3.0.3


7666
7667
# File 'Monkeybrains.rb', line 7666

def getText(state)
end