// IMW版 スクリーンセーバー
// 四字熟語を表示します
// コンパイルして、拡張子を .exe → .scr に変更すれば
// スクリーンセーバーとして使えます
// キーが押されたりクリックされたら終了させる
KEYDOWN { end ; }
LBUTTONDOWN { end ; }
RBUTTONDOWN { end ; }
// マウスが動いたら終了させる
MOUSEMOVE
{
// ms_move の値が 10 までは終了させない
// こうしないといきなり終了してしまう
ms_move = ms_move + 1 ;
if(ms_move > 10){ end ; }
}
TIMER
{
// リストから文字列を取得
if(count <= 20){
SetListPos("ID_list",pos) ;
AllClearEdit("ID_edit") ;
GetListText("ID_list","ID_edit") ;
}
SetPal(7,count*8,count*8,count*8) ; // 色を設定
Print(px,py,r,16,32,7,"ID_edit") ;
count = count + 1 ;
if(count > 20){
FullPaint(0) ; // 全消去
px = rand(SEC)*(SCR_X-16*8)/100 ; // 次の表示座標
py = rand(px)*(SCR_Y-32*4)/100 ;
// 次のリスト内の位置
n = pos ;
pos = rand(py) % max ;
if(n == pos){ pos = (pos + 1) % max ; }
r = r * (-1) ; // 傾きを反転(-30 か 30)
count = 0 ;
}
}
CREATE
{
SetWinStyle(4) ;
SetWinSize(SCR_X,SCR_Y) ;
SetWinPos(0,0,0) ;
SetWinColor(0) ;
SetTimer(200) ; // タイマー時間の設定 0.2 秒
CreateControl(41,"","ID_list",0,0,0,0) ; // リスト作成
CreateControl(101,"","ID_edit",0,0,0,0) ;
px = SCR_X/2+SEC ; py = SCR_Y/2+MIN ; // 表示座標
pos = MIN % 30 ; // リスト内の位置
r = 30 ; // 文字表示の傾き
count = 0 ;
ms_move = 0 ;
}
INIT
{
max = 30 ; // セットする数
// リストに文字列をセット
SetListText("ID_list","馬耳東風") ;
SetListText("ID_list","一石二鳥") ;
SetListText("ID_list","疑心暗鬼") ;
SetListText("ID_list","心機一転") ;
SetListText("ID_list","一心不乱") ;
SetListText("ID_list","以心伝心") ;
SetListText("ID_list","一心同体") ;
SetListText("ID_list","異口同音") ;
SetListText("ID_list","一目瞭然") ;
SetListText("ID_list","岡目八目") ;
SetListText("ID_list","四面楚歌") ;
SetListText("ID_list","危機一髪") ;
SetListText("ID_list","頭寒足熱") ;
SetListText("ID_list","猪突猛進") ;
SetListText("ID_list","一期一会") ;
SetListText("ID_list","初志貫徹") ;
SetListText("ID_list","支離滅裂") ;
SetListText("ID_list","良妻賢母") ;
SetListText("ID_list","才色兼備") ;
SetListText("ID_list","切磋琢磨") ;
SetListText("ID_list","質実剛健") ;
SetListText("ID_list","絶体絶命") ;
SetListText("ID_list","千差万別") ;
SetListText("ID_list","全知全能") ;
SetListText("ID_list","前途多難") ;
SetListText("ID_list","前途洋洋") ;
SetListText("ID_list","前人未到") ;
SetListText("ID_list","前代未聞") ;
SetListText("ID_list","言語道断") ;
SetListText("ID_list","起承転結") ;
}