private void gridlock_CheckBox_CheckedChanged(object sender, EventArgs e) { if (gridlock_CheckBox.Focused) { SpellGrid.LockUnlock(); Settings.General.WriteBool("LockGridCheckBox", gridlock_CheckBox.Checked); } }
private void gridscript_ComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (gridscript_ComboBox.Focused) { UpdateGridItem(); SpellGrid.Open(); } }
private void gridspell_ComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (gridspell_ComboBox.Focused) { gridborder_ComboBox.SelectedIndex = 0; UpdateGridItem(); SpellGrid.Open(); } }
private void timerupdatestatus_Tick(object sender, EventArgs e) { UpdateRazorStatus(); UpdateScriptGrid(); if (toolboxstyleComboBox.Text != "TitleBar") { RazorEnhanced.ToolBar.UpdateCount(); } SpellGrid.UpdateSAIcon(); }
private void gridslot_ComboBox_SelectedIndexChanged(object sender, EventArgs e) { int index = gridslot_ComboBox.SelectedIndex; SpellGrid.SpellGridItem item = Settings.SpellGrid.ReadSelectedItem(index); gridgroup_ComboBox.SelectedIndex = gridgroup_ComboBox.Items.IndexOf(item.Group); if (item.Group != "Empty") { gridborder_ComboBox.Enabled = true; gridborder_ComboBox.SelectedIndex = gridborder_ComboBox.Items.IndexOf(item.Color.Name); if (item.Group != "Script") { gridspell_ComboBox.SelectedIndex = gridspell_ComboBox.Items.IndexOf(item.Spell); gridspell_ComboBox.Enabled = true; gridscript_ComboBox.Enabled = false; gridscript_ComboBox.SelectedIndex = -1; } else { gridscript_ComboBox.Enabled = true; gridscript_ComboBox.SelectedIndex = gridscript_ComboBox.Items.IndexOf(item.Spell); gridspell_ComboBox.Enabled = false; gridspell_ComboBox.SelectedIndex = -1; } } else { Settings.SpellGrid.UpdateItem(gridslot_ComboBox.SelectedIndex, gridgroup_ComboBox.Text, gridspell_ComboBox.Text, System.Drawing.Color.Transparent); gridspell_ComboBox.SelectedIndex = -1; gridborder_ComboBox.SelectedIndex = -1; gridspell_ComboBox.Enabled = false; gridborder_ComboBox.Enabled = false; } if (gridslot_ComboBox.Focused) { SpellGrid.Open(); } }
private void gridgroup_ComboBox_SelectedIndexChanged(object sender, EventArgs e) { switch (gridgroup_ComboBox.Text) { case "Empty": { gridspell_ComboBox.DataSource = null; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = false; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = -1; gridscript_ComboBox.Enabled = false; if (gridgroup_ComboBox.Focused) { SpellGrid.Close(); } break; } case "Magery": { gridspell_ComboBox.DataSource = SpellGrid.SpellIconMagery.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Abilities": { gridspell_ComboBox.DataSource = SpellGrid.SpellIconAbilities.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Mastery": { gridspell_ComboBox.DataSource = SpellGrid.SpellIconMastery.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Bushido": { gridspell_ComboBox.DataSource = SpellGrid.SpellIconBushido.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Chivalry": { gridspell_ComboBox.DataSource = SpellGrid.SpellIconChivalry.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Necromancy": { gridspell_ComboBox.DataSource = SpellGrid.SpellIconNecromancy.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Ninjitsu": { gridspell_ComboBox.DataSource = SpellGrid.SpellIconNinjitsu.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Mysticism": { gridspell_ComboBox.DataSource = SpellGrid.SpellIconMysticism.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Spellweaving": { gridspell_ComboBox.DataSource = SpellGrid.SpellIconSpellweaving.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Skills": { gridspell_ComboBox.DataSource = SpellGrid.SkillsIcon.Keys.ToList(); gridscript_ComboBox.Enabled = false; gridspell_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = 0; break; } case "Script": { gridscript_ComboBox.Enabled = gridborder_ComboBox.Enabled = true; gridspell_ComboBox.Enabled = false; gridspell_ComboBox.SelectedIndex = gridborder_ComboBox.SelectedIndex = -1; break; } default: break; } if (gridgroup_ComboBox.Focused) { UpdateGridItem(); SpellGrid.Open(); } }
public void InitBook(ProjectileSpellBookBuilder builder, ProjectileSpellBookBuilder newBuilder, SpellGrid spellGrid) { oldBuilder = newBuilder; stats.builder = newBuilder; spellGrid.GridChanged += stats.UpdateStats; SpellComponent.SubSpellComponentType type = SpellComponent.SubSpellComponentType.Rune; InitType(type, builder); int index = playerInventory.ownedComponents[type].FindIndex(delegate(string s) { return(s == builder.GetRune().GetTitle()); }); if (index >= 0) { CompIndexSelected(index); } else { Debug.LogError("Cant find that in the option list " + builder.GetRune().GetTitle()); } type = SpellComponent.SubSpellComponentType.language; InitType(type, builder); index = playerInventory.ownedComponents[type].FindIndex(delegate(string s) { return(s == builder.lang.GetTitle()); }); if (index >= 0) { CompIndexSelected(index); } else { Debug.LogError("Cant find that in the option list " + builder.lang.GetTitle()); } type = SpellComponent.SubSpellComponentType.Paper; InitType(type, builder); index = playerInventory.ownedComponents[type].FindIndex(delegate(string s) { return(s == builder.page.GetTitle()); }); if (index >= 0) { CompIndexSelected(index); } else { Debug.LogError("Cant find that in the option list " + builder.page.GetTitle()); } type = SpellComponent.SubSpellComponentType.Ink; InitType(type, builder); CompIndexSelected(0); ChangeLayOut(layOuts.Count - 1); stats.UpdateStats(); scrollbar.value = 1; }