home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / jpi / spriteed.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-01-01  |  20.9 KB  |  626 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Sprite/Pic Editor"
  5.    ClientHeight    =   8415
  6.    ClientLeft      =   4200
  7.    ClientTop       =   480
  8.    ClientWidth     =   8070
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   8415
  13.    ScaleWidth      =   8070
  14.    Begin VB.ListBox List6 
  15.       Height          =   1035
  16.       Left            =   2880
  17.       TabIndex        =   34
  18.       Top             =   5160
  19.       Width           =   2535
  20.    End
  21.    Begin VB.TextBox Text9 
  22.       Height          =   285
  23.       Left            =   360
  24.       TabIndex        =   32
  25.       Top             =   8040
  26.       Width           =   2415
  27.    End
  28.    Begin VB.TextBox Text7 
  29.       Height          =   285
  30.       Left            =   360
  31.       TabIndex        =   30
  32.       Top             =   7680
  33.       Width           =   2415
  34.    End
  35.    Begin VB.TextBox Text8 
  36.       Height          =   285
  37.       Left            =   360
  38.       TabIndex        =   28
  39.       Top             =   7320
  40.       Width           =   2415
  41.    End
  42.    Begin VB.TextBox Text6 
  43.       Height          =   285
  44.       Left            =   360
  45.       TabIndex        =   26
  46.       Top             =   6960
  47.       Width           =   2415
  48.    End
  49.    Begin VB.TextBox Text5 
  50.       Height          =   285
  51.       Left            =   120
  52.       TabIndex        =   24
  53.       Top             =   6600
  54.       Width           =   2655
  55.    End
  56.    Begin VB.ListBox List5 
  57.       Height          =   1425
  58.       Left            =   120
  59.       TabIndex        =   23
  60.       Top             =   4800
  61.       Width           =   2655
  62.    End
  63.    Begin VB.ListBox List4 
  64.       Height          =   645
  65.       Left            =   3000
  66.       TabIndex        =   22
  67.       Top             =   6720
  68.       Width           =   2415
  69.    End
  70.    Begin VB.TextBox Text4 
  71.       Height          =   285
  72.       Left            =   3000
  73.       TabIndex        =   19
  74.       Top             =   7800
  75.       Width           =   2415
  76.    End
  77.    Begin VB.TextBox Text3 
  78.       Height          =   285
  79.       Left            =   5520
  80.       TabIndex        =   17
  81.       Top             =   7800
  82.       Width           =   2415
  83.    End
  84.    Begin VB.ListBox List3 
  85.       Height          =   1425
  86.       Left            =   5520
  87.       TabIndex        =   15
  88.       Top             =   6000
  89.       Width           =   2415
  90.    End
  91.    Begin VB.CheckBox Check1 
  92.       Caption         =   "Group Repeats"
  93.       Height          =   255
  94.       Left            =   5520
  95.       TabIndex        =   14
  96.       Top             =   5280
  97.       Width           =   2415
  98.    End
  99.    Begin VB.TextBox Text2 
  100.       Height          =   285
  101.       Left            =   5520
  102.       TabIndex        =   11
  103.       Top             =   4920
  104.       Width           =   2415
  105.    End
  106.    Begin VB.ListBox List2 
  107.       Height          =   1425
  108.       Left            =   5520
  109.       TabIndex        =   10
  110.       Top             =   3120
  111.       Width           =   2415
  112.    End
  113.    Begin VB.TextBox Text1 
  114.       Height          =   285
  115.       Left            =   5520
  116.       TabIndex        =   8
  117.       Top             =   2280
  118.       Width           =   2415
  119.    End
  120.    Begin VB.ListBox List1 
  121.       Height          =   1425
  122.       Left            =   5520
  123.       TabIndex        =   4
  124.       Top             =   480
  125.       Width           =   2415
  126.    End
  127.    Begin VB.HScrollBar HScroll1 
  128.       Height          =   255
  129.       LargeChange     =   30
  130.       Left            =   120
  131.       SmallChange     =   10
  132.       TabIndex        =   3
  133.       Top             =   4440
  134.       Width           =   4935
  135.    End
  136.    Begin VB.VScrollBar VScroll1 
  137.       Height          =   3855
  138.       Left            =   5160
  139.       TabIndex        =   2
  140.       Top             =   480
  141.       Width           =   255
  142.    End
  143.    Begin VB.PictureBox Picture1 
  144.       Height          =   3855
  145.       Left            =   120
  146.       ScaleHeight     =   253
  147.       ScaleMode       =   3  'Pixel
  148.       ScaleWidth      =   325
  149.       TabIndex        =   0
  150.       Top             =   480
  151.       Width           =   4935
  152.       Begin VB.PictureBox Picture2 
  153.          Appearance      =   0  'Flat
  154.          AutoSize        =   -1  'True
  155.          BackColor       =   &H00000000&
  156.          BorderStyle     =   0  'None
  157.          ForeColor       =   &H80000008&
  158.          Height          =   15
  159.          Left            =   0
  160.          ScaleHeight     =   1
  161.          ScaleMode       =   3  'Pixel
  162.          ScaleWidth      =   1
  163.          TabIndex        =   1
  164.          Top             =   0
  165.          Width           =   15
  166.       End
  167.    End
  168.    Begin VB.Label Label14 
  169.       Caption         =   "Graphicslib"
  170.       Height          =   255
  171.       Left            =   2880
  172.       TabIndex        =   35
  173.       Top             =   4800
  174.       Width           =   1335
  175.    End
  176.    Begin VB.Line Line4 
  177.       X1              =   5400
  178.       X2              =   2880
  179.       Y1              =   6360
  180.       Y2              =   6360
  181.    End
  182.    Begin VB.Label Label13 
  183.       Caption         =   "H"
  184.       Height          =   255
  185.       Left            =   120
  186.       TabIndex        =   33
  187.       Top             =   8040
  188.       Width           =   255
  189.    End
  190.    Begin VB.Label Label11 
  191.       Caption         =   "W"
  192.       Height          =   255
  193.       Left            =   120
  194.       TabIndex        =   31
  195.       Top             =   7680
  196.       Width           =   255
  197.    End
  198.    Begin VB.Label Label12 
  199.       Caption         =   "Y"
  200.       Height          =   255
  201.       Left            =   120
  202.       TabIndex        =   29
  203.       Top             =   7320
  204.       Width           =   255
  205.    End
  206.    Begin VB.Label Label10 
  207.       Caption         =   "X"
  208.       Height          =   255
  209.       Left            =   120
  210.       TabIndex        =   27
  211.       Top             =   6960
  212.       Width           =   255
  213.    End
  214.    Begin VB.Label Label9 
  215.       Caption         =   "Picture Name"
  216.       Height          =   255
  217.       Left            =   120
  218.       TabIndex        =   25
  219.       Top             =   6360
  220.       Width           =   1335
  221.    End
  222.    Begin VB.Line Line3 
  223.       X1              =   2880
  224.       X2              =   2880
  225.       Y1              =   6360
  226.       Y2              =   8280
  227.    End
  228.    Begin VB.Label Label8 
  229.       Caption         =   "Picture"
  230.       Height          =   255
  231.       Left            =   3000
  232.       TabIndex        =   21
  233.       Top             =   6480
  234.       Width           =   1335
  235.    End
  236.    Begin VB.Label Label7 
  237.       Caption         =   "Duration"
  238.       Height          =   255
  239.       Left            =   3000
  240.       TabIndex        =   20
  241.       Top             =   7560
  242.       Width           =   2295
  243.    End
  244.    Begin VB.Label Label6 
  245.       Caption         =   "Name"
  246.       Height          =   255
  247.       Left            =   5520
  248.       TabIndex        =   18
  249.       Top             =   7560
  250.       Width           =   2295
  251.    End
  252.    Begin VB.Line Line2 
  253.       X1              =   5520
  254.       X2              =   7920
  255.       Y1              =   5640
  256.       Y2              =   5640
  257.    End
  258.    Begin VB.Label Label5 
  259.       Caption         =   "Frames"
  260.       Height          =   255
  261.       Left            =   5520
  262.       TabIndex        =   16
  263.       Top             =   5760
  264.       Width           =   2295
  265.    End
  266.    Begin VB.Line Line1 
  267.       X1              =   5520
  268.       X2              =   7920
  269.       Y1              =   2760
  270.       Y2              =   2760
  271.    End
  272.    Begin VB.Label Label4 
  273.       Caption         =   "Frame Groups"
  274.       Height          =   255
  275.       Left            =   5520
  276.       TabIndex        =   13
  277.       Top             =   2880
  278.       Width           =   2295
  279.    End
  280.    Begin VB.Label Label3 
  281.       Caption         =   "Name"
  282.       Height          =   255
  283.       Left            =   5520
  284.       TabIndex        =   12
  285.       Top             =   4680
  286.       Width           =   2295
  287.    End
  288.    Begin VB.Label Label2 
  289.       Caption         =   "Name"
  290.       Height          =   255
  291.       Left            =   5520
  292.       TabIndex        =   9
  293.       Top             =   2040
  294.       Width           =   2295
  295.    End
  296.    Begin VB.Shape Shape2 
  297.       Height          =   255
  298.       Left            =   5160
  299.       Top             =   120
  300.       Width           =   255
  301.    End
  302.    Begin VB.Label YLabel 
  303.       BackColor       =   &H00FFFFFF&
  304.       BorderStyle     =   1  'Fixed Single
  305.       Caption         =   "Y:"
  306.       Height          =   255
  307.       Left            =   2640
  308.       TabIndex        =   7
  309.       Top             =   120
  310.       Width           =   2415
  311.    End
  312.    Begin VB.Label XLabel 
  313.       BackColor       =   &H00FFFFFF&
  314.       BorderStyle     =   1  'Fixed Single
  315.       Caption         =   "X: "
  316.       Height          =   255
  317.       Left            =   120
  318.       TabIndex        =   6
  319.       Top             =   120
  320.       Width           =   2415
  321.    End
  322.    Begin VB.Shape Shape1 
  323.       Height          =   255
  324.       Left            =   5160
  325.       Top             =   4440
  326.       Width           =   255
  327.    End
  328.    Begin VB.Label Label1 
  329.       BackColor       =   &H00FFFFFF&
  330.       BorderStyle     =   1  'Fixed Single
  331.       Height          =   255
  332.       Left            =   5520
  333.       TabIndex        =   5
  334.       Top             =   120
  335.       Width           =   2415
  336.    End
  337. Attribute VB_Name = "Form1"
  338. Attribute VB_GlobalNameSpace = False
  339. Attribute VB_Creatable = False
  340. Attribute VB_PredeclaredId = True
  341. Attribute VB_Exposed = False
  342. Private Sub Check1_Click()
  343. If Form1.Check1.Value = 1 Then
  344.   cval = True
  345.   cval = False
  346. End If
  347. snum = Form1.List1.ListIndex
  348. gnum = Form1.List2.ListIndex
  349. Sprites(snum).SpriteFrameGroups(gnum).GroupRepeats = cval
  350. End Sub
  351. Private Sub Form_Load()
  352. Call LoadAll
  353. Form1.List1.AddItem "[NewSprite]"
  354. Form1.List2.AddItem "[NewGroup]"
  355. Form1.List3.AddItem "[NewFrame]"
  356. Form1.List5.AddItem "[NewPic]"
  357. Form1.List1.ListIndex = 0
  358. Form1.List2.ListIndex = 0
  359. Form1.List3.ListIndex = 0
  360. Form1.List6.ListIndex = -1
  361. Form1.List5.ListIndex = 0
  362. Call LoadGraphicLibs
  363. Call updateSpritenamelist
  364. Call UpdateLibList
  365. Call UpdatePicList
  366. Call updateSpritelist
  367. End Sub
  368. Private Sub Form_Unload(Cancel As Integer)
  369. Call SavePics
  370. Call SaveSprites
  371. End Sub
  372. Private Sub HScroll1_Change()
  373. Picture2.Left = -HScroll1.Value
  374. End Sub
  375. Private Sub List1_Click()
  376. Call UpdateSpriteProperties
  377. List2.ListIndex = 0
  378. List3.ListIndex = 0
  379. If List1.ListIndex <> 0 Then Call UpdateGroupList Else List2.Clear: List2.AddItem "[NewGroup]": List2.ListIndex = 0
  380. If List2.ListIndex <> 0 Then Call UpdateFrameList Else List3.Clear: List3.AddItem "[NewFrame]": List3.ListIndex = 0
  381. End Sub
  382. Private Sub List1_KeyUp(KeyCode As Integer, Shift As Integer)
  383. Select Case KeyCode
  384. Case 45 'insert
  385.   For i = SpriteMax + 1 To List1.ListIndex + 1 Step -1
  386.     Sprites(i).GroupMax = Sprites(i - 1).GroupMax
  387.     Sprites(i).SpriteName = Sprites(i - 1).SpriteName
  388.     For i2 = 1 To Sprites(i - 1).GroupMax
  389.       Sprites(i).SpriteFrameGroups(i2).FrameMax = Sprites(i - 1).SpriteFrameGroups(i2).FrameMax
  390.       Sprites(i).SpriteFrameGroups(i2).GroupRepeats = Sprites(i - 1).SpriteFrameGroups(i2).GroupRepeats
  391.       Sprites(i).SpriteFrameGroups(i2).SpriteGroupName = Sprites(i - 1).SpriteFrameGroups(i2).SpriteGroupName
  392.       For i3 = 1 To Sprites(i - 1).SpriteFrameGroups(i2).FrameMax
  393.         Sprites(i).SpriteFrameGroups(i2).SpriteFrames(i3).Duration = Sprites(i - 1).SpriteFrameGroups(i2).SpriteFrames(i3).Duration
  394.         Sprites(i).SpriteFrameGroups(i2).SpriteFrames(i3).FrameName = Sprites(i - 1).SpriteFrameGroups(i2).SpriteFrames(i3).FrameName
  395.         Sprites(i).SpriteFrameGroups(i2).SpriteFrames(i3).picname = Sprites(i - 1).SpriteFrameGroups(i2).SpriteFrames(i3).picname
  396.       Next i3
  397.     Next i2
  398.   Next i
  399.   SpriteMax = SpriteMax + 1
  400.   Call updateSpritelist
  401. Case 46 'delete
  402.   For i = List1.ListIndex To SpriteMax
  403.     Sprites(i).GroupMax = Sprites(i + 1).GroupMax
  404.     Sprites(i).SpriteName = Sprites(i + 1).SpriteName
  405.     For i2 = 1 To Sprites(i + 1).GroupMax
  406.       Sprites(i).SpriteFrameGroups(i2).FrameMax = Sprites(i + 1).SpriteFrameGroups(i2).FrameMax
  407.       Sprites(i).SpriteFrameGroups(i2).GroupRepeats = Sprites(i + 1).SpriteFrameGroups(i2).GroupRepeats
  408.       Sprites(i).SpriteFrameGroups(i2).SpriteGroupName = Sprites(i + 1).SpriteFrameGroups(i2).SpriteGroupName
  409.       For i3 = 1 To Sprites(i + 1).SpriteFrameGroups(i2).FrameMax
  410.         Sprites(i).SpriteFrameGroups(i2).SpriteFrames(i3).Duration = Sprites(i + 1).SpriteFrameGroups(i2).SpriteFrames(i3).Duration
  411.         Sprites(i).SpriteFrameGroups(i2).SpriteFrames(i3).FrameName = Sprites(i + 1).SpriteFrameGroups(i2).SpriteFrames(i3).FrameName
  412.         Sprites(i).SpriteFrameGroups(i2).SpriteFrames(i3).picname = Sprites(i + 1).SpriteFrameGroups(i2).SpriteFrames(i3).picname
  413.       Next i3
  414.     Next i2
  415.   Next i
  416.   SpriteMax = SpriteMax - 1
  417.   List1.ListIndex = List1.ListIndex - 1
  418.   Call updateSpritelist
  419. End Select
  420. End Sub
  421. Private Sub List2_Click()
  422. Call UpdateGroupProperties
  423. List3.ListIndex = 0
  424. If List2.ListIndex <> 0 Then Call UpdateFrameList Else List3.Clear: List3.AddItem "[NewFrame]": List3.ListIndex = 0
  425. End Sub
  426. Private Sub List2_KeyUp(KeyCode As Integer, Shift As Integer)
  427. snum = List1.ListIndex
  428. Select Case KeyCode
  429. Case 45 'insert
  430.   For i = Sprites(snum).GroupMax + 1 To List2.ListIndex + 1 Step -1
  431.     Sprites(snum).SpriteFrameGroups(i).FrameMax = Sprites(snum).SpriteFrameGroups(i - 1).FrameMax
  432.     Sprites(snum).SpriteFrameGroups(i).SpriteGroupName = Sprites(snum).SpriteFrameGroups(i - 1).SpriteGroupName
  433.     For i2 = 1 To Sprites(snum).SpriteFrameGroups(i).FrameMax
  434.       Sprites(snum).SpriteFrameGroups(i).SpriteFrames(i2).Duration = Sprites(snum).SpriteFrameGroups(i - 1).SpriteFrames(i2).Duration
  435.       Sprites(snum).SpriteFrameGroups(i).SpriteFrames(i2).FrameName = Sprites(snum).SpriteFrameGroups(i - 1).SpriteFrames(i2).FrameName
  436.       Sprites(snum).SpriteFrameGroups(i).SpriteFrames(i2).picname = Sprites(snum).SpriteFrameGroups(i - 1).SpriteFrames(i2).picname
  437.       Next i2
  438.   Next i
  439.   Sprites(snum).GroupMax = Sprites(snum).GroupMax + 1
  440.   Call UpdateGroupList
  441. Case 46 'delete
  442.   For i = List2.ListIndex To Sprites(snum).GroupMax
  443.     Sprites(snum).SpriteFrameGroups(i).FrameMax = Sprites(snum).SpriteFrameGroups(i + 1).FrameMax
  444.     Sprites(snum).SpriteFrameGroups(i).GroupRepeats = Sprites(snum).SpriteFrameGroups(i + 1).GroupRepeats
  445.     Sprites(snum).SpriteFrameGroups(i).SpriteGroupName = Sprites(snum).SpriteFrameGroups(i + 1).SpriteGroupName
  446.     For i2 = 1 To Sprites(snum).SpriteFrameGroups(i + 1).FrameMax
  447.       Sprites(snum).SpriteFrameGroups(i).SpriteFrames(i2).Duration = Sprites(snum).SpriteFrameGroups(i + 1).SpriteFrames(i2).Duration
  448.       Sprites(snum).SpriteFrameGroups(i).SpriteFrames(i2).FrameName = Sprites(snum).SpriteFrameGroups(i + 1).SpriteFrames(i2).FrameName
  449.       Sprites(snum).SpriteFrameGroups(i).SpriteFrames(i2).picname = Sprites(snum).SpriteFrameGroups(i + 1).SpriteFrames(i2).picname
  450.     Next i2
  451.   Next i
  452.   Sprites(snum).GroupMax = Sprites(snum).GroupMax - 1
  453.   List2.ListIndex = List2.ListIndex - 1
  454.   Call UpdateGroupList
  455. End Select
  456. End Sub
  457. Private Sub List3_Click()
  458. Call UpdateFrameProperties
  459. End Sub
  460. Private Sub List4_Click()
  461. Sprites(List1.ListIndex).SpriteFrameGroups(List2.ListIndex).SpriteFrames(List3.ListIndex).picname = List4.List(List4.ListIndex)
  462. End Sub
  463. Private Sub List5_Click()
  464. Call UpdatePicProperties
  465. Call LoadLibPic
  466. End Sub
  467. Private Sub List5_KeyUp(KeyCode As Integer, Shift As Integer)
  468. If KeyCode = 46 Then 'delete
  469.   found = False
  470.   For i = 1 To SpriteMax
  471.     For i2 = 1 To Sprites(i).GroupMax
  472.       For i3 = 1 To Sprites(i).SpriteFrameGroups(i2).FrameMax
  473.         If Sprites(i).SpriteFrameGroups(i2).SpriteFrames(i3).picname = List5.List(List5.ListIndex) Then found = True
  474.       Next i3
  475.     Next i2
  476.   Next i
  477.   If found = False Then
  478.     For i = List5.ListIndex To PicMax
  479.       Picz(i).GraphicsLib = Picz(i + 1).GraphicsLib
  480.       Picz(i).Height = Picz(i + 1).Height
  481.       Picz(i).Width = Picz(i + 1).Width
  482.       Picz(i).X = Picz(i + 1).X
  483.       Picz(i).Y = Picz(i + 1).Y
  484.       Picz(i).Masked = Picz(i + 1).Masked
  485.       Picz(i).picname = Picz(i + 1).picname
  486.     Next i
  487.     PicMax = PicMax - 1
  488.     List5.ListIndex = List5.ListIndex - 1
  489.     Call UpdatePicList
  490.     Call updateSpritenamelist
  491.   Else
  492.     Beep
  493.     MsgBox "This Picture is used by a Sprite and cannot be deleted."
  494.   End If
  495. End If
  496. End Sub
  497. Private Sub List6_Click()
  498. Picz(List5.ListIndex).GraphicsLib = List6.List(List6.ListIndex)
  499. Call LoadLibPic
  500. End Sub
  501. Private Sub Picture2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  502. Picz(Form1.List5.ListIndex).X = X
  503. Picz(Form1.List5.ListIndex).Y = Y
  504. Picz(Form1.List5.ListIndex).Width = 0
  505. Picz(Form1.List5.ListIndex).Height = 0
  506. Call UpdatePicProperties
  507. Call redrawpicview
  508. End Sub
  509. Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  510. If X < 0 Then X = 0
  511. If Y < 0 Then Y = 0
  512. Form1.XLabel.Caption = "X: " & X
  513. Form1.YLabel.Caption = "Y: " & Y
  514. If Button = 1 Then
  515.   Picz(Form1.List5.ListIndex).Width = X - Picz(Form1.List5.ListIndex).X
  516.   Picz(Form1.List5.ListIndex).Height = Y - Picz(Form1.List5.ListIndex).Y
  517.   Call UpdatePicProperties
  518.   Call redrawpicview
  519. End If
  520. End Sub
  521. Private Sub Picture2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  522. If Picz(Form1.List5.ListIndex).Width < 0 Then
  523.   TX = Picz(Form1.List5.ListIndex).X
  524.   tw = Picz(Form1.List5.ListIndex).Width
  525.   Picz(Form1.List5.ListIndex).X = TX + Picz(Form1.List5.ListIndex).Width
  526.   Picz(Form1.List5.ListIndex).Width = (tw + TX) - tw
  527. End If
  528. If Picz(Form1.List5.ListIndex).Height < 0 Then
  529.   Ty = Picz(Form1.List5.ListIndex).Y
  530.   Th = Picz(Form1.List5.ListIndex).Height
  531.   Picz(Form1.List5.ListIndex).Y = Ty + Picz(Form1.List5.ListIndex).Height
  532.   Picz(Form1.List5.ListIndex).Height = (Th + Ty) - Th
  533. End If
  534. Call UpdatePicProperties
  535. End Sub
  536. Private Sub Picture2_Paint()
  537. Call redrawpicview
  538. End Sub
  539. Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
  540. If List1.ListIndex = 0 Then
  541.   ttext = Form1.Text1.Text
  542.   SpriteMax = SpriteMax + 1
  543.   Call updateSpritelist
  544.   Call UpdateSpriteProperties
  545.   List1.ListIndex = SpriteMax
  546.   Form1.Text1.Text = ttext
  547.   Form1.Text1.SelStart = Len(Form1.Text1.Text)
  548. End If
  549. Sprites(List1.ListIndex).SpriteName = Text1.Text
  550. Call UpdateSpriteProperties
  551. Call updateSpritelist
  552. End Sub
  553. Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
  554. snum = List1.ListIndex
  555. If List2.ListIndex = 0 Then
  556.   ttext = Form1.Text2.Text
  557.   Sprites(snum).GroupMax = Sprites(snum).GroupMax + 1
  558.   Call UpdateGroupList
  559.   Call UpdateGroupProperties
  560.   List2.ListIndex = Sprites(snum).GroupMax
  561.   Form1.Text2.Text = ttext
  562.   Form1.Text2.SelStart = Len(Form1.Text2.Text)
  563. End If
  564. Sprites(snum).SpriteFrameGroups(Form1.List2.ListIndex).SpriteGroupName = Text2.Text
  565. Call UpdateGroupProperties
  566. Call UpdateGroupList
  567. End Sub
  568. Private Sub Text3_KeyUp(KeyCode As Integer, Shift As Integer)
  569. snum = List1.ListIndex
  570. gnum = List2.ListIndex
  571. fnum = List3.ListIndex
  572. If List3.ListIndex = 0 Then
  573.   ttext = Form1.Text3.Text
  574.   Sprites(snum).SpriteFrameGroups(gnum).FrameMax = Sprites(snum).SpriteFrameGroups(gnum).FrameMax + 1
  575.   fnum = Sprites(snum).SpriteFrameGroups(gnum).FrameMax
  576.   Call UpdateFrameList
  577.   Call UpdateFrameProperties
  578.   List3.ListIndex = Sprites(snum).SpriteFrameGroups(gnum).FrameMax
  579.   Form1.Text3.Text = ttext
  580.   Form1.Text3.SelStart = Len(Form1.Text3.Text)
  581. End If
  582. Sprites(snum).SpriteFrameGroups(gnum).SpriteFrames(fnum).FrameName = Text3.Text
  583. Call UpdateFrameProperties
  584. Call UpdateFrameList
  585. End Sub
  586. Private Sub Text4_KeyUp(KeyCode As Integer, Shift As Integer)
  587. Sprites(List1.ListIndex).SpriteFrameGroups(List2.ListIndex).SpriteFrames(List3.ListIndex).Duration = Val(Text4.Text)
  588. End Sub
  589. Private Sub Text5_KeyUp(KeyCode As Integer, Shift As Integer)
  590. snum = List5.ListIndex
  591. If List5.ListIndex = 0 Then
  592.   ttext = Form1.Text5.Text
  593.   PicMax = PicMax + 1
  594.   Call UpdatePicList
  595.   Call UpdatePicProperties
  596.   List5.ListIndex = PicMax
  597.   Form1.Text5.Text = ttext
  598.   Form1.Text5.SelStart = Len(Form1.Text5.Text)
  599.   Call LoadLibPic
  600.   Picz(List5.ListIndex).GraphicsLib = List6.List(List6.ListIndex)
  601. End If
  602. Picz(List5.ListIndex).picname = Text5.Text
  603. Call updateSpritenamelist
  604. Call UpdatePicProperties
  605. Call UpdatePicList
  606. End Sub
  607. Private Sub Text6_KeyUp(KeyCode As Integer, Shift As Integer)
  608. Picz(List5.ListIndex).X = Val(Text6.Text)
  609. Call redrawpicview
  610. End Sub
  611. Private Sub Text7_KeyUp(KeyCode As Integer, Shift As Integer)
  612. Picz(List5.ListIndex).Width = Val(Text7.Text)
  613. Call redrawpicview
  614. End Sub
  615. Private Sub Text8_KeyUp(KeyCode As Integer, Shift As Integer)
  616. Picz(List5.ListIndex).Y = Val(Text8.Text)
  617. Call redrawpicview
  618. End Sub
  619. Private Sub Text9_KeyUp(KeyCode As Integer, Shift As Integer)
  620. Picz(List5.ListIndex).Height = Val(Text9.Text)
  621. Call redrawpicview
  622. End Sub
  623. Private Sub VScroll1_Change()
  624. Picture2.Top = -VScroll1.Value
  625. End Sub
  626.