📄 w_main.srw
字号:
event key;wf_keyDown(key)
Return
end event
type mdi_1 from mdiclient within w_main
long BackColor=268435456
end type
type st_14 from statictext within w_main
integer x = 942
integer y = 1576
integer width = 320
integer height = 48
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "右移:Right"
boolean focusrectangle = false
end type
type st_13 from statictext within w_main
integer x = 942
integer y = 1512
integer width = 320
integer height = 48
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "左移:Left"
boolean focusrectangle = false
end type
type st_12 from statictext within w_main
integer x = 942
integer y = 1448
integer width = 320
integer height = 48
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "旋转:Up"
boolean focusrectangle = false
end type
type st_8 from statictext within w_main
integer x = 942
integer y = 1384
integer width = 288
integer height = 48
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "暂停:Esc"
boolean focusrectangle = false
end type
type dw_fklx from datawindow within w_main
boolean visible = false
integer x = 27
integer y = 880
integer width = 773
integer height = 756
integer taborder = 100
string title = "none"
string dataobject = "d_fklx"
boolean vscrollbar = true
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type
type st_zfs from statictext within w_main
integer x = 951
integer y = 1292
integer width = 329
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "0分"
alignment alignment = right!
boolean focusrectangle = false
end type
type st_10 from statictext within w_main
integer x = 942
integer y = 1228
integer width = 343
integer height = 44
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "共取得分数:"
boolean focusrectangle = false
end type
type st_9 from statictext within w_main
integer x = 942
integer y = 1108
integer width = 343
integer height = 44
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "总消去行数:"
boolean focusrectangle = false
end type
type st_zhs from statictext within w_main
integer x = 951
integer y = 1168
integer width = 329
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "0行"
alignment alignment = right!
boolean focusrectangle = false
end type
type st_7 from statictext within w_main
integer x = 1115
integer y = 1012
integer width = 178
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "无"
boolean focusrectangle = false
end type
type st_6 from statictext within w_main
integer x = 942
integer y = 1008
integer width = 187
integer height = 44
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "底行:"
boolean focusrectangle = false
end type
type st_5 from statictext within w_main
integer x = 1115
integer y = 944
integer width = 178
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "无悔卒"
boolean focusrectangle = false
end type
type st_4 from statictext within w_main
integer x = 942
integer y = 944
integer width = 187
integer height = 44
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "等级:"
boolean focusrectangle = false
end type
type st_2 from statictext within w_main
integer x = 942
integer y = 844
integer width = 187
integer height = 44
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "暂停:"
boolean focusrectangle = false
end type
type st_1 from statictext within w_main
integer x = 942
integer y = 784
integer width = 187
integer height = 44
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "开始:"
boolean focusrectangle = false
end type
type pb_start from picturebutton within w_main
boolean visible = false
integer x = 1106
integer y = 304
integer width = 105
integer height = 92
integer taborder = 100
integer textsize = -12
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string picturename = "Start!"
end type
type pb_stop from picturebutton within w_main
boolean visible = false
integer x = 997
integer y = 304
integer width = 105
integer height = 92
integer taborder = 100
integer textsize = -12
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string picturename = "Custom024!"
end type
type pb_5 from picturebutton within w_main
integer x = 1051
integer y = 636
integer width = 105
integer height = 92
integer taborder = 90
integer textsize = -12
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string picturename = "Custom034!"
end type
event clicked;wf_keydown(keyDownarrow!)
Return
end event
type pb_4 from picturebutton within w_main
integer x = 1051
integer y = 544
integer width = 105
integer height = 92
integer taborder = 80
integer textsize = -12
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
boolean cancel = true
string picturename = "Start!"
end type
event clicked;If ib_IsBegin Then
If ib_IsStop Then
ib_IsStop = False
This.pictureName = pb_stop.picturename
timing_1.Start(idec_timer)
Else
timing_1.Stop()
ib_IsStop = True
This.pictureName = pb_start.picturename
End If
Else
wf_new()
End If
Return
end event
type pb_3 from picturebutton within w_main
integer x = 1051
integer y = 452
integer width = 105
integer height = 92
integer taborder = 70
integer textsize = -12
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string picturename = "Custom044!"
end type
event clicked;wf_keydown(keyUparrow!)
Return
end event
type pb_2 from picturebutton within w_main
integer x = 1157
integer y = 544
integer width = 105
integer height = 92
integer taborder = 70
integer textsize = -12
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string picturename = "Custom035!"
end type
event clicked;wf_keydown(keyRightarrow!)
Return
end event
type pb_1 from picturebutton within w_main
integer x = 946
integer y = 544
integer width = 105
integer height = 92
integer taborder = 60
integer textsize = -12
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
string picturename = "Custom036!"
end type
event clicked;wf_keydown(keyleftarrow!)
Return
end event
type st_over from statictext within w_main
boolean visible = false
integer x = 288
integer y = 472
integer width = 334
integer height = 88
integer textsize = -12
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 65535
long backcolor = 255
string text = "游戏结束"
alignment alignment = center!
boolean border = true
borderstyle borderstyle = stylelowered!
boolean focusrectangle = false
end type
type dw_2 from datawindow within w_main
integer x = 919
integer y = 108
integer width = 375
integer height = 312
boolean enabled = false
string title = "none"
string dataobject = "d_els"
borderstyle borderstyle = stylelowered!
end type
type dw_1 from datawindow within w_main
event key pbm_dwnkey
integer x = 9
integer y = 108
integer width = 896
integer height = 1536
integer taborder = 10
string title = "none"
string dataobject = "d_els"
borderstyle borderstyle = stylelowered!
end type
event key;wf_keydown(key)
Return
end event
type st_3 from statictext within w_main
integer x = 1115
integer y = 812
integer width = 178
integer height = 48
boolean bringtotop = true
integer textsize = -9
integer weight = 400
fontcharset fontcharset = gb2312charset!
fontpitch fontpitch = variable!
string facename = "宋体"
long textcolor = 33554432
long backcolor = 67108864
string text = "ESC键"
boolean focusrectangle = false
end type
type timing_2 from timing within w_main descriptor "pb_nvo" = "true"
end type
event timer;This.Stop()
If ib_IsBegin = False Then
Return
End If
If ib_IsStop Then
Return
End If
Yield()
If wf_CanDown(istr_fk_current,ii_currenty,ii_currentx) = False Then
isi_cont = 0
// 消除行(如果消除行为0,则要判断游戏是否结束)
If wf_Del_Line() = 0 Then
// 判断是否游戏结束
If wf_Is_over() Then
Else
// 没有结束,重新生成一个方块阵列
wf_new_fk()
End If
Else
wf_new_fk()
End If
End If
Return
end event
on timing_2.create
call super::create
TriggerEvent( this, "constructor" )
end on
on timing_2.destroy
TriggerEvent( this, "destructor" )
call super::destroy
end on
type timing_1 from timing within w_main descriptor "pb_nvo" = "true"
end type
on timing_1.create
call super::create
TriggerEvent( this, "constructor" )
end on
on timing_1.destroy
TriggerEvent( this, "destructor" )
call super::destroy
end on
event timer;If ib_IsBegin = False Then
this.stop()
Return
End If
If ib_IsStop Then
this.stop()
Return
End If
Yield()
If wf_CanDown(istr_fk_current,ii_currenty,ii_currentx) Then
// 如果可以下落,就下落
dw_1.SetRedraw(False)
wf_writeFk(dw_1,istr_fk_current,ii_currenty,ii_currentx,true) // 先清除
ii_currenty ++
wf_writeFk(dw_1,istr_fk_current,ii_currenty,ii_currentx,false) // 下落
dw_1.SetRedraw(True)
This.Start(idec_Timer)
Else // 不能下落
timing_2.Start(0.3)
End If
Return
end event
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -