Class: $.PageIndicator

Inherits:
Toybox.Lang.Object show all

Overview

Draws a graphic indicating which page the user is currently on

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _alignment as $.Align

var _margin as Lang.Number

var _notSelectedColor as Graphics.ColorType

var _selectedColor as Graphics.ColorType

var _size as Lang.Number

Instance Method Details

draw(dc as Graphics.Dc, selectedIndex as Lang.Number) as Void

Draw the graphic

Parameters:

  • dc

    Device context

  • selectedIndex

    The index of the current page

initialize(size as Lang.Number, selectedColor as Graphics.ColorValue, notSelectedColor as Graphics.ColorValue, alignment as $.Align, margin as Lang.Number)

Constructor

Parameters:

  • size

    Number of pages

  • selectedColor

    Color to use for the selected page

  • notSelectedColor

    Color to use for non-selected pages

  • alignment

    How to align the graphic

  • margin

    Amount of margin for the graphic


Generated Apr 17, 2024, 8:05:14 AM