1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
-
|
|
!
|
#include "mod_oncmd2.hsp"
title "マウスのボタンを(押して)離すと割り込み発生"
#define WM_LBUTTONUP 0x0202
#define WM_RBUTTONUP 0x0205
oncmd2 gosub *sub00, WM_LBUTTONUP
oncmd2 gosub *sub01, WM_LBUTTONUP
oncmd2 gosub *sub02, WM_LBUTTONUP
oncmd2 gosub *sub03, WM_LBUTTONUP
oncmd2 gosub *sub04, WM_LBUTTONUP
oncmd2 goto *to01, WM_LBUTTONUP
oncmd2 goto *to00, WM_LBUTTONUP
oncmd2 gosub *sub04, WM_RBUTTONUP
oncmd2 gosub *sub03, WM_RBUTTONUP
oncmd2 gosub *sub02, WM_RBUTTONUP
oncmd2 gosub *sub01, WM_RBUTTONUP
oncmd2 gosub *sub00, WM_RBUTTONUP
oncmd2 *to01, WM_RBUTTONUP
objsize 128, 24
f = 1, 1 : pos 0, 0 : chkbox "割り込み処理を許可", f(0)
repeat 5 : pos 128 * cnt, 24 : chkbox strf( "sub%02dからの戻り値あり", cnt ), r(cnt) : loop
pos 0, 48
*main
if ( ginfo_cy > 479 ) : pos ginfo_cx + 128, 48
if ( f(0) != f(1) ) {
f(1) = f(0)
if ( f(0) ) { oncmd2 1 } else { oncmd2 0 }
}
wait 3
goto *main
*to00
if ( iparam == WM_LBUTTONUP ) { color 255, 127, 0 : k = "L" } else { color 0, 127, 255 : k = "R" }
mes " to00: " + k : goto *main
*to01
if ( iparam == WM_LBUTTONUP ) { color 255, 127, 0 : k = "L" } else { color 0, 127, 255 : k = "R" }
mes " to01: " + k : goto *main
*sub00
if ( iparam == WM_LBUTTONUP ) { color 255, 0, 0 : k = "L" } else { color 0, 0, 255 : k = "R" }
mes "sub00: " + k : if ( r(0) ) { return ( 0 ) } else { return }
*sub01
if ( iparam == WM_LBUTTONUP ) { color 255, 0, 0 : k = "L" } else { color 0, 0, 255 : k = "R" }
mes "sub01: " + k : if ( r(1) ) { return ( 0 ) } else { return }
*sub02
if ( iparam == WM_LBUTTONUP ) { color 255, 0, 0 : k = "L" } else { color 0, 0, 255 : k = "R" }
mes "sub02: " + k : if ( r(2) ) { return ( 0 ) } else { return }
*sub03
if ( iparam == WM_LBUTTONUP ) { color 255, 0, 0 : k = "L" } else { color 0, 0, 255 : k = "R" }
mes "sub03: " + k : if ( r(3) ) { return ( 0 ) } else { return }
*sub04
if ( iparam == WM_LBUTTONUP ) { color 255, 0, 0 : k = "L" } else { color 0, 0, 255 : k = "R" }
mes "sub04: " + k : if ( r(4) ) { return ( 0 ) } else { return }
|