⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libedit.frm

📁 超级C&C有没有搞错,VB还能编出这种即时策略游戏来!没错,这就是我们的超级C&C!虽然游戏经常无故退出,但是原码仍有很多可圈可点的地方.祝你早日编出中国的超级RA,超级KKND,超级星际,超级家园
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Graphics Library Editor"
   ClientHeight    =   1740
   ClientLeft      =   2565
   ClientTop       =   3600
   ClientWidth     =   4215
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1740
   ScaleWidth      =   4215
   ShowInTaskbar   =   0   'False
   Begin VB.CheckBox Check1 
      Caption         =   "Masked"
      Height          =   255
      Left            =   2040
      TabIndex        =   7
      Top             =   1320
      Width           =   2055
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Revert"
      Height          =   315
      Left            =   1080
      TabIndex        =   6
      Top             =   1320
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Save"
      Height          =   315
      Left            =   120
      TabIndex        =   5
      Top             =   1320
      Width           =   855
   End
   Begin VB.ListBox List1 
      Height          =   1035
      Left            =   2040
      TabIndex        =   4
      Top             =   120
      Width           =   2055
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   120
      TabIndex        =   2
      Text            =   "-Blank-"
      Top             =   960
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   120
      TabIndex        =   0
      Text            =   "-Blank-"
      Top             =   360
      Width           =   1815
   End
   Begin VB.Label Label2 
      Caption         =   "Graphic File:"
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   720
      Width           =   1575
   End
   Begin VB.Label Label1 
      Caption         =   "Library Name:"
      Height          =   255
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   1575
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
Call SaveFile
End Sub

Private Sub Command2_Click()
Call LoadFile
End Sub

Private Sub Form_Load()
Call LoadFile
Form1.List1.AddItem "[NewLib]"
Form1.List1.ListIndex = 0
Call UpdateView
End Sub

Private Sub List1_Click()
If List1.ListIndex = 0 Then
  Text1.Text = "-Blank-"
  Text2.Text = "-Blank-"
Else
  Text1.Text = GraphixLibs(List1.ListIndex).LibName
  Text2.Text = GraphixLibs(List1.ListIndex).GraphicsFile
End If
End Sub

Private Sub List1_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 46 Then 'escape
  lastn = List1.ListIndex
  For i = List1.ListIndex To 99
    GraphixLibs(i).GraphicsFile = GraphixLibs(i + 1).GraphicsFile
    GraphixLibs(i).LibName = GraphixLibs(i + 1).LibName
  Next i
  GraphixLibs(100).GraphicsFile = ""
  GraphixLibs(100).LibName = ""
MaxLibs = MaxLibs - 1
List1.ListIndex = lastn - 1
Call UpdateView
End If

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
If List1.ListIndex = 0 Then
  MaxLibs = MaxLibs + 1
  GraphixLibs(MaxLibs).LibName = Text1.Text
  GraphixLibs(MaxLibs).GraphicsFile = Text2.Text
  Call UpdateView
  List1.ListIndex = MaxLibs
Else
  GraphixLibs(List1.ListIndex).LibName = Text1.Text
  Call UpdateView
End If

End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
If List1.ListIndex = 0 Then
  MaxLibs = MaxLibs + 1
  GraphixLibs(MaxLibs).LibName = Text1.Text
  GraphixLibs(MaxLibs).GraphicsFile = Text2.Text
  Call UpdateView
  List1.ListIndex = MaxLibs

Else
  GraphixLibs(List1.ListIndex).GraphicsFile = Text2.Text
  Call UpdateView
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -