2020-02-15 20:01:48 +00:00
|
|
|
|
|
|
|
|
|
$SP,"<1>",BI=1$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I64 x=0;
|
|
|
|
|
|
|
|
|
|
U0 DrawIt(CTask *,CDC *dc)
|
|
|
|
|
{
|
2020-02-20 23:40:10 +00:00
|
|
|
|
Sprite3(dc,x%100,100,0,$IB,"<1>",BI=1$);
|
2020-02-15 20:01:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
U0 KeyDownBitMapDemo()
|
|
|
|
|
{
|
|
|
|
|
//This conversion routine is slow.
|
2020-02-20 23:40:10 +00:00
|
|
|
|
I64 i_sc=Char2ScanCode('i');
|
|
|
|
|
|
|
|
|
|
"Press and hold $$GREEN$$'i'$$FG$$.\n";
|
|
|
|
|
while (!Bt(kbd.down_bitmap,i_sc))
|
|
|
|
|
Yield;
|
|
|
|
|
|
|
|
|
|
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
|
|
|
|
Fs->draw_it=&DrawIt;
|
|
|
|
|
|
|
|
|
|
//$LK,"kbd.down_bitmap",A="MN:CKbdStateGlobals"$ is indexed with the
|
2020-03-01 01:59:50 +00:00
|
|
|
|
//merged scan code. (left shift and
|
2020-02-20 23:40:10 +00:00
|
|
|
|
//right shift combined for example.)
|
|
|
|
|
//$LK,"kbd.down_bitmap2",A="MN:CKbdStateGlobals"$ is indexed with the
|
2020-03-01 01:59:50 +00:00
|
|
|
|
//distinct scan code. See $LK,"Char",A="HI:Char"$ and $LK,"Scan Codes",A="MN:SC_INS"$.
|
2020-02-20 23:40:10 +00:00
|
|
|
|
|
|
|
|
|
while (Bt(kbd.down_bitmap,i_sc)) {
|
|
|
|
|
x++;
|
|
|
|
|
Sleep(10);
|
|
|
|
|
}
|
|
|
|
|
SettingsPop;
|
|
|
|
|
FlushMessages;
|
2020-02-15 20:01:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KeyDownBitMapDemo;
|
|
|
|
|
|