#module
#deffunc getwakusize
mref stt, 64
ginfo 5
stt = prmx - winx / 2
return
#deffunc getcaptionsize
mref stt, 64
getwakusize
stt = prmy - winy - (stat * 2)
return
#deffunc combox_open int, int
mref id, 0 : mref flg, 1
objsend id, 0x014F, flg, nouse
return
#deffunc combox_state int
mref id, 0
objsend id, 0x0157, 0, nouse
return
#global
sdim state, 6, 2
state = "close", "open"
close = 50, 50, 250, 250
open = 300, 50, 500, 250
objsize 150, 20
combox index, , "スキー\nスノーボード\nクロスカントリー"
color 255, 150, 150 : boxf close.0, close.1, close.2, close.3
color 150, 150, 255 : boxf open.0, open.1, open.2, open.3
color
pos close.0 + 10, close.1 + 10 : mes state.0
pos open.0 + 10, open.1 + 10 : mes state.1
pos close.0 + 10, close.2 + 10 : mes "上の色付きエリアにマウスを持っていくと…?"
getwakusize : size.0 = stat
getcaptionsize : size.1 = stat
repeat
wait 1
combox_state
title state.stat
ginfo 0 : mp = prmx, prmy
ginfo 2 : mp = mp.0 - prmx - size, mp.1 - prmy - size.1 - size
if mp.1 >= close.1 & (mp.1 <= close.3) {
if mp.0 >= close.0 & (mp.0 <= close.2) : combox_open 0, 0
if mp.0 >= open.0 & (mp.0 <= open.2) : combox_open 0, 1
}
loop
|