public GSkillGump(Skill skill, int y, int width, bool showReal) : base(4, y) { this.m_yBase = y; this.m_Skill = skill; if (skill.Action) { this.m_Name = new GUsableSkillName(skill); } else { this.m_Name = new GLabel(skill.Name, Engine.GetUniFont(1), Hues.Bright, 20, 0); } this.m_Name.X -= this.m_Name.Image.xMin; this.m_Name.Y -= this.m_Name.Image.yMin; this.m_Width = width; this.m_Height = this.m_Name.Image.yMax - this.m_Name.Image.yMin; base.m_Children.Add(this.m_Name); float num = showReal ? this.m_Skill.Real : this.m_Skill.Value; this.m_Value = new GLabel(num.ToString("F1"), Engine.GetUniFont(1), Hues.Bright, 0, 0); this.m_Value.X = (this.m_Width - 0x18) - this.m_Value.Image.xMax; this.m_Value.Y -= this.m_Value.Image.yMin; if ((this.m_Value.Image.yMax - this.m_Value.Image.yMin) > this.m_Height) { this.m_Height = this.m_Value.Image.yMax - this.m_Value.Image.yMin; } base.m_Children.Add(this.m_Value); this.m_Lock = new GThreeToggle(Engine.m_SkillUp, Engine.m_SkillDown, Engine.m_SkillLocked, (int) this.m_Skill.Lock, this.m_Width - 4, 0); this.m_Lock.OnStateChange = new OnStateChange(this.Lock_OnStateChange); this.UpdateLock(); base.m_Children.Add(this.m_Lock); }
public PUseSkill(Skill skill) : base(0x12, string.Format("Use Skill '{0}'", skill.Name)) { m_LastSkill = skill; base.m_Stream.Write((byte) 0x24); base.m_Stream.Write(string.Format("{0} 0", skill.ID)); base.m_Stream.Write((byte) 0); }
public GSkillIconName(Skill skill) : base(skill.Name, Engine.GetUniFont(0), Hues.Bright, Hues.Load(0x35), 4, 4, null) { this.m_Skill = skill; base.m_CanDrag = true; base.m_QuickDrag = false; this.X -= base.Image.xMin; this.Y -= base.Image.yMin; base.m_Tooltip = new SkillTooltip(skill); }
public GSkillIcon(Skill skill) : base(0, 0, 100, 20) { this.m_Skill = skill; GLabel toAdd = new GSkillIconName(skill); base.m_Width = (toAdd.Image.xMax - toAdd.Image.xMin) + 9; base.m_Height = (toAdd.Image.yMax - toAdd.Image.yMin) + 9; base.m_Children.Add(toAdd); base.m_DragClipX = base.m_Width - 1; base.m_DragClipY = base.m_Height - 1; }
public GUsableSkillName(Skill skill) : base(skill.Name, Engine.GetUniFont(1), Hues.Bright, Hues.Load(0x35), 20, 0, null) { this.m_Skill = skill; base.m_CanDrag = true; base.m_QuickDrag = false; }
public void OnSkillChange(Skill skill) { this.m_SkillList.OnSkillChange(skill, this.m_ShowReal); this.UpdateTotal(); }
public PUpdateSkillLock(Skill skill) : base(0x3a, "Update Skill Lock") { base.m_Stream.Write((short) skill.ID); base.m_Stream.Write((byte) skill.Lock); }
/// <summary> /// Add new skill to Game /// </summary> /// <param name="skill">Object of new skill</param> /// <returns></returns> public bool AddSkill(Skill skill) { skills.Add(skill); var sControl = new SkillControl(); window.gridSkills.RowDefinitions.Add(new RowDefinition { Height = new GridLength(sControl.MinHeight) }); window.gridSkills.Children.Add(sControl); Grid.SetRow(sControl, skills.Count - 1); sControl.DataContext = skill; skillControls.Add(skill, sControl); window.KeyDown += skill.KeyDown; window.hitInput.KeyDown += skill.KeyDown; return true; }
public void OnSkillChange(Skill skill, bool showReal) { GSkillGump gump = this.m_SkillGumps[skill.ID]; if (gump != null) { gump.OnSkillChange(showReal ? ((double) skill.Real) : ((double) skill.Value), skill.Lock); } }
private void button1_Click(object sender, RoutedEventArgs e) { u = new Player(++i, "User #" + i); game.AddPlayer(u); u.test(); s = new Skill("Frost", Key.F, 5000); game.AddSkill(s); s = new Skill("Slice", Key.S, 3000); game.AddSkill(s); UpdateHitsList(); }
public SkillTooltip(Skill s) : base("Value: 0.0 (0.0)", true) { this.m_Skill = s; base.m_Delay = 0.5f; }