Tsev > Xov xwm > Ntsiab lus

CMD-KEYS - Kos Ib Leeg Ntawm Daws

Apr 27, 2019

image

C daim ntawv prototype

tsis muaj dabtsis cmd_keys (int16_t x,

int16_t y,

int16_t w,

int16_t h,

int16_t font,

uint16_t xaiv,

const char * s);

Cov lus qhia

x

x-coordinate cov yaum saum toj-sab laug, hauv pixels

y

y-coordinate cov yawm saum toj-sab laug, hauv pixels

font

Bitmap kov txhawm rau qhia lub font siv nyob rau hauv lub ntsiab lus tseem ceeb. Qhov siv tau yog 0

mus rau 31

kev xaiv

Los ntawm lub neej ntawd tus tuav tau kos nrog 3D effect thiab tus nqi ntawm qhov kev xaiv yog xoom.

OPT_FLAT tshem tawm cov nyhuv 3D. Yog hais tias OPT_CENTER raug muab rau hauv lub lag luam kos

ntawm qhov tsawg kawg nkaus me me nyob nruab nrab hauv cov duab plaub hau wxh. Txwv tsis pub tus yuam sij

nthuav kom lawv ua tiav qhov chaw nyob. Yog tias muaj ASCII code

teev, qhov tseem ceeb yog kos 'nias' - xws li tom qab xim nrog cov 3D

cov nyhuv tawm.

w

Qhov dav ntawm cov yuam sij

h

Qhov siab ntawm cov yuam sij

s

tseem ceeb cim, ib cim ua ib qhov tseem ceeb. Tus nqi TAG yog teem rau ASCII tus nqi ntawm

txhua qhov tseem ceeb, yog li ntawd qhov tseem ceeb presses tau kuaj siv lub npe REG_TOUCH_TAG

sau npe.

Kev piav qhia

Cov ntsiab lus ntawm lub cev dimension yog

 Qhov sib txawv ntawm qhov yuam sij yog 3 pixels

 Rau OPT_CENTERX rooj, cov yawm sij (font width + 1.5) pixels dav

, txwv tsis pub muaj cov yuam sij rau qhov muaj qhov dav

Xa mus rau cov tshuab hluav taws xob cav cov voj voog ntawm lub cev kom paub ntxiv

image

image

image

image

image

image