private void PopulateExhaustedGraphicList() { cmbEndSprite.Items.Clear(); cmbEndSprite.Items.Add(Strings.General.none); var resources = GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Resource); if (mEditorItem.Exhausted.GraphicFromTileset) { resources = GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Tileset); } for (var i = 0; i < resources.Length; i++) { cmbEndSprite.Items.Add(resources[i]); } if (mEditorItem != null) { if (mEditorItem.Exhausted.Graphic != null && cmbEndSprite.Items.Contains(mEditorItem.Exhausted.Graphic)) { cmbEndSprite.SelectedIndex = cmbEndSprite.FindString( TextUtils.NullToNone(TextUtils.NullToNone(mEditorItem.Exhausted.Graphic)) ); return; } } cmbEndSprite.SelectedIndex = 0; }
public EventCommandOptions(ShowOptionsCommand refCommand, EventPage refPage, FrmEvent editor) { InitializeComponent(); mMyCommand = refCommand; mEventEditor = editor; mCurrentPage = refPage; InitLocalization(); txtShowOptions.Text = mMyCommand.Text; txtShowOptionsOpt1.Text = mMyCommand.Options[0]; txtShowOptionsOpt2.Text = mMyCommand.Options[1]; txtShowOptionsOpt3.Text = mMyCommand.Options[2]; txtShowOptionsOpt4.Text = mMyCommand.Options[3]; cmbFace.Items.Clear(); cmbFace.Items.Add(Strings.General.none); cmbFace.Items.AddRange(GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Face)); if (cmbFace.Items.IndexOf(TextUtils.NullToNone(mMyCommand.Face)) > -1) { cmbFace.SelectedIndex = cmbFace.Items.IndexOf(TextUtils.NullToNone(mMyCommand.Face)); } else { cmbFace.SelectedIndex = 0; } UpdateFacePreview(); }
private void rbCritter_CheckedChanged(object sender, EventArgs e) { cmbCritterAnimation.Items.Clear(); cmbCritterAnimation.Items.Add(Strings.General.none); cmbCritterAnimation.Items.AddRange(AnimationBase.Names); cmbCritterAnimation.SelectedIndex = 0; cmbCritterSprite.Items.Clear(); cmbCritterSprite.Items.Add(Strings.General.none); cmbCritterSprite.Items.AddRange(GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Entity)); cmbCritterSprite.SelectedIndex = 0; if (nudCritterMoveFrequency.Value == 0) { nudCritterMoveFrequency.Value = 1000; } if (nudCritterMoveSpeed.Value == 0) { nudCritterMoveSpeed.Value = 400; } if (!rbCritter.Checked) { return; } HideAttributeMenus(); grpCritter.Visible = true; }
private void frmItem_Load(object sender, EventArgs e) { cmbPic.Items.Clear(); cmbPic.Items.Add(Strings.General.none); var itemnames = GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Item); cmbPic.Items.AddRange(itemnames); cmbAttackAnimation.Items.Clear(); cmbAttackAnimation.Items.Add(Strings.General.none); cmbAttackAnimation.Items.AddRange(AnimationBase.Names); cmbScalingStat.Items.Clear(); for (var x = 0; x < Options.MaxStats; x++) { cmbScalingStat.Items.Add(Globals.GetStatName(x)); } cmbAnimation.Items.Clear(); cmbAnimation.Items.Add(Strings.General.none); cmbAnimation.Items.AddRange(AnimationBase.Names); cmbEquipmentAnimation.Items.Clear(); cmbEquipmentAnimation.Items.Add(Strings.General.none); cmbEquipmentAnimation.Items.AddRange(AnimationBase.Names); cmbTeachSpell.Items.Clear(); cmbTeachSpell.Items.Add(Strings.General.none); cmbTeachSpell.Items.AddRange(SpellBase.Names); cmbEvent.Items.Clear(); cmbEvent.Items.Add(Strings.General.none); cmbEvent.Items.AddRange(EventBase.Names); cmbMalePaperdoll.Items.Clear(); cmbMalePaperdoll.Items.Add(Strings.General.none); cmbFemalePaperdoll.Items.Clear(); cmbFemalePaperdoll.Items.Add(Strings.General.none); var paperdollnames = GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Paperdoll); for (var i = 0; i < paperdollnames.Length; i++) { cmbMalePaperdoll.Items.Add(paperdollnames[i]); cmbFemalePaperdoll.Items.Add(paperdollnames[i]); } nudStr.Maximum = Options.MaxStatValue; nudMag.Maximum = Options.MaxStatValue; nudDef.Maximum = Options.MaxStatValue; nudMR.Maximum = Options.MaxStatValue; nudSpd.Maximum = Options.MaxStatValue; nudStr.Minimum = -Options.MaxStatValue; nudMag.Minimum = -Options.MaxStatValue; nudDef.Minimum = -Options.MaxStatValue; nudMR.Minimum = -Options.MaxStatValue; nudSpd.Minimum = -Options.MaxStatValue; InitLocalization(); UpdateEditor(); }
private void GraphicTypeUpdated() { mTmpGraphic.Filename = ""; mTmpGraphic.Type = EventGraphicType.None; mTmpGraphic.X = 0; mTmpGraphic.Y = 0; mTmpGraphic.Width = -1; mTmpGraphic.Height = -1; if (cmbGraphicType.SelectedIndex == 0) //No Graphic { cmbGraphic.Hide(); lblGraphic.Hide(); UpdatePreview(); } else if (cmbGraphicType.SelectedIndex == 1) //Sprite { mTmpGraphic.Type = EventGraphicType.Sprite; cmbGraphic.Show(); lblGraphic.Show(); cmbGraphic.Items.Clear(); cmbGraphic.Items.AddRange( GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Entity) ); if (cmbGraphic.Items.Count > 0) { cmbGraphic.SelectedIndex = 0; } } else if (cmbGraphicType.SelectedIndex == 2) //Tileset { mTmpGraphic.Type = EventGraphicType.Tileset; mTmpGraphic.Width = 0; mTmpGraphic.Height = 0; lblGraphic.Show(); cmbGraphic.Show(); cmbGraphic.Items.Clear(); foreach (var filename in TilesetBase.Names) { if (File.Exists("resources/tilesets/" + filename)) { cmbGraphic.Items.Add(filename); } else { } } if (cmbGraphic.Items.Count > 0) { cmbGraphic.SelectedIndex = 0; } } }
private void frmSpell_Load(object sender, EventArgs e) { cmbProjectile.Items.Clear(); cmbProjectile.Items.AddRange(ProjectileBase.Names); cmbCastAnimation.Items.Clear(); cmbCastAnimation.Items.Add(Strings.General.none); cmbCastAnimation.Items.AddRange(AnimationBase.Names); cmbHitAnimation.Items.Clear(); cmbHitAnimation.Items.Add(Strings.General.none); cmbHitAnimation.Items.AddRange(AnimationBase.Names); cmbEvent.Items.Clear(); cmbEvent.Items.Add(Strings.General.none); cmbEvent.Items.AddRange(EventBase.Names); cmbSprite.Items.Clear(); cmbSprite.Items.Add(Strings.General.none); var spellNames = GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Spell); cmbSprite.Items.AddRange(spellNames); cmbTransform.Items.Clear(); cmbTransform.Items.Add(Strings.General.none); var spriteNames = GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Entity); cmbTransform.Items.AddRange(spriteNames); nudWarpX.Maximum = (int)Options.MapWidth; nudWarpY.Maximum = (int)Options.MapHeight; cmbWarpMap.Items.Clear(); cmbWarpMap.Items.AddRange(MapList.OrderedMaps.Select(map => map?.Name).ToArray()); cmbWarpMap.SelectedIndex = 0; nudStr.Maximum = Options.MaxStatValue; nudMag.Maximum = Options.MaxStatValue; nudDef.Maximum = Options.MaxStatValue; nudMR.Maximum = Options.MaxStatValue; nudSpd.Maximum = Options.MaxStatValue; nudStr.Minimum = -Options.MaxStatValue; nudMag.Minimum = -Options.MaxStatValue; nudDef.Minimum = -Options.MaxStatValue; nudMR.Minimum = -Options.MaxStatValue; nudSpd.Minimum = -Options.MaxStatValue; nudCastDuration.Maximum = Int32.MaxValue; nudCooldownDuration.Maximum = Int32.MaxValue; InitLocalization(); UpdateEditor(); }
public EventCommandChangeHair(ChangeHairCommand refCommand, FrmEvent editor) { InitializeComponent(); mMyCommand = refCommand; mEventEditor = editor; cmbHair.Items.Clear(); cmbHair.Items.AddRange(GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Hairs)); if (cmbHair.Items.IndexOf(mMyCommand.Hair) > -1) { cmbHair.SelectedIndex = cmbHair.Items.IndexOf(mMyCommand.Hair); } else { cmbHair.SelectedIndex = 0; } UpdatePreview(); InitLocalization(); }
private void UpdateGraphicList() { cmbGraphic.Items.Clear(); if (cmbGraphicType.SelectedIndex == 0) //No Graphic { cmbGraphic.Hide(); lblGraphic.Hide(); } else if (cmbGraphicType.SelectedIndex == 1) //Sprite { cmbGraphic.Show(); lblGraphic.Show(); cmbGraphic.Items.AddRange( GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Entity) ); if (cmbGraphic.Items.Count > 0) { cmbGraphic.SelectedIndex = 0; } } else if (cmbGraphicType.SelectedIndex == 2) //Tileset { lblGraphic.Show(); cmbGraphic.Show(); foreach (var filename in TilesetBase.Names) { if (File.Exists("resources/tilesets/" + filename)) { cmbGraphic.Items.Add(filename); } else { } } if (cmbGraphic.Items.Count > 0) { cmbGraphic.SelectedIndex = 0; } } }
public EventCommand_ShowPicture(ShowPictureCommand refCommand, FrmEvent editor) { InitializeComponent(); mMyCommand = refCommand; mEventEditor = editor; cmbPicture.Items.Clear(); cmbPicture.Items.AddRange( GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Image) ); if (cmbPicture.Items.IndexOf(mMyCommand.File) > -1) { cmbPicture.SelectedIndex = cmbPicture.Items.IndexOf(mMyCommand.File); } else { if (cmbPicture.Items.Count > 0) { cmbPicture.SelectedIndex = 0; } } cmbSize.Items.Clear(); cmbSize.Items.Add(Strings.EventShowPicture.original); cmbSize.Items.Add(Strings.EventShowPicture.fullscreen); cmbSize.Items.Add(Strings.EventShowPicture.halfscreen); cmbSize.Items.Add(Strings.EventShowPicture.stretchtofit); if (mMyCommand.Size > -1) { cmbSize.SelectedIndex = mMyCommand.Size; } else { cmbSize.SelectedIndex = 0; } chkClick.Checked = mMyCommand.Clickable; nudHideTime.Value = mMyCommand.HideTime; chkWaitUntilClosed.Checked = mMyCommand.WaitUntilClosed; InitLocalization(); }
public EventCommandText(ShowTextCommand refCommand, FrmEvent editor) { InitializeComponent(); mMyCommand = refCommand; mEventEditor = editor; InitLocalization(); txtShowText.Text = mMyCommand.Text; cmbFace.Items.Clear(); cmbFace.Items.Add(Strings.General.none); cmbFace.Items.AddRange(GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Face)); if (cmbFace.Items.IndexOf(TextUtils.NullToNone(mMyCommand.Face)) > -1) { cmbFace.SelectedIndex = cmbFace.Items.IndexOf(TextUtils.NullToNone(mMyCommand.Face)); } else { cmbFace.SelectedIndex = 0; } UpdateFacePreview(); }
private void frmNpc_Load(object sender, EventArgs e) { cmbSprite.Items.Clear(); cmbSprite.Items.Add(Strings.General.none); cmbSprite.Items.AddRange( GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Entity) ); cmbSpell.Items.Clear(); cmbSpell.Items.AddRange(SpellBase.Names); cmbHostileNPC.Items.Clear(); cmbHostileNPC.Items.AddRange(NpcBase.Names); cmbDropItem.Items.Clear(); cmbDropItem.Items.Add(Strings.General.none); cmbDropItem.Items.AddRange(ItemBase.Names); cmbAttackAnimation.Items.Clear(); cmbAttackAnimation.Items.Add(Strings.General.none); cmbAttackAnimation.Items.AddRange(AnimationBase.Names); cmbOnDeathEventKiller.Items.Clear(); cmbOnDeathEventKiller.Items.Add(Strings.General.none); cmbOnDeathEventKiller.Items.AddRange(EventBase.Names); cmbOnDeathEventParty.Items.Clear(); cmbOnDeathEventParty.Items.Add(Strings.General.none); cmbOnDeathEventParty.Items.AddRange(EventBase.Names); cmbScalingStat.Items.Clear(); for (var x = 0; x < Options.MaxStats; x++) { cmbScalingStat.Items.Add(Globals.GetStatName(x)); } nudStr.Maximum = Options.MaxStatValue; nudMag.Maximum = Options.MaxStatValue; nudDef.Maximum = Options.MaxStatValue; nudMR.Maximum = Options.MaxStatValue; nudSpd.Maximum = Options.MaxStatValue; InitLocalization(); UpdateEditor(); }
private void frmAnimation_Load(object sender, EventArgs e) { //Animation Sound cmbSound.Items.Clear(); cmbSound.Items.Add(Strings.General.none); cmbSound.Items.AddRange(GameContentManager.SmartSortedSoundNames); //Lower Animation Graphic cmbLowerGraphic.Items.Clear(); cmbLowerGraphic.Items.Add(Strings.General.none); cmbLowerGraphic.Items.AddRange( GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Animation) ); //Upper Animation Graphic cmbUpperGraphic.Items.Clear(); cmbUpperGraphic.Items.Add(Strings.General.none); cmbUpperGraphic.Items.AddRange( GameContentManager.GetSmartSortedTextureNames(GameContentManager.TextureType.Animation) ); mLowerWindow = new SwapChainRenderTarget( Core.Graphics.GetGraphicsDevice(), picLowerAnimation.Handle, picLowerAnimation.Width, picLowerAnimation.Height ); mUpperWindow = new SwapChainRenderTarget( Core.Graphics.GetGraphicsDevice(), picUpperAnimation.Handle, picUpperAnimation.Width, picUpperAnimation.Height ); mLowerDarkness = Core.Graphics.CreateRenderTexture(picLowerAnimation.Width, picLowerAnimation.Height); mUpperDarkness = Core.Graphics.CreateRenderTexture(picUpperAnimation.Width, picUpperAnimation.Height); InitLocalization(); UpdateEditor(); }