most of the addin's have user-commands. in the include file where the commands are declared there are comments on how to use themAny help or suggestions appreciated.
eg in touch_tft
x, y are cartesian coordinates for the screen position of the desired object , it goes without saying that x is horizontal axis [width] y vertical axis [height] when facing screen. both x and y need to be on the screen, objects can also have a width [w] and a height [h] and it follows thatCode:;work around fact that usercommand won't accept a 1 chr string (thinks its a const) so leading space is ignored in button title USERCOMMAND "DRAWBUTTON" ; BTN { BUTTON NUMBER } USERCOMMAND "MAKEBUTTON" ; X,Y ,BTN,{w},{h} ,"title" [(XY IS button centre) BUTTON number , BUTTON size WILL BE default_button_size IF SIZE OMITTED h=w if h omitted] USERCOMMAND "DRAWSLIDER" ; SLIDER { SLIDER NUMBER } USERCOMMAND "MAKESLIDER" ; X,Y {W,H},SLIDER [(XY IS LHBottom CNR ) SLIDER number size WILL BE default IF W,H OMITTED
x+w should still be on the screen as well as with y+h
if your objects don't fit on the screen then things won't play nice
start here
which of these fit on a screen 160x128 ?
MAKEBUTTON 53,170,0,92 ,40,"Clear" ;
MAKEBUTTON 276,220,1,56,30,"Sleep"
MAKEBUTTON 280,150,2,60,"Led"
MAKEBUTTON 242,52,3,40 ; no text SEE BELOW FOR Another way to attach text
MAKEBUTTON 140,150,4,50,30," +"
MAKEBUTTON 205,150,5,50,30," -"
answer none
and so on
in chipset driver file you will find thisI'm really interested in using Portrait mode too
it needs to be setup to match your screen re-orientation and mirror imaging, its no big dealCode:;SCREEN ORIENTATION TFTDATA $18 ;bit3 controls rgb/bgr 0=bgr , 1 =rgb ;bit2 controls refresh direction long axis ;bit4 controls refresh direction short axis ;bit5 controls portrait/landscape 1=portrait , 0 =landscape / adjust height width to suit ;bit6 controls write direction short axis ;bit7 controls write direction long axis
you need to set height/width declares to match




Bookmarks