-
Notifications
You must be signed in to change notification settings - Fork 1
/
frmMain.frm
249 lines (240 loc) · 7.35 KB
/
frmMain.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
VERSION 5.00
Begin VB.Form frmMain
BackColor = &H00000000&
BorderStyle = 0 'None
Caption = "Main"
ClientHeight = 9000
ClientLeft = 60
ClientTop = 450
ClientWidth = 12000
FillColor = &H00011BFC&
ForeColor = &H0000DF00&
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
ScaleHeight = 9000
ScaleWidth = 12000
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
WindowState = 2 'Maximized
Begin VB.Timer tmrMusic
Interval = 500
Left = 360
Top = 240
End
Begin VB.Label lblSave
AutoSize = -1 'True
BackColor = &H00000000&
Caption = "Ñîõðàíèòü"
BeginProperty Font
Name = "Georgia"
Size = 15.75
Charset = 204
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H000020FF&
Height = 375
Left = 8760
TabIndex = 5
Top = 5160
Visible = 0 'False
Width = 1950
End
Begin VB.Label lblMap
AutoSize = -1 'True
BackColor = &H00000000&
Caption = "Ðåäàêòîð êàðò"
BeginProperty Font
Name = "Georgia"
Size = 15.75
Charset = 204
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H000020FF&
Height = 375
Left = 8760
TabIndex = 4
Top = 6600
Width = 2760
End
Begin VB.Label lblLoadGame
AutoSize = -1 'True
BackColor = &H00000000&
Caption = "Çàãðóçèòü èãðó"
BeginProperty Font
Name = "Georgia"
Size = 15.75
Charset = 204
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H000020FF&
Height = 375
Left = 8760
TabIndex = 3
Top = 5880
Width = 2760
End
Begin VB.Label lblExit
AutoSize = -1 'True
BackColor = &H00000000&
Caption = "Âûõîä"
BeginProperty Font
Name = "Georgia"
Size = 15.75
Charset = 204
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H000020FF&
Height = 375
Left = 8760
TabIndex = 2
Top = 8040
Width = 1095
End
Begin VB.Label lblNastr
AutoSize = -1 'True
BackColor = &H00000000&
Caption = "Îïöèè"
BeginProperty Font
Name = "Georgia"
Size = 15.75
Charset = 204
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H000020FF&
Height = 375
Left = 8760
TabIndex = 1
Top = 7320
Width = 1095
End
Begin VB.Label lblGame
AutoSize = -1 'True
BackColor = &H00000000&
Caption = "Èãðàòü"
BeginProperty Font
Name = "Georgia"
Size = 15.75
Charset = 204
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H000020FF&
Height = 375
Left = 8760
TabIndex = 0
Top = 4440
Width = 1380
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function mciExecute _
Lib "winmm.dll" ( _
ByVal IpstrCommand As String _
) As Long
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Dim X As Long
Private Sub Form_Initialize()
Member.MServiseForm = frmMain
Member.GameDirectory = App.Path
Load.Load_GMotion
Company = "Office_Space"
Level = 1
Lifes = 3
Money = 99
End Sub
Private Sub lblGame_Click()
If lblGame.Caption = "Ïðîäîëæèòü" Then
'çàïóñê èãðû
SEvents.Game_Start True
OffSp.Show
Unload frmMain
Else
Level = 1
Company = "Office_Space"
Unload frmMain
OffSp.Load_Game
End If
End Sub
Private Sub lblNastr_Click()
frmOpt.Show vbModal
End Sub
Private Sub lblSave_Click()
SaveMode = True
frmMain.Hide
frmLoadGame.Show
frmLoadGame.lblNew.Visible = True
frmLoadGame.txtNew.Visible = True
End Sub
Private Sub lblLoadGame_Click()
SaveMode = False
frmLoadGame.Show
frmLoadGame.lblNew.Visible = False
frmLoadGame.txtNew.Visible = False
frmMain.Hide
End Sub
Private Sub lblMap_Click()
If lblGame.Caption = "Ïðîäîëæèòü" Then
Unload OffSp
lblGame.Caption = "Èãðàòü"
End If
Member.MServiseForm = frmMain
Map.Map_Editor
frmMain.Hide
End Sub
Private Sub lblExit_Click()
If lblGame.Caption = "Ïðîäîëæèòü" Then
Unload OffSp: lblGame.Caption = "Èãðàòü"
' ïîêàçûâàåì êóðñîð ìûøè
X = ShowCursor(True)
Else
Unload frmMain
End
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If lblGame.Caption = "Ïðîäîëæèòü" Then
lblSave.Visible = True
Else
lblSave.Visible = False
End If
X = X - 8760
Y = Y - 4440
If X < 0 Or Y < 0 Then Exit Sub
Y = Y \ 700
lblGame.ForeColor = frmMain.FillColor: lblGame.Font.Size = 16
lblSave.ForeColor = frmMain.FillColor: lblSave.Font.Size = 16
lblLoadGame.ForeColor = frmMain.FillColor: lblLoadGame.Font.Size = 16
lblMap.ForeColor = frmMain.FillColor: lblMap.Font.Size = 16
lblNastr.ForeColor = frmMain.FillColor: lblNastr.Font.Size = 16
lblExit.ForeColor = frmMain.FillColor: lblExit.Font.Size = 16
Select Case Y
Case 0: lblGame.ForeColor = frmMain.ForeColor: lblGame.Font.Size = 18
Case 1: lblSave.ForeColor = frmMain.ForeColor: lblSave.Font.Size = 18
Case 2: lblLoadGame.ForeColor = frmMain.ForeColor: lblLoadGame.Font.Size = 18
Case 3: lblMap.ForeColor = frmMain.ForeColor: lblMap.Font.Size = 18
Case 4: lblNastr.ForeColor = frmMain.ForeColor: lblNastr.Font.Size = 18
Case 5: lblExit.ForeColor = frmMain.ForeColor: lblExit.Font.Size = 18
End Select
End Sub