[longomatch] Fix morroring for players in the away team.
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix morroring for players in the away team.
- Date: Wed, 7 Jan 2015 18:18:15 +0000 (UTC)
commit e6dbff0644873bec58477581c0ac725bf0c9967a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Jan 7 19:16:33 2015 +0100
Fix morroring for players in the away team.
LongoMatch.Drawing/CanvasObjects/FieldObject.cs | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObjects/FieldObject.cs b/LongoMatch.Drawing/CanvasObjects/FieldObject.cs
index 659e846..8df2f56 100644
--- a/LongoMatch.Drawing/CanvasObjects/FieldObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/FieldObject.cs
@@ -126,8 +126,16 @@ namespace LongoMatch.Drawing.CanvasObjects
rowHeight = Height / formation [col];
for (int row=0; row < formation[col]; row ++) {
- PlayerObject po = players [index];
- po.Position = new Point (colX, rowHeight * row + rowHeight / 2);
+ double rowY;
+ PlayerObject po = players[index];
+
+ if (team == Team.LOCAL) {
+ rowY = rowHeight * row + rowHeight / 2;
+ } else {
+ rowY = Height - (rowHeight * row + rowHeight / 2);
+ }
+
+ po.Position = new Point (colX, rowY);
po.Size = playerSize;
index ++;
if (players.Count == index)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]