2015-08-17 02:16:17 +02:00
# define MEMSIZE 0x7E80
# include "../lib/font.h"
byte id , key ;
void main ( )
{
SetEventMask ( 1100111 b ) ;
2015-08-17 18:21:51 +02:00
font . load ( " font/Verdana.kf " ) ;
2015-08-17 02:16:17 +02:00
loop ( )
{
switch ( WaitEvent ( ) )
{
case evMouse :
mouse . get ( ) ;
break ;
case evButton :
id = GetButtonID ( ) ;
if ( id = = 1 ) ExitProcess ( ) ;
break ;
case evKey :
key = GetKey ( ) ;
if ( key = = 013 ) { //Enter
draw_window ( ) ;
}
break ;
case evReDraw :
draw_window ( ) ;
break ;
}
}
}
2015-08-17 18:21:51 +02:00
char buf [ 40 ] ;
2015-08-17 02:16:17 +02:00
void draw_window ( )
{
proc_info Form ;
2015-08-17 18:21:51 +02:00
int i = 8 ;
int ii = 0 ;
2015-08-17 02:16:17 +02:00
DefineAndDrawWindow ( 215 , 100 , 450 , 500 , 0x33 , 0xFFFFFF , " Window header " ) ;
GetProcessInfo ( # Form , SelfInfo ) ;
2015-08-17 18:21:51 +02:00
while ( i < = 45 )
{
sprintf ( # buf , " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> /size font %d <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ." , i ) ;
font . text ( 0 , ii , # buf , 0 , i ) ;
ii + = font . height ;
i + + ;
}
2015-08-17 02:16:17 +02:00
}