📄 frmoption.frm
字号:
VERSION 5.00
Begin VB.Form FrmOption
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "天空战记"
ClientHeight = 3915
ClientLeft = 2250
ClientTop = 1785
ClientWidth = 3975
ControlBox = 0 'False
Icon = "FrmOption.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 261
ScaleMode = 3 'Pixel
ScaleWidth = 265
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frzz
Height = 1605
Left = 120
TabIndex = 16
Top = 1680
Width = 1500
Begin VB.CheckBox ChkBuf
Alignment = 1 'Right Justify
Caption = "缓存优化"
Height = 255
Left = 120
TabIndex = 20
Top = 960
Width = 1095
End
Begin VB.OptionButton OptEffect
Alignment = 1 'Right Justify
Caption = "优化图象"
Height = 255
Index = 3
Left = 120
TabIndex = 19
Top = 420
Width = 1095
End
Begin VB.OptionButton OptEffect
Alignment = 1 'Right Justify
Caption = "图象缓存"
Height = 255
Index = 2
Left = 120
TabIndex = 18
Top = 700
Width = 1095
End
Begin VB.OptionButton OptEffect
Alignment = 1 'Right Justify
Caption = "一般图象"
Height = 255
Index = 1
Left = 120
TabIndex = 17
Top = 120
Width = 1095
End
Begin VB.Label LblWhat
AutoSize = -1 'True
BackColor = &H00000000&
Caption = "不清楚请点这里"
ForeColor = &H00FFFF00&
Height = 180
Left = 120
TabIndex = 21
Top = 1320
Width = 1260
End
End
Begin VB.CheckBox ChkMusic
Alignment = 1 'Right Justify
Caption = "Game Music"
Height = 180
Left = 1680
TabIndex = 15
Top = 360
Width = 1335
End
Begin VB.CheckBox ChkSound
Alignment = 1 'Right Justify
Caption = "Game Sound"
Height = 180
Left = 1680
TabIndex = 14
Top = 75
Width = 1335
End
Begin VB.CommandButton CmdReset
Caption = "默认"
Height = 375
Left = 120
TabIndex = 13
Top = 3480
Width = 735
End
Begin VB.Frame Fram
Height = 375
Left = 120
TabIndex = 10
Top = -45
Width = 1500
Begin VB.OptionButton OpPlayer
Alignment = 1 'Right Justify
Caption = "P2"
Height = 180
Index = 2
Left = 720
TabIndex = 12
Top = 120
Width = 615
End
Begin VB.OptionButton OpPlayer
Caption = "P1"
Height = 180
Index = 1
Left = 120
TabIndex = 11
Top = 120
Value = -1 'True
Width = 615
End
End
Begin VB.PictureBox PicXZ
Height = 1275
Left = 120
ScaleHeight = 81
ScaleMode = 3 'Pixel
ScaleWidth = 96
TabIndex = 2
Top = 360
Width = 1500
Begin VB.CommandButton CmdCtrl
Caption = "集弹"
Height = 375
Index = 6
Left = 960
TabIndex = 9
Top = 840
Width = 495
End
Begin VB.CommandButton CmdCtrl
Caption = "发雷"
Height = 375
Index = 5
Left = 480
TabIndex = 8
Top = 840
Width = 495
End
Begin VB.CommandButton CmdCtrl
Caption = "射击"
Height = 375
Index = 4
Left = 0
TabIndex = 7
Top = 840
Width = 495
End
Begin VB.CommandButton CmdCtrl
Caption = "右"
Height = 375
Index = 3
Left = 960
TabIndex = 5
Top = 360
Width = 495
End
Begin VB.CommandButton CmdCtrl
Caption = "下"
Height = 375
Index = 2
Left = 480
TabIndex = 6
Top = 360
Width = 495
End
Begin VB.CommandButton CmdCtrl
Caption = "左"
Height = 375
Index = 1
Left = 0
TabIndex = 4
Top = 360
Width = 495
End
Begin VB.CommandButton CmdCtrl
Caption = "上"
Height = 375
Index = 0
Left = 480
TabIndex = 3
Top = 0
Width = 495
End
End
Begin VB.CommandButton CmdOk
Caption = "确定"
Default = -1 'True
Height = 375
Left = 3000
TabIndex = 1
Top = 3480
Width = 855
End
Begin VB.CommandButton CmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 375
Left = 2160
TabIndex = 0
Top = 3480
Width = 855
End
End
Attribute VB_Name = "FrmOption"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public CurCmdCtrl As Byte
Public CurOpPlayer As Byte
Public SMsg As Byte
Private Sub ChkBuf_Click()
BufEffect = ChkBuf.Value
If CurOption.ImgEffect = 2 Then Call OptEffect_Click(2)
End Sub
Private Sub CmdCancel_Click()
Unload Me
End Sub
Private Sub CmdCtrl_Click(Index As Integer)
CurCmdCtrl = Index
FrmGetKey.Show vbModal, Me
End Sub
Private Sub CmdOk_Click()
On Error Resume Next
Call SetPlayKey
If ChkSound.Value = 0 Then GameSound.KillMe Else GameSound.ResumeMe
If ChkMusic.Value = 0 Then
GameSound.StopMusic
Else
GameSound.PlayMusic LoadMusicList(Int(UBound(LoadMusicList) * Rnd) + 1)
End If
CurOption.GSound = ChkSound.Value
CurOption.GMusic = ChkMusic.Value
Open App.Path & "\ListPro\Option.ini" For Binary As #1
Put #1, 1, CurOption
Close #1
SaveSetting App.Title, "Setting", "GameImgEffect", Str(CurOption.ImgEffect)
SaveSetting App.Title, "Setting", "GameBufEffect", Str(BufEffect)
Unload Me
End Sub
Private Sub CmdReset_Click()
CurOption.KeyP(1, 0) = VK_UP
CurOption.KeyP(1, 1) = VK_LEFT
CurOption.KeyP(1, 2) = VK_DOWN
CurOption.KeyP(1, 3) = VK_RIGHT
CurOption.KeyP(1, 4) = VK_CONTROL
CurOption.KeyP(1, 5) = vbKeyNumpad0
CurOption.KeyP(1, 6) = vbKeyZ
CurOption.KeyP(2, 0) = vbKeyW
CurOption.KeyP(2, 1) = vbKeyA
CurOption.KeyP(2, 2) = vbKeyS
CurOption.KeyP(2, 3) = vbKeyD
CurOption.KeyP(2, 4) = vbKeyJ
CurOption.KeyP(2, 5) = vbKeyK
CurOption.KeyP(2, 6) = vbKeyM
ChkBuf.Value = 1
OptEffect(2).Value = True
End Sub
Private Sub Form_Load()
ChkSound.Value = CurOption.GSound
ChkMusic.Value = CurOption.GMusic
CurOpPlayer = 1
OptEffect(CurOption.ImgEffect).Value = True
ChkBuf.Value = BufEffect
SMsg = 4
End Sub
Private Sub Form_Unload(Cancel As Integer)
SMsg = 0
End Sub
Private Sub LblWhat_Click()
On Error Resume Next
Dim SHelp As String
Dim S As String
Open App.Path & "\ListPro\ImgHelp.ini" For Input As #1
Do While Not EOF(1)
Line Input #1, S
SHelp = SHelp + S & Chr(13) & Chr(10)
Loop
Close #1
MsgBox SHelp, vbQuestion, "Image Effect"
SHelp = ""
If Err Then MsgBox Err.Description
End Sub
Private Sub OpPlayer_Click(Index As Integer)
CurOpPlayer = Index
End Sub
Private Sub OptEffect_Click(Index As Integer)
CurOption.ImgEffect = Index
If SMsg = 4 Then MsgBox "对图象设置的更改要等到下次启动游戏时才能生效", , "Option": SMsg = 0
ChkBuf.Enabled = OptEffect(2).Value
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -