-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrmStation.frm
719 lines (682 loc) · 24.6 KB
/
frmStation.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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
VERSION 5.00
Object = "{956B5A46-C53F-45A7-AF0E-EC2E1CC9B567}#1.5#0"; "TrackBarCtlU.ocx"
Begin VB.Form frmStation
BorderStyle = 3 'Fixed Dialog
Caption = "Stations"
ClientHeight = 5865
ClientLeft = 45
ClientTop = 435
ClientWidth = 7215
Icon = "frmStation.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5865
ScaleWidth = 7215
ShowInTaskbar = 0 'False
Begin VB.Frame frmDta
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Index = 3
Left = 3480
TabIndex = 16
Top = 5040
Width = 3615
Begin VB.CommandButton cmdRemStop
Caption = "Add &Rem. Part"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1560
TabIndex = 17
Top = 240
Width = 1335
End
Begin VB.CommandButton cmdAddHouse
Caption = "Add &Buildings"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 18
Top = 240
Width = 1335
End
End
Begin VB.Frame Frame2
Caption = "&Stations"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5655
Left = 0
TabIndex = 0
Top = 120
Width = 3375
Begin VB.ListBox lstStation
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4935
Left = 120
Sorted = -1 'True
TabIndex = 2
Top = 600
Width = 3135
End
Begin VB.ComboBox cmbShowO
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 120
Style = 2 'Dropdown List
TabIndex = 1
Top = 240
Width = 1575
End
End
Begin VB.Frame frmDta
Caption = "Owner"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Index = 2
Left = 5280
TabIndex = 14
Top = 120
Width = 1815
Begin VB.TextBox txtOwner
Enabled = 0 'False
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 120
TabIndex = 15
Top = 240
Width = 1575
End
End
Begin VB.Frame frmDta
Caption = "&Cargo"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4095
Index = 1
Left = 3480
TabIndex = 8
Top = 840
Width = 3615
Begin TrackBarCtlLibUCtl.TrackBar sliCrate
Height = 255
Index = 0
Left = 1440
TabIndex = 11
Top = 360
Width = 1200
_cx = 2117
_cy = 450
Appearance = 0
AutoTickFrequency= 26
AutoTickMarks = -1 'True
BackColor = -2147483633
BackgroundDrawMode= 0
BorderStyle = 0
CurrentPosition = 0
DetectDoubleClicks= -1 'True
DisabledEvents = 779
DontRedraw = 0 'False
DownIsLeft = -1 'True
Enabled = -1 'True
HoverTime = -1
LargeStepWidth = 26
Maximum = 255
Minimum = 0
MousePointer = 0
Orientation = 0
ProcessContextMenuKeys= -1 'True
RangeSelectionEnd= 0
RangeSelectionStart= 0
RegisterForOLEDragDrop= 0 'False
Reversed = 0 'False
RightToLeftLayout= 0 'False
SelectionType = 0
ShowSlider = -1 'True
SliderLength = -1
SmallStepWidth = 1
SupportOLEDragImages= -1 'True
TickMarksPosition= 1
ToolTipPosition = 2
End
Begin VB.TextBox txtCam
Alignment = 1 'Right Justify
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Index = 0
Left = 2640
TabIndex = 13
Top = 360
Width = 855
End
Begin VB.CheckBox chkChasrate
Caption = "Check1"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 120
TabIndex = 12
Top = 375
Width = 1335
End
Begin VB.Label Label4
Caption = "Amount:"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2640
TabIndex = 10
Top = 120
Width = 855
End
Begin VB.Label Label3
Caption = "Rating:"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1560
TabIndex = 9
Top = 120
Width = 615
End
End
Begin VB.Frame frmDta
Caption = "Location (Sign)"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Index = 0
Left = 3480
TabIndex = 3
Top = 120
Width = 1815
Begin VB.TextBox txtX
Alignment = 1 'Right Justify
Enabled = 0 'False
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 360
TabIndex = 4
Top = 240
Width = 495
End
Begin VB.TextBox txtY
Alignment = 1 'Right Justify
Enabled = 0 'False
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 1200
TabIndex = 5
Top = 240
Width = 495
End
Begin VB.Label Label1
Caption = "X:"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 6
Top = 285
Width = 255
End
Begin VB.Label Label2
Caption = "Y:"
BeginProperty Font
Name = "Microsoft Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 960
TabIndex = 7
Top = 285
Width = 255
End
End
End
Attribute VB_Name = "frmStation"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private CurItmNo As Integer, CurItm As TTDXStation
Implements ISubclassedWindow
Private Sub Subclass()
Dim i As Integer
If Not SubclassWindow(Me.hwnd, Me, EnumSubclassID.escidStation) Then
Debug.Print "Subclassing failed!"
End If
' tell the controls to negotiate the correct format with the form
For i = 0 To 11
SendMessageAsLong sliCrate(i).hwnd, WM_NOTIFYFORMAT, Me.hwnd, NF_REQUERY
Next i
End Sub
Private Function ISubclassedWindow_HandleMessage(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal eSubclassID As EnumSubclassID, bCallDefProc As Boolean) As Long
Dim lRet As Long
On Error GoTo StdHandler_End
If eSubclassID = EnumSubclassID.escidCity Then
lRet = HandleMessage_Form(hwnd, uMsg, wParam, lParam, bCallDefProc)
End If
StdHandler_End:
ISubclassedWindow_HandleMessage = lRet
End Function
Private Function HandleMessage_Form(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long, bCallDefProc As Boolean) As Long
Dim lRet As Long
On Error GoTo StdHandler_End
If uMsg = WM_NOTIFYFORMAT Then
' give the control a chance to request Unicode notifications
lRet = SendMessageAsLong(wParam, OCM__BASE + uMsg, wParam, lParam)
bCallDefProc = False
End If
StdHandler_End:
HandleMessage_Form = lRet
End Function
Public Sub UpdateInfo()
Dim Wa As Integer, Wb As Integer, Wsa As String, Wv As TTDXplayer
CurItmNo = -1
If CurFile > " " Then
Wb = chkChasrate(0).Top
cmbShowO.Clear
cmbShowO.AddItem "<All>"
cmbShowO.ItemData(cmbShowO.NewIndex) = 255
cmbShowO.AddItem "<No One>"
cmbShowO.ItemData(cmbShowO.NewIndex) = &H10
For Wa = 0 To 7
Wv = TTDXPlayerInfo(Wa)
If Wv.Id > 0 Then
cmbShowO.AddItem "Player " + Format(Wa + 1)
cmbShowO.ItemData(cmbShowO.NewIndex) = Wa
End If
Next Wa
For Wa = 0 To 11
If CargoTypes(Wa) > "<z" Then
sliCrate(Wa).Top = Wb: sliCrate(Wa).Visible = True
txtCam(Wa).Top = Wb - 15: txtCam(Wa).Visible = True
chkChasrate(Wa).Top = Wb: Wb = Wb + 300
chkChasrate(Wa).Visible = True
chkChasrate(Wa).Caption = CargoTypesAccel(Wa)
chkChasrate(Wa).Value = 0: sliCrate(Wa).CurrentPosition = 0: txtCam(Wa).Text = ""
Else
sliCrate(Wa).Visible = False
txtCam(Wa).Visible = False
chkChasrate(Wa).Visible = False
End If
Next Wa
Frame2.Enabled = True
cmbShowO.ListIndex = 0
Else
Frame2.Enabled = False
For Wa = 0 To 11: chkChasrate(Wa).Visible = False: sliCrate(Wa).Visible = False: txtCam(Wa).Visible = False: Next Wa
End If
ShowList
End Sub
Public Sub PrepSave()
If CurItmNo > -1 Then TTDXStationPut CurItm
End Sub
Private Sub ShowList()
Dim Wa As Integer, wXa As TTDXStation
lstStation.Clear
If CurFile > " " Then
For Wa = 0 To 249
wXa = TTDXStationInfo(Wa)
If wXa.BaseX > 0 Then
If (cmbShowO.ItemData(cmbShowO.ListIndex) = wXa.Owner) Or (cmbShowO.ListIndex = 0) Then
lstStation.AddItem wXa.Name
lstStation.ItemData(lstStation.NewIndex) = Wa
End If
End If
Next Wa
End If
For Wa = 0 To frmDta.UBound: frmDta(Wa).Enabled = False: Next Wa
CurItmNo = lstStation.ListIndex
End Sub
Private Sub chkChasrate_Click(Index As Integer)
If chkChasrate(Index).Value = 1 Then
sliCrate(Index).Enabled = True: sliCrate(Index).CurrentPosition = CurItm.CRate(Index)
txtCam(Index).Enabled = True: txtCam(Index).Text = Format(CurItm.Cargo(Index))
CurItm.CEnrout(Index) = CurItm.CEnroutOrg(Index)
Else
sliCrate(Index).Enabled = False: sliCrate(Index).CurrentPosition = 0
txtCam(Index).Enabled = False: txtCam(Index).Text = ""
CurItm.CEnrout(Index) = 255
End If
MarkGame 8
End Sub
Private Sub cmbShowO_Click()
ShowList
End Sub
Private Sub cmdAddHouse_Click()
Dim Wx As Integer, Wy As Integer, Wva As TTDXlandscape, Wc As Long
If CurItmNo > -1 Then
With CurItm
Wc = 0
If .RailDir Then
Wc = Wc + DoAddBuild(.RailX, .RailY, .RailTrackLen, .RailTracks)
Else
Wc = Wc + DoAddBuild(.RailX, .RailY, .RailTracks, .RailTrackLen)
End If
Select Case .AirportType
Case 0: Wc = Wc + DoAddBuild(.AirX, .AirY, 4, 3)
Case 1: Wc = Wc + DoAddBuild(.AirX, .AirY, 6, 6)
Case 2: Wc = Wc + DoAddBuild(.AirX, .AirY, 1, 1)
End Select
Wc = Wc + DoAddBuild(.BusX, .BusY, 1, 1)
Wc = Wc + DoAddBuild(.TruckX, .TruckY, 1, 1)
Wc = Wc + DoAddBuild(.DockX, .DockY, 2, 2)
End With
Wc = MsgBox(Format(Wc) + " buildings added.")
MarkGame 8
End If
End Sub
Private Function DoAddBuild(vX As Byte, vY As Byte, vW As Byte, vH As Byte) As Long
Dim Wx As Integer, Wy As Integer, Wc As Long, Wva As TTDXlandscape
DoAddBuild = 0
If vX < 1 Then Exit Function
For Wx = vX - 1 To vX + vW
For Wy = vY - 1 To vY + vH
Wva = TTDXgetLandscape(Wx, Wy)
If Wva.Object = 0 Then
Wva.Object = 3: Wva.Owner = 0
Select Case CInt(Rnd * 6)
Case 0: Wva.L2 = &HA
Case 1: Wva.L2 = &H4
Case 2: Wva.L2 = &H11
Case 3: Wva.L2 = &H1E
Case 4: Wva.L2 = &H24
Case Else: Wva.L2 = &H1C
End Select
Wva.L5 = 1: Wva.L3 = &H40
Wc = Wc + 1
TTDXputLandscape Wva
End If
Next Wy
Next Wx
For Wx = vX - 2 To vX + vW + 1
For Wy = vY - 2 To vY + vH + 1
Wva = TTDXgetLandscape(Wx, Wy)
If Wva.Object = 0 Then
Wva.Object = 3: Wva.Owner = 0
Select Case CInt(Rnd * 5)
Case 0: Wva.L2 = &H9
Case 1: Wva.L2 = &H2
Case 2: Wva.L2 = &H3
Case 3: Wva.L2 = &H12
Case Else: Wva.L2 = &H1B
End Select
Wva.L5 = 1: Wva.L3 = &H40
Wc = Wc + 1
TTDXputLandscape Wva
End If
Next Wy
Next Wx
For Wx = vX - 4 To vX + vW + 3
For Wy = vY - 4 To vY + vH + 3
Wva = TTDXgetLandscape(Wx, Wy)
If Wva.Object = 0 Then
Wva.Object = 3: Wva.Owner = 0
Select Case CInt(Rnd * 5)
Case 0: Wva.L2 = &H2
Case 1: Wva.L2 = &H1A
Case Else: Wva.L2 = &H6
End Select
Wva.L3 = &H40
Wva.L5 = 1
Wc = Wc + 1
TTDXputLandscape Wva
End If
Next Wy
Next Wx
DoAddBuild = Wc
End Function
Private Sub cmdRemStop_Click()
Dim Wx As Integer, Wy As Integer, Wva As TTDXlandscape, Wc As Long, Wfa As Boolean
If CurItmNo > -1 Then
With CurItm
If .BusX > 0 And .TruckX > 0 Then
Wc = MsgBox("Bus and truck stop already present.")
Else
Wfa = False
If .RailDir Then
Wfa = AddRem(.RailX, .RailY, .RailTrackLen, .RailTracks)
Else
Wfa = AddRem(.RailX, .RailY, .RailTracks, .RailTrackLen)
End If
Select Case .AirportType
Case 0: Wfa = Wfa Or AddRem(.AirX, .AirY, 4, 3)
Case 1: Wfa = Wfa Or AddRem(.AirX, .AirY, 6, 6)
Case 2: Wfa = Wfa Or AddRem(.AirX, .AirY, 1, 1)
End Select
Wfa = Wfa Or AddRem(.BusX, .BusY, 1, 1)
Wfa = Wfa Or AddRem(.TruckX, .TruckY, 1, 1)
Wfa = Wfa Or AddRem(.DockX, .DockY, 2, 2)
If Wfa Then Wc = MsgBox("Station part(s) added.") Else: Wc = MsgBox("No new locations found.")
MarkGame 8
End If
End With
End If
End Sub
Private Function AddRem(vX As Byte, vY As Byte, vW As Byte, vH As Byte) As Boolean
Dim Wx As Integer, Wy As Integer, Wc As Long, Wva As TTDXlandscape
AddRem = False
If vX < 1 Then Exit Function
For Wx = vX - 4 To vX + vW + 3
For Wy = vY - 4 To vY + vH + 3
Wva = TTDXgetLandscape(Wx, Wy)
If Wva.Object = 1 And Wva.Owner = CurItm.Owner Then
If Wva.L5 = &H3F Then
If CurItm.BusX = 0 Then
Wva.Object = 5: Wva.L2 = CurItm.Number: Wva.L5 = &H47: Wva.L3 = 0
CurItm.BusX = Wva.X: CurItm.BusY = Wva.Y
CurItm.BusStatus = 3
CurItm.Parts = CurItm.Parts Or 4
ElseIf CurItm.TruckX = 0 Then
Wva.Object = 5: Wva.L2 = CurItm.Number: Wva.L5 = &H43: Wva.L3 = 0
CurItm.Parts = CurItm.Parts Or 2
CurItm.TruckX = Wva.X: CurItm.TruckY = Wva.Y
End If
AddRem = True
TTDXputLandscape Wva
End If
End If
Next Wy
Next Wx
End Function
Private Sub Form_KeyUp(KeyCode As Integer, shift As Integer)
'If Shift = 0 Then
' If KeyCode = vbKeyF1 Then ViewFile Me, App.Path + "/docs/3e.html"
'End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
PrepSave
UnSubclassWindow Me.hwnd, EnumSubclassID.escidStation
End Sub
Private Sub lstStation_Click()
Dim Wa As Integer, Wb As Integer
If CurItmNo > -1 Then TTDXStationPut CurItm
Wb = lstStation.ItemData(lstStation.ListIndex)
CurItm = TTDXStationInfo(Wb)
CurItmNo = Wb
UpdateFields
For Wa = 0 To frmDta.UBound: frmDta(Wa).Enabled = True: Next Wa
End Sub
Private Sub UpdateFields()
Dim Wa As Integer, Wb As Integer
txtX.Text = CurItm.BaseX
txtY.Text = CurItm.BaseY
For Wa = 0 To 11
If CurItm.CEnrout(Wa) = 255 Then chkChasrate(Wa).Value = 0 Else: chkChasrate(Wa).Value = 1
chkChasrate_Click Wa
Next Wa
If CurItm.Owner = &H10 Then
txtOwner.Text = "<No One>"
Else
txtOwner.Text = "Player " + Format(CurItm.Owner + 1)
End If
frmTechInfo.ShowInfo 4, CurItm.Name, CurItm.Offset
frmMap.SetHighlight CInt(CurItm.BaseX), CInt(CurItm.BaseY)
End Sub
Private Sub Form_Load()
Dim Wa As Integer, Wb As Integer
For Wa = 1 To 11
Load chkChasrate(Wa)
Load sliCrate(Wa)
Load txtCam(Wa)
Next Wa
Subclass
UpdateInfo
End Sub
Private Sub sliCrate_PositionChanged(Index As Integer, ByVal changeType As TrackBarCtlLibUCtl.PositionChangeTypeConstants, ByVal newPosition As Long)
CurItm.CRate(Index) = newPosition
MarkGame 8
End Sub
Private Sub txtCam_Change(Index As Integer)
If txtCam(Index).Enabled Then
If jBetween(-1, Val(txtCam(Index).Text), 4096) Then
CurItm.Cargo(Index) = Val(txtCam(Index))
Else
txtCam(Index) = CStr(CurItm.Cargo(Index))
End If
End If
MarkGame 8
End Sub
Private Sub txtCam_KeyPress(Index As Integer, KeyAscii As Integer)
KeyAscii = CheckNumInput("", KeyAscii)
End Sub