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); } } }
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(); } }
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; } }
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; } }
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; } }
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; } }
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(); } }
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)); } }
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(); } } }