Ejemplo n.º 1
0
 // Constructor
 public Shops(ItemsEditor itemsEditor)
 {
     this.itemsEditor = itemsEditor;
     InitializeComponent();
     for (int i = 0; i < 15; i++)
     {
         this.shopItems[i]                       = new ComboBox();
         this.shopItems[i].BackColor             = System.Drawing.SystemColors.ControlDarkDark;
         this.shopItems[i].DrawMode              = System.Windows.Forms.DrawMode.OwnerDrawFixed;
         this.shopItems[i].DropDownHeight        = 317;
         this.shopItems[i].DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
         this.shopItems[i].IntegralHeight        = false;
         this.shopItems[i].ItemHeight            = 15;
         this.shopItems[i].Location              = new System.Drawing.Point(6, i * 21 + 20);
         this.shopItems[i].Name                  = "shopItem" + i;
         this.shopItems[i].Size                  = new System.Drawing.Size(173, 21);
         this.shopItems[i].TabIndex              = i;
         this.shopItems[i].Tag                   = i;
         this.shopItems[i].DrawItem             += new System.Windows.Forms.DrawItemEventHandler(this.itemName_DrawItem);
         this.shopItems[i].SelectedIndexChanged += new System.EventHandler(this.shopItem_SelectedIndexChanged);
         this.shopItems[i].Click                += new System.EventHandler(this.shopItem_Click);
         this.groupBoxItems.Controls.Add(this.shopItems[i]);
     }
     InitializeStrings();
     index = 0;
     RefreshShops();
     labelWindow = new EditLabel(shopName, null, "Shops", true);
     //
     this.History = new History(this, shopName, null);
 }
Ejemplo n.º 2
0
 // constructor
 public SampleEditor()
 {
     InitializeComponent();
     sampleName.Items.AddRange(Lists.Numerize(Lists.SampleNames));
     sampleRateName.SelectedIndex = 5;
     sampleName.SelectedIndex     = 0;
     if (settings.RememberLastIndex)
     {
         if (settings.LastAudioSample == 0)
         {
             wav  = BRR.BRRToWAV(sample.Sample, sample.Rate);
             loop = BRR.BRRToWAV(sample.Sample, sample.Rate, sample.LoopStart);
         }
         else
         {
             sampleNum.Value = settings.LastAudioSample;
         }
     }
     else
     {
         wav  = BRR.BRRToWAV(sample.Sample, sample.Rate);
         loop = BRR.BRRToWAV(sample.Sample, sample.Rate, sample.LoopStart);
     }
     searchWindow = new Search(sampleNum, searchBox, searchNames, sampleName.Items);
     labelWindow  = new EditLabel(sampleName, sampleNum, "Samples", true);
     //
     this.History = new History(this, sampleName, sampleNum);
 }
Ejemplo n.º 3
0
 // Main
 public Battlefields()
 {
     this.overlay = new Overlay();
     InitializeComponent();
     Do.AddShortcut(toolStrip3, Keys.Control | Keys.S, new EventHandler(save_Click));
     Do.AddShortcut(toolStrip3, Keys.F1, helpTips);
     Do.AddShortcut(toolStrip3, Keys.F2, baseConvertor);
     toolTip1.InitialDelay = 0;
     labelWindow           = new EditLabel(battlefieldName, battlefieldNum, "Battlefields", true);
     this.battlefieldName.Items.AddRange(Lists.Numerize(Lists.BattlefieldNames));
     this.battlefieldGFXSet1Name.Items.AddRange(Lists.Numerize(Lists.GraphicSetNames)); battlefieldGFXSet1Name.Items.Add("{NONE}");
     this.battlefieldGFXSet2Name.Items.AddRange(Lists.Numerize(Lists.GraphicSetNames)); battlefieldGFXSet2Name.Items.Add("{NONE}");
     this.battlefieldGFXSet3Name.Items.AddRange(Lists.Numerize(Lists.GraphicSetNames)); battlefieldGFXSet3Name.Items.Add("{NONE}");
     this.battlefieldGFXSet4Name.Items.AddRange(Lists.Numerize(Lists.GraphicSetNames)); battlefieldGFXSet4Name.Items.Add("{NONE}");
     this.battlefieldGFXSet5Name.Items.AddRange(Lists.Numerize(Lists.GraphicSetNames)); battlefieldGFXSet5Name.Items.Add("{NONE}");
     RefreshBattlefield();
     LoadPaletteEditor();
     LoadGraphicEditor();
     LoadTileEditor();
     new ToolTipLabel(this, baseConvertor, helpTips);
     this.History = new History(this, battlefieldName, battlefieldNum);
     if (settings.RememberLastIndex)
     {
         index = settings.LastBattlefield;
     }
     //
 }
