Class: $.CustomIcon

Inherits:
WatchUi.Drawable show all

Overview

This is the custom Icon drawable. It fills the icon space with a color to demonstrate its extents. It changes color each time the next state is triggered, which is done when the item is selected in this application.

Constant Summary

Constant Variables

Type Name Value Since Description
Type _colorStrings ["Red","Orange","Yellow","Green","Blue","Violet"]
Type _colors [Graphics.COLOR_RED,Graphics.COLOR_ORANGE,Graphics.COLOR_YELLOW,Graphics.COLOR_GREEN,Graphics.COLOR_BLUE,Graphics.COLOR_PURPLE]

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _index as Lang.Number

Instance Method Details

draw(dc as Graphics.Dc) as Void

Set the color for the current state and use dc.clear() to fill the drawable area with that color

Parameters:

  • dc —

    Device Context

getString() as Lang.String

Return the color string for the menu to use as its sublabel

Returns:

  • The current color

initialize()

Constructor

nextState() as Lang.String

Advance to the next color state for the drawable

Returns:

  • The new color state


Generated Jun 9, 2026, 8:45:48 AM