TftBatterySet()

Library Description ›› Shapes ›› Shapes ››
Parent Previous Next

Syntax

TftBatterySet(bPercent As Byte)

Parameters

bPercent — new charge level, 0-100


Efficiently updates an already-drawn TftBatteryIcon()'s fill level


Efficiently updates an already-drawn TftBatteryIcon()'s fill level,redrawing only the changed portion of the fill bar - not the outline, terminal, or unchanged fill area.
Reads the icon's geometry and colors directly from TftBatteryIcon()'s own last-used parameters.


Requires TftBatteryIcon() to have been called at least once first (with pClearInside=1, so the interior is genuinely wBackColor wherever it isn't filled) - this function has no way to detect that on its own, so calling it before any TftBatteryIcon() call will draw against garbage/uninitialized geometry.

Example

TftSetUp(0, 0)

TftResetScreen(BLACK)

TftBatteryIcon(90,100,220,130,10,BRONZE,BLUE,1,0x9D19)

DelayMS 1000

TftBatterySet(30)

DelayMS 1000

TftBatterySet(70)

DelayMS 1000

TftBatterySet(50)

DelayMS 1000

TftBatterySet(20)


Created with the Personal Edition of HelpNDoc: Easily create Qt Help files