Class: $.CustomIcon
- Inherits:
-
WatchUi.Drawable
-
WatchUi.Drawable
-
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
- _index as Lang.Number
Instance Method Summary collapse
-
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.
-
getString() as Lang.String
Return the color string for the menu to use as its sublabel.
-
initialize()
Constructor.
-
nextState() as Lang.String
Advance to the next color state for the drawable.
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
getString() as Lang.String
Return the color string for the menu to use as its sublabel
initialize()
Constructor
nextState() as Lang.String
Advance to the next color state for the drawable