Ejemplo n.º 4
0
 public Monsters()
 {
     InitializeComponent();
     Do.AddShortcut(toolStrip4, Keys.Control | Keys.S, new EventHandler(save_Click));
     Do.AddShortcut(toolStrip4, Keys.F1, helpTips);
     Do.AddShortcut(toolStrip4, Keys.F2, baseConvertor);
     labelWindow = new EditLabel(monsterName, monsterNum, "Monsters", false);
     // create editors
     battleScriptsEditor          = new BattleScripts(this);
     battleScriptsEditor.TopLevel = false;
     battleScriptsEditor.Dock     = DockStyle.Fill;
     //battleScriptsEditor.SetToolTips(toolTip1);
     hackingToolsWindow = new HackingTools(new Function(RefreshMonsterTab), monsterNum);
     panel1.Controls.Add(battleScriptsEditor);
     battleScriptsEditor.BringToFront();
     battleScriptsEditor.Visible = true;
     toolTip1.InitialDelay       = 0;
     InitializeStrings();
     RefreshMonsterTab();
     new ToolTipLabel(this, baseConvertor, helpTips);
     this.History = new History(this, monsterName, monsterNum);
     //
     if (settings.RememberLastIndex)
     {
         Index = settings.LastMonster;
     }
     //MessageBox.Show(battleScriptsEditor.Width + " x " + battleScriptsEditor.Height);
 }
Ejemplo n.º 5
0
 // main
 public WorldMaps()
 {
     fontPalettes[0] = new PaletteSet(Model.ROM, 0, 0x3DFEE0, 2, 16, 32);
     fontPalettes[1] = new PaletteSet(Model.ROM, 0, 0x3E2D55, 2, 16, 32);
     fontPalettes[2] = new PaletteSet(Model.ROM, 0, 0x01EF40, 2, 16, 32);
     for (int i = 0; i < fontDialogue.Length; i++)
     {
         fontDialogue[i] = new FontCharacter(i, FontType.Dialogue);
     }
     InitializeComponent();
     this.worldMapName.Items.AddRange(Lists.Numerize(Lists.WorldMapNames));
     this.music.Items.AddRange(Lists.Numerize(Lists.MusicNames));
     this.music.SelectedIndex = Model.ROM[0x037DCF];
     Do.AddShortcut(toolStrip3, Keys.Control | Keys.S, new EventHandler(save_Click));
     Do.AddShortcut(toolStrip3, Keys.F1, helpTips);
     Do.AddShortcut(toolStrip3, Keys.F2, baseConvertor);
     toolTip1.InitialDelay = 0;
     labelWindow           = new EditLabel(worldMapName, null, "World Maps", true);
     InitializeLocationsEditor();
     worldMapName.SelectedIndex = 0;
     //LoadPaletteEditor();
     //LoadGraphicEditor();
     //LoadLogoPaletteEditor();
     //LoadLogoGraphicEditor();
     LoadTileEditor();
     new ToolTipLabel(this, baseConvertor, helpTips);
     this.History = new History(this, worldMapName, null);
 }
Ejemplo n.º 6
0
 // constructor
 public Spells()
 {
     InitializeComponent();
     InitializeStrings();
     RefreshSpells();
     labelWindow = new EditLabel(spellName, spellNum, "Spells", false);
     //
     this.History = new History(this, spellName, spellNum);
 }
 // constructor
 public FormationPacks(Formations formationsEditor)
 {
     this.formationsEditor = formationsEditor;
     InitializeComponent();
     searchWindow = new Search(packNum, searchBox, searchFormationPacks, new Function(LoadSearch), "treeView");
     labelWindow  = new EditLabel(null, packNum, "Packs", false);
     RefreshFormationPacks();
     //
     this.History = new History(this, null, packNum);
 }
Ejemplo n.º 8
0
 // constructor
 public Items(Shops shopsEditor)
 {
     this.shopsEditor = shopsEditor;
     InitializeComponent();
     itemName.BackgroundImage = Model.MenuBG;
     labelWindow = new EditLabel(itemName, itemNum, "Items", false);
     InitializeStrings();
     RefreshItems();
     if (settings.RememberLastIndex)
     {
         index = settings.LastItem;
     }
     //
     this.History = new History(this, itemName, itemNum);
 }
