VERSION 5.00
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Begin VB.Form CustomPaletteEditor 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Custom Palette Editor"
   ClientHeight    =   6825
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6285
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   455
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   419
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   15
      Left            =   2400
      TabIndex        =   97
      Top             =   5880
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   15
      Left            =   4200
      TabIndex        =   96
      Top             =   5880
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   14
      Left            =   4200
      TabIndex        =   94
      Top             =   5520
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   14
      Left            =   2400
      TabIndex        =   93
      Top             =   5520
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   13
      Left            =   2400
      TabIndex        =   91
      Top             =   5160
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   13
      Left            =   4200
      TabIndex        =   90
      Top             =   5160
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   12
      Left            =   4200
      TabIndex        =   88
      Top             =   4800
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   12
      Left            =   2400
      TabIndex        =   87
      Top             =   4800
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   11
      Left            =   2400
      TabIndex        =   85
      Top             =   4440
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   11
      Left            =   4200
      TabIndex        =   84
      Top             =   4440
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   10
      Left            =   4200
      TabIndex        =   82
      Top             =   4080
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   10
      Left            =   2400
      TabIndex        =   81
      Top             =   4080
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   9
      Left            =   2400
      TabIndex        =   79
      Top             =   3720
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   9
      Left            =   4200
      TabIndex        =   78
      Top             =   3720
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   8
      Left            =   4200
      TabIndex        =   76
      Top             =   3360
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   8
      Left            =   2400
      TabIndex        =   75
      Top             =   3360
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   7
      Left            =   2400
      TabIndex        =   73
      Top             =   3000
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   7
      Left            =   4200
      TabIndex        =   72
      Top             =   3000
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   6
      Left            =   4200
      TabIndex        =   70
      Top             =   2640
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   6
      Left            =   2400
      TabIndex        =   69
      Top             =   2640
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   5
      Left            =   2400
      TabIndex        =   67
      Top             =   2280
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   5
      Left            =   4200
      TabIndex        =   66
      Top             =   2280
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   4
      Left            =   4200
      TabIndex        =   64
      Top             =   1920
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   4
      Left            =   2400
      TabIndex        =   63
      Top             =   1920
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   3
      Left            =   2400
      TabIndex        =   61
      Top             =   1560
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   3
      Left            =   4200
      TabIndex        =   60
      Top             =   1560
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   2
      Left            =   4200
      TabIndex        =   58
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   2
      Left            =   2400
      TabIndex        =   57
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   1
      Left            =   2400
      TabIndex        =   55
      Top             =   840
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   1
      Left            =   4200
      TabIndex        =   54
      Top             =   840
      Width           =   615
   End
   Begin VB.TextBox D3Color 
      Height          =   285
      Index           =   0
      Left            =   4200
      TabIndex        =   22
      Top             =   480
      Width           =   615
   End
   Begin VB.TextBox D2Color 
      Height          =   285
      Index           =   0
      Left            =   2400
      TabIndex        =   21
      Top             =   480
      Width           =   615
   End
   Begin VB.Label ST 
      Alignment       =   2  'Center
      Caption         =   "Palette at D0"
      Height          =   255
      Index           =   18
      Left            =   360
      TabIndex        =   100
      Top             =   120
      Width           =   1695
   End
   Begin VB.Label ST 
      Alignment       =   2  'Center
      Caption         =   "Palette at D3"
      Height          =   255
      Index           =   17
      Left            =   3960
      TabIndex        =   99
      Top             =   120
      Width           =   1695
   End
   Begin VB.Label ST 
      Alignment       =   2  'Center
      Caption         =   "Palette at D2"
      Height          =   255
      Index           =   16
      Left            =   2160
      TabIndex        =   98
      Top             =   120
      Width           =   1695
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   15
      Left            =   4920
      TabIndex        =   95
      Top             =   5880
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   14
      Left            =   4920
      TabIndex        =   92
      Top             =   5520
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   13
      Left            =   4920
      TabIndex        =   89
      Top             =   5160
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   12
      Left            =   4920
      TabIndex        =   86
      Top             =   4800
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   11
      Left            =   4920
      TabIndex        =   83
      Top             =   4440
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   10
      Left            =   4920
      TabIndex        =   80
      Top             =   4080
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   9
      Left            =   4920
      TabIndex        =   77
      Top             =   3720
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   8
      Left            =   4920
      TabIndex        =   74
      Top             =   3360
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   7
      Left            =   4920
      TabIndex        =   71
      Top             =   3000
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   6
      Left            =   4920
      TabIndex        =   68
      Top             =   2640
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   5
      Left            =   4920
      TabIndex        =   65
      Top             =   2280
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   4
      Left            =   4920
      TabIndex        =   62
      Top             =   1920
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   3
      Left            =   4920
      TabIndex        =   59
      Top             =   1560
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   2
      Left            =   4920
      TabIndex        =   56
      Top             =   1200
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   1
      Left            =   4920
      TabIndex        =   53
      Top             =   840
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   15
      Left            =   3120
      TabIndex        =   52
      Top             =   5880
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   14
      Left            =   3120
      TabIndex        =   51
      Top             =   5520
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   13
      Left            =   3120
      TabIndex        =   50
      Top             =   5160
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   12
      Left            =   3120
      TabIndex        =   49
      Top             =   4800
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   11
      Left            =   3120
      TabIndex        =   48
      Top             =   4440
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   10
      Left            =   3120
      TabIndex        =   47
      Top             =   4080
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   9
      Left            =   3120
      TabIndex        =   46
      Top             =   3720
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   8
      Left            =   3120
      TabIndex        =   45
      Top             =   3360
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   7
      Left            =   3120
      TabIndex        =   44
      Top             =   3000
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   6
      Left            =   3120
      TabIndex        =   43
      Top             =   2640
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   5
      Left            =   3120
      TabIndex        =   42
      Top             =   2280
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   4
      Left            =   3120
      TabIndex        =   41
      Top             =   1920
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   3
      Left            =   3120
      TabIndex        =   40
      Top             =   1560
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   2
      Left            =   3120
      TabIndex        =   39
      Top             =   1200
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   1
      Left            =   3120
      TabIndex        =   38
      Top             =   840
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   15
      Left            =   1320
      TabIndex        =   37
      Top             =   5880
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   14
      Left            =   1320
      TabIndex        =   36
      Top             =   5520
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   13
      Left            =   1320
      TabIndex        =   35
      Top             =   5160
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   12
      Left            =   1320
      TabIndex        =   34
      Top             =   4800
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   11
      Left            =   1320
      TabIndex        =   33
      Top             =   4440
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   10
      Left            =   1320
      TabIndex        =   32
      Top             =   4080
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   9
      Left            =   1320
      TabIndex        =   31
      Top             =   3720
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   8
      Left            =   1320
      TabIndex        =   30
      Top             =   3360
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   7
      Left            =   1320
      TabIndex        =   29
      Top             =   3000
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   6
      Left            =   1320
      TabIndex        =   28
      Top             =   2640
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   5
      Left            =   1320
      TabIndex        =   27
      Top             =   2280
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   4
      Left            =   1320
      TabIndex        =   26
      Top             =   1920
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   3
      Left            =   1320
      TabIndex        =   25
      Top             =   1560
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   2
      Left            =   1320
      TabIndex        =   24
      Top             =   1200
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   1
      Left            =   1320
      TabIndex        =   23
      Top             =   840
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D3ColorButton 
      Height          =   255
      Index           =   0
      Left            =   4920
      TabIndex        =   20
      Top             =   480
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton D2ColorButton 
      Height          =   255
      Index           =   0
      Left            =   3120
      TabIndex        =   19
      Top             =   480
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton MasterColorButton 
      Height          =   255
      Index           =   0
      Left            =   1320
      TabIndex        =   18
      Top             =   480
      Width           =   735
      BackColor       =   0
      Size            =   "1296;450"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #15:"
      Height          =   255
      Index           =   15
      Left            =   240
      TabIndex        =   17
      Top             =   5880
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #14:"
      Height          =   255
      Index           =   14
      Left            =   240
      TabIndex        =   16
      Top             =   5520
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #13:"
      Height          =   255
      Index           =   13
      Left            =   240
      TabIndex        =   15
      Top             =   5160
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #12:"
      Height          =   255
      Index           =   12
      Left            =   240
      TabIndex        =   14
      Top             =   4800
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #11:"
      Height          =   255
      Index           =   11
      Left            =   240
      TabIndex        =   13
      Top             =   4440
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #10:"
      Height          =   255
      Index           =   10
      Left            =   240
      TabIndex        =   12
      Top             =   4080
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #09:"
      Height          =   255
      Index           =   9
      Left            =   240
      TabIndex        =   11
      Top             =   3720
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #08:"
      Height          =   255
      Index           =   8
      Left            =   240
      TabIndex        =   10
      Top             =   3360
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #07:"
      Height          =   255
      Index           =   7
      Left            =   240
      TabIndex        =   9
      Top             =   3000
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #06:"
      Height          =   255
      Index           =   6
      Left            =   240
      TabIndex        =   8
      Top             =   2640
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #05:"
      Height          =   255
      Index           =   5
      Left            =   240
      TabIndex        =   7
      Top             =   2280
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #04:"
      Height          =   255
      Index           =   4
      Left            =   240
      TabIndex        =   6
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #03:"
      Height          =   255
      Index           =   3
      Left            =   240
      TabIndex        =   5
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #02:"
      Height          =   255
      Index           =   2
      Left            =   240
      TabIndex        =   4
      Top             =   1200
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #01:"
      Height          =   255
      Index           =   1
      Left            =   240
      TabIndex        =   3
      Top             =   840
      Width           =   975
   End
   Begin VB.Label ST 
      Alignment       =   1  'Right Justify
      Caption         =   "color #00:"
      Height          =   255
      Index           =   0
      Left            =   240
      TabIndex        =   2
      Top             =   480
      Width           =   975
   End
   Begin MSForms.CommandButton Cancel 
      Height          =   375
      Left            =   4800
      TabIndex        =   1
      Top             =   6360
      Width           =   1335
      Caption         =   "Cancel"
      Size            =   "2355;661"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton Ok 
      Default         =   -1  'True
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   6360
      Width           =   1335
      Caption         =   "Ok"
      Size            =   "2355;661"
      FontHeight      =   165
      FontCharSet     =   0
      FontPitchAndFamily=   2
      ParagraphAlign  =   3
   End
