!<その9> CASE 30.2 TO 32 ! putcol=12,0 着手点の表示 IF x>=9 AND x<=13 THEN SET AREA COLOR 0 FLOOD 16,L8-a4 SET AREA COLOR bb DRAW DISK WITH SCALE(a5)*SHIFT(10,L8-a4) LET putcol=12 ELSEIF x>=15 AND x<=19 THEN SET AREA COLOR 0 FLOOD 10,L8-a4 SET AREA COLOR bb DRAW DISK WITH SCALE(a5)*SHIFT(16,L8-a4) LET putcol=0 END IF CASE 33.2 TO 35 ! pix=1〜5 画面の解像度 LET ri=INT((x-9)/6)+1 IF ri>=1 AND ri<=5 THEN SET AREA COLOR 0 FLOOD 4+6*pix,L9-a4 SET AREA COLOR bb DRAW DISK WITH SCALE(a5)*SHIFT(4+6*ri,L9-a4) LET pix=ri END IF CASE ELSE END SELECT SET DRAW MODE EXPLICIT LOOP IF m>=n AND b<>w AND board<>b AND board<>w AND ground<>b AND ground<>w AND ground<>board THEN EXIT SUB ELSE DRAW button01(1,8,"設 定",0.6*mbh,8) WITH SCALE(mbw,mbh)*SHIFT(mx,my) BEEP ! エラーメッセージ WAIT DELAY 0.3 DRAW button01(0,5,"設 定",0.6*mbh,8) WITH SCALE(mbw,mbh)*SHIFT(mx,my) SET DRAW MODE HIDDEN SET TEXT JUSTIFY "CENTER","HALF" DRAW rect(6) WITH SCALE(35,6.5)*SHIFT(2.5,35.5) IF m<n THEN PLOT TEXT,AT 40/2,36.5:"盤が横長になるよう、マス数は横の方を大きく設定してください" IF b=w THEN PLOT TEXT,AT 40/2,38:"先手と後手は、違う色に設定してください" IF board=b OR board=w THEN PLOT TEXT,AT 40/2,39.5:"盤面は、石と違う色に設定してください" IF ground=b OR ground=w OR ground=board THEN PLOT TEXT,AT 20,41:"背景は、石や盤面と違う色に設定してください" SET DRAW MODE EXPLICIT END IF LOOP END SUB ! menuの終端 EXTERNAL SUB choose(L,r0,r9,rb) ! menuラジオボタン選択 LET ri=ROUND((x-a2)/a3+r0-1,0) IF ri>=r0 AND ri<=r9 THEN SET AREA COLOR 0 FLOOD a2+a3*(rb-r0+1),L-a4 SET AREA COLOR bb DRAW DISK WITH SCALE(a5)*SHIFT(a2+a3*(ri-r0+1),L-a4) LET rb=ri ! 実引数の値の変更(参照渡し) END IF END SUB EXTERNAL SUB radio(L,ra$(),r0,r9,rb) ! menuラジオボタン描画 ASK TEXT JUSTIFY w$,h$ SET TEXT JUSTIFY "CENTER","BOTTOM" SET AREA COLOR 0 FOR i=r0 TO r9 PLOT TEXT ,AT a2+a3*(i-r0+1),L : ra$(i) DRAW CIRCLE WITH SCALE(a4)*SHIFT(a2+a3*(i-r0+1),L+1-a4) PAINT a2+a3*(i-r0+1),L+1-a4 NEXT i SET AREA COLOR bb DRAW DISK WITH SCALE(a5)*SHIFT(a2+a3*(rb-r0+1),L+1-a4) SET TEXT JUSTIFY w$,h$ END SUB END MODULE !<その10>に続く
|