[longomatch/newui: 136/157] Use the default field background for teams edition



commit 251f3a462ad94f41e42684c3c642a1f94841c2ca
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Aug 29 14:32:57 2014 +0200

    Use the default field background for teams edition

 LongoMatch.Core/Common/Constants.cs                |    1 +
 LongoMatch.Core/Config.cs                          |    6 ++++++
 LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs |    2 +-
 3 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Constants.cs b/LongoMatch.Core/Common/Constants.cs
index a7752eb..6c9e250 100644
--- a/LongoMatch.Core/Common/Constants.cs
+++ b/LongoMatch.Core/Common/Constants.cs
@@ -100,6 +100,7 @@ Xavier Queralt Mateu (ca)";
                public const string BACKGROUND = "background.png";
                public const string FIELD_BACKGROUND = "fields/field-full.svg";
                public const string HALF_FIELD_BACKGROUND = "fields/field-half.svg";
+               public const string HHALF_FIELD_BACKGROUND = "fields/field-full-teameditor.svg";
                public const string GOAL_BACKGROUND = "fields/field-goal.svg";
                public const string LINE_NORMAL = "line.svg";
                public const string LINE_DASHED = "dash-line.svg";
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index 0b85d25..ad9cad7 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -193,6 +193,12 @@ namespace LongoMatch
                        }
                }
                
+               static public Image HHalfFieldBackground {
+                       get {
+                               return new Image (Path.Combine (Config.ImagesDir, 
Constants.HHALF_FIELD_BACKGROUND));
+                       }
+               }
+               
                static public Image GoalBackground {
                        get {
                                return new Image (Path.Combine (Config.ImagesDir, Constants.GOAL_BACKGROUND));
diff --git a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs 
b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
index cdd6bb4..ed9769b 100644
--- a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
@@ -87,7 +87,7 @@ namespace LongoMatch.Gui.Component
                                }
                                teamnameentry.Text = template.TeamName;
                                FillFormation ();
-                               teamtagger.LoadTeams (template, null, null);
+                               teamtagger.LoadTeams (template, null, Config.HHalfFieldBackground);
                                ignoreChanges = false;
                                Edited = false;
                        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]