End
Attribute VB_Name = "CustomPaletteEditor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private d2palette(16) As Byte
Private d3palette(16) As Byte
Public selectedpalette As Integer
Public subchange As Boolean

Public returnDoorDecorationGraphicInfoEditor As DoorDecorationGraphicInfoEditor
Public returnWallDecorationGraphicInfoEditor As WallDecorationGraphicInfoEditor
Public returnCreatureGraphicInfoEditor As CreatureGraphicInfoEditor
Public returnFloorItemGraphicInfoEditor As FloorItemGraphicInfoEditor
Public returnTo As Integer

Function setd2palette(ByVal num As Integer, ByVal val As Byte)
    d2palette(num) = val
End Function
Function getd2palette(ByVal num As Integer) As Byte
    getd2palette = d2palette(num)
End Function
Function setd3palette(ByVal num As Integer, ByVal val As Byte)
    d3palette(num) = val
End Function
Function getd3palette(ByVal num As Integer) As Byte
    getd3palette = d3palette(num)
End Function

Public Function init()
    Dim i, j As Integer
        
    For i = 0 To 15
        'MasterColorButton(i - 1).ForeColor = graphics.color(i)
        'MasterColorButton(i - 1).BackColor = graphics.color(i)
        'D2ColorButton(i - 1).ForeColor = graphics.color((d2palette(i) / 10) + 1)
        'D2ColorButton(i - 1).BackColor = graphics.color((d2palette(i) / 10) + 1)
        MasterColorButton(i).ForeColor = graphics.getpalette(graphics.gPALETTE_MAIN, i)
        MasterColorButton(i).BackColor = graphics.getpalette(graphics.gPALETTE_MAIN, i)
        D2ColorButton(i).ForeColor = graphics.getpalette(graphics.gPALETTE_MAIN, d2palette(i + 1) / 10)
        D2ColorButton(i).BackColor = graphics.getpalette(graphics.gPALETTE_MAIN, d2palette(i + 1) / 10)
        D2Color(i).Text = Str(d2palette(i + 1))
        D3ColorButton(i).ForeColor = graphics.getpalette(graphics.gPALETTE_MAIN, d2palette(i + 1) / 10)
        D3ColorButton(i).BackColor = graphics.getpalette(graphics.gPALETTE_MAIN, d3palette(i + 1) / 10)
        D3Color(i).Text = Str(d3palette(i + 1))
    Next
