[longomatch] Support away only substitutions
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Support away only substitutions
- Date: Tue, 5 May 2015 09:09:57 +0000 (UTC)
commit 473fea31806d1e6847376cca3e7d306c3ec6c50b
Author: Jorge Zapata <jorgeluis zapata gmail com>
Date: Wed Apr 29 16:57:10 2015 +0200
Support away only substitutions
Keep the correct position of the field and bench for away only,
local only or away and local teams.
.../CanvasObjects/Teams/PlayersTaggerObject.cs | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObjects/Teams/PlayersTaggerObject.cs
b/LongoMatch.Drawing/CanvasObjects/Teams/PlayersTaggerObject.cs
index 96f07b7..a5c3915 100644
--- a/LongoMatch.Drawing/CanvasObjects/Teams/PlayersTaggerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Teams/PlayersTaggerObject.cs
@@ -350,9 +350,19 @@ namespace LongoMatch.Drawing.CanvasObjects.Teams
homeBench.Height = awayBench.Height = field.Height;
border = Config.Style.TeamTaggerBenchBorder;
- homeBench.Position = new Point (border, 0);
- field.Position = new Point (awayBench.Width + 2 * border, 0);
- awayBench.Position = new Point (awayBench.Width + field.Width + 3 * border, 0);
+ if (homeTeam == null || awayTeam == null) {
+ if (homeTeam != null) {
+ homeBench.Position = new Point (border, 0);
+ field.Position = new Point (border + homeBench.Width + border, 0);
+ } else {
+ field.Position = new Point (border, 0);
+ awayBench.Position = new Point (border + field.Width + border, 0);
+ }
+ } else {
+ homeBench.Position = new Point (border, 0);
+ field.Position = new Point (homeBench.Width + 2 * border, 0);
+ awayBench.Position = new Point (awayBench.Width + field.Width + 3 * border,
0);
+ }
Update ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]