/// <summary> /// gibt zurück ob der entsprechende modi angeklickt wurde, bzw was /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GuiPlayerInfo_OnClick(object sender, Vector e) { Vector position; switch (mode) { case 0: position = new Vector(Size.X - 170, Location.Y + Size.Y / 2); if ((position - e).Length < 25) { InfoClick?.Invoke(this, true); return; } break; case 1: position = new Vector(Size.X - 150 - 80, Location.Y + Size.Y / 2); if ((position - e).Length < 25) { InfoClick?.Invoke(this, true); return; } break; case 2: position = new Vector(Size.X - 150, Location.Y + Size.Y / 2); if ((position - e).Length < 25) { InfoClick?.Invoke(this, false); return; } position = new Vector(Size.X - 150 - 60, Location.Y + Size.Y / 2); if ((position - e).Length < 25) { InfoClick?.Invoke(this, true); return; } break; } if (mode != 2) { InfoClick?.Invoke(this, false); } }
/// <summary> /// wird aufgerufen wenn die information gedrückt wird /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GuiGameInfo_OnClick(object sender, Vector e) { InfoClick?.Invoke(this, false); }
private void InfoToolStripMenuItem_Click(object sender, EventArgs e) { InfoClick?.Invoke(this, EventArgs.Empty); }