End Function

Private Sub Cancel_Click()
    unload Me
    
End Sub

Private Sub D2Color_Change(Index As Integer)
    If subchange = True Then
        Exit Sub
    End If
    subchange = True
    d2palette(Index + 1) = App.EFChange8(D2Color(Index), 0, 159)
    'D2ColorButton(Index).ForeColor = graphics.color((d2palette(Index + 1) / 10) + 1)
    'D2ColorButton(Index).BackColor = graphics.color((d2palette(Index + 1) / 10) + 1)
    D2ColorButton(Index).ForeColor = graphics.getpalette(graphics.gPALETTE_MAIN, d2palette(Index + 1) / 10)
    D2ColorButton(Index).BackColor = graphics.getpalette(graphics.gPALETTE_MAIN, d2palette(Index + 1) / 10)
    
    subchange = False
End Sub
Private Sub d3Color_Change(Index As Integer)
    If subchange = True Then
        Exit Sub
    End If
    subchange = True
    d3palette(Index + 1) = App.EFChange8(D3Color(Index), 0, 159)
    'D3ColorButton(Index).ForeColor = graphics.color((d3palette(Index + 1) / 10) + 1)
    'D3ColorButton(Index).BackColor = graphics.color((d3palette(Index + 1) / 10) + 1)

    D3ColorButton(Index).ForeColor = graphics.getpalette(graphics.gPALETTE_MAIN, d3palette(Index + 1) / 10)
    D3ColorButton(Index).BackColor = graphics.getpalette(graphics.gPALETTE_MAIN, d3palette(Index + 1) / 10)
    subchange = False
End Sub

Private Sub Ok_Click()
    
    If returnTo = 1 Then
        returnDoorDecorationGraphicInfoEditor.returnCustomPaletteEditor Me
    ElseIf returnTo = 2 Then
        returnWallDecorationGraphicInfoEditor.returnCustomPaletteEditor Me
    ElseIf returnTo = 3 Then
        returnCreatureGraphicInfoEditor.returnCustomPaletteEditor Me
    ElseIf returnTo = 4 Then
        returnFloorItemGraphicInfoEditor.returnCustomPaletteEditor Me
    End If
    unload Me
End Sub