Ejemplo n.º 9
0
 // Constructor
 public Formations()
 {
     this.overlay       = new Overlay();
     Model.MonsterNames = new SortedList(monsters);
     Model.MonsterNames.SortAlphabetically();
     InitializeComponent();
     SetControls();
     searchWindow = new Search(formationNum, searchBox, searchFormationNames, formationNameList.Items);
     labelWindow  = new EditLabel(formationNameList, formationNum, "Formations", false);
     InitializeStrings();
     this.formationNameList.SelectedIndex = 0;
     battlefieldName.SelectedIndex        = 7;
     RefreshFormations();
     //
     this.History = new History(this, formationNameList, formationNum);
 }
Ejemplo n.º 10
0
 // special controls
 #endregion
 #region Functions
 // main
 public Effects()
 {
     // set data
     InitializeComponent();
     Do.AddShortcut(toolStrip2, Keys.Control | Keys.S, new EventHandler(save_Click));
     Do.AddShortcut(toolStrip2, Keys.F1, helpTips);
     Do.AddShortcut(toolStrip2, Keys.F2, baseConvertor);
     // tooltips
     toolTip1.InitialDelay = 0;
     searchWindow          = new Search(number, searchBox, searchEffectNames, name.Items);
     labelWindow           = new EditLabel(name, number, "Effects", true);
     // set control values
     this.Updating = true;
     this.animation.Tileset_tiles = new E_Tileset(animation, palette);
     this.name.Items.AddRange(Lists.Numerize(Lists.EffectNames));
     this.name.SelectedIndex = 0;
     foreach (E_Animation a in animations)
     {
         a.Tileset_tiles = new E_Tileset(a, 0);
         a.Assemble();
     }
     RefreshEffectsEditor();
     this.Updating = false;
     GC.Collect();
     // create editors
     molds.TopLevel = false;
     molds.Dock     = DockStyle.Fill;
     panelMolds.Controls.Add(molds);
     molds.BringToFront();
     openMolds.Checked  = true;
     molds.Visible      = true;
     sequences.TopLevel = false;
     sequences.Dock     = DockStyle.Fill;
     panelSequences.Controls.Add(sequences);
     sequences.SendToBack();
     openSequences.Checked = true;
     sequences.Visible     = true;
     new ToolTipLabel(this, baseConvertor, helpTips);
     //
     this.History = new History(this, name, number);
     if (settings.RememberLastIndex)
     {
         index = settings.LastEffect;
     }
 }
Ejemplo n.º 11
0
 // special controls
 #endregion
 #region Methods
 // main
 public Sprites()
 {
     InitializeComponent();
     Do.AddShortcut(toolStrip3, Keys.Control | Keys.S, new EventHandler(save_Click));
     Do.AddShortcut(toolStrip3, Keys.F1, helpTips);
     Do.AddShortcut(toolStrip3, Keys.F2, baseConvertor);
     toolTip1.InitialDelay = 0;
     searchWindow          = new Search(number, searchBox, searchEffectNames, name.Items);
     labelWindow           = new EditLabel(name, number, "Sprites", true);
     // set data
     this.rom        = Model.ROM;
     this.sprites    = Model.Sprites;
     this.animations = Model.Animations;
     this.palettes   = Model.SpritePalettes;
     this.images     = Model.GraphicPalettes;
     this.overlay    = new Overlay();
     graphics        = image.Graphics(spriteGraphics);
     // controls
     this.Updating = true;
     for (int i = 0; i < Lists.SpriteNames.Length; i++)
     {
         string itemName = Lists.SpriteNames[i];
         if (i >= 256 && i <= 511)
         {
             string monsterName = Do.RawToASCII(Model.Monsters[i - 256].Name, Lists.KeystrokesMenu);
             if (monsterName.Trim() != "")
             {
                 itemName = Lists.ToTitleCase(monsterName);
             }
         }
         name.Items.Add(Lists.Numerize(itemName, i, 4));
     }
     if (settings.RememberLastIndex)
     {
         name.SelectedIndex = settings.LastSprite;
         number.Value       = settings.LastSprite;
     }
     else
     {
         name.SelectedIndex = 0;
     }
     foreach (Animation a in animations)
     {
         a.Assemble();
     }
     RefreshSpritesEditor();
     this.Updating = false;
     GC.Collect();
     // editors
     molds.TopLevel = false;
     molds.Dock     = DockStyle.Fill;
     panelMolds.Controls.Add(molds);
     molds.BringToFront();
     openMolds.Checked  = true;
     molds.Visible      = true;
     sequences.TopLevel = false;
     sequences.Dock     = DockStyle.Fill;
     panelSequences.Controls.Add(sequences);
     sequences.SendToBack();
     openSequences.Checked = true;
     sequences.Visible     = true;
     new ToolTipLabel(this, baseConvertor, helpTips);
     //
     this.History = new History(this, name, number);
 }