예제 #1
0
 private void PictureBattlerDoubleClick(object sender, EventArgs e)
 {
     using (var dialog =
         new ImageSelectionForm(@"Battlers", this._enemy.battler_name))
     {
         dialog.Hue = this._enemy.battler_hue;
         if (dialog.ShowDialog(this) == DialogResult.OK)
         {
             this._enemy.battler_name = dialog.ImageName;
             this._enemy.battler_hue = dialog.Hue;
             this.pictureBattler.Image =
                 Cache.Battler(this._enemy.battler_name, this._enemy.battler_hue);
         }
     }
 }
예제 #2
0
 private void ButtonIconClick(object sender, EventArgs e)
 {
     using (var dialog = new ImageSelectionForm(@"Icons", this._item.icon_name))
     {
         if (dialog.ShowDialog(this) != DialogResult.OK) return;
         this._item.icon_name = dialog.ImageName;
         this.RefreshIcon();
     }
 }
예제 #3
0
 private void TextBoxPanoramaOnButtonClick(object sender, EventArgs e)
 {
     using (var dialog = new ImageSelectionForm(@"Panoramas", this._tileset.panorama_name))
     {
         dialog.Hue = this._tileset.panorama_hue;
         if (dialog.ShowDialog(this) != DialogResult.OK) return;
         this._tileset.panorama_name = dialog.ImageName;
         this._tileset.panorama_hue = dialog.Hue;
         this.textBoxPanorama.Text = this._tileset.panorama_name;
     }
 }
예제 #4
0
 private void TextBoxTilesetOnButtonClick(object sender, EventArgs e)
 {
     using (var dialog = new ImageSelectionForm(@"Tilesets", this._tileset.tileset_name))
     {
         dialog.Height = 640;
         if (dialog.ShowDialog(this) != DialogResult.OK) return;
         this._tileset.tileset_name = dialog.ImageName;
         this.ResizeTileset();
         this.textBoxTileset.Text = this._tileset.tileset_name;
     }
 }
예제 #5
0
 private void TextBoxFogOnTextBoxFogOnButtonClick(object sender, EventArgs e)
 {
     using (var dialog = new ImageSelectionForm(@"Fogs", this._tileset.fog_name))
     {
         dialog.Hue = this._tileset.fog_hue;
         dialog.ScrollX = this._tileset.fog_sx;
         dialog.ScrollY = this._tileset.fog_sy;
         dialog.Zoom = this._tileset.fog_zoom;
         dialog.ImageOpacity = this._tileset.fog_opacity;
         dialog.BlendMode = this._tileset.fog_blend_type;
         if (dialog.ShowDialog(this) != DialogResult.OK) return;
         this._tileset.fog_name = dialog.ImageName;
         this._tileset.fog_hue = dialog.Hue;
         this._tileset.fog_opacity = dialog.ImageOpacity;
         this._tileset.fog_sx = dialog.ScrollX;
         this._tileset.fog_sy = dialog.ScrollY;
         this._tileset.fog_zoom = dialog.Zoom;
         this.textBoxFog.Text = this._tileset.fog_name;
     }
 }
예제 #6
0
 private void TextBoxBattlebackOnButtonClick(object sender, EventArgs e)
 {
     using (var dialog = new ImageSelectionForm(@"Battlebacks", this._tileset.battleback_name))
     {
         dialog.Width = 800;
         if (dialog.ShowDialog(this) != DialogResult.OK) return;
         this._tileset.battleback_name = dialog.ImageName;
         this.textBoxBattleback.Text = this._tileset.battleback_name;
     }
 }
예제 #7
0
 private void TextBoxAutotileButtonClick(object sender, EventArgs e)
 {
     var textBoxButton = sender as TextBoxButton;
     if (textBoxButton == null) return;
     var index = Convert.ToInt32(textBoxButton.Tag);
     string tile = this._tileset.autotile_names[index];
     using (var dialog = new ImageSelectionForm(@"Autotiles", tile))
     {
         if (dialog.ShowDialog(this) != DialogResult.OK) return;
         var name = dialog.ImageName;
         this._tileset.autotile_names[index] = name;
         textBoxButton.Text = String.IsNullOrWhiteSpace(name) ? "<None>" : name;
         this.tilesetXnaPanel.Invalidate();
     }
 }
예제 #8
0
 private void ButtonBattlebackClick(object sender, EventArgs e)
 {
     using (var dialog = new ImageSelectionForm(@"Battlebacks", this._battleBackName))
     {
         dialog.Width = 800;
         dialog.SelectionEnabled = false;
         dialog.HueEnabled = false;
         if (dialog.ShowDialog(this) != DialogResult.OK) return;
         this._battleBackName = dialog.ImageName;
         this.xnaPanel.SetBackground(Cache.Battleback(this._battleBackName));
     }
 }
예제 #9
0
 private void textBoxGraphic_OnButtonClick(object sender, EventArgs e)
 {
     using (var dialog =
         new ImageSelectionForm(@"Animations", this._animation.animation_name))
     {
         dialog.Hue = this._animation.animation_hue;
         dialog.OptionsEnabled = false;
         if (dialog.ShowDialog(this) == DialogResult.OK)
         {
             this._animation.animation_name = dialog.ImageName;
             this._animation.animation_hue = dialog.Hue;
             this.textBoxGraphic.Text = String.IsNullOrWhiteSpace(this._animation.animation_name) ?
                 "<None>" : this._animation.animation_name;
             this.RefreshImages();
         }
     }
 }