CmdKeys

From MCS Wiki AVR
Revision as of 18:57, 12 December 2014 by Admin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Action

draw a row of keys.

 

 

Syntax

CmdKeys x, y, w ,h, font, options, char

 

 

Remarks

x

x-coordinate of keys top-left, in pixels

y

y-coordinate of keys top-left, in pixels

w

The width of the keys

h

The height of the keys

font

Bitmap handle to specify the font used in key label. The valid range is from 0 to 31

options

By default the keys are drawn with a 3D effect and the value of option is zero.

OPT_FLAT removes the 3D effect. If OPT_CENTER is given the keys are drawn at minimum size centered within the w  x h rectangle. Otherwise the keys are expanded so that they completely fill the available space.

If an ASCII  code is specified, that key is drawn 'pressed'  -  i.e. in  background color with any 3D effect removed.

char

Key labels, one character per key. The TAG value  is set to the ASCII  value of each  key,  so  that  key  presses  can  be  detected using the REG_TOUCH_TAG register.

 

The gap between keys is 3 pixels.

For OPT_CENTERX case, the keys are (font  width  +  1.5)  pixels wide ,otherwise keys are sized to fill available width.

 

Example

Personal tools
Namespaces
Variants
Actions
Navigation
Language