[longomatch] Redesign dashboard buttons
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Redesign dashboard buttons
- Date: Tue, 28 Oct 2014 09:49:31 +0000 (UTC)
commit 5f2e767f314e32288b70a55e3b98e1cd69418eb4
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Oct 17 17:56:06 2014 +0200
Redesign dashboard buttons
LongoMatch.Core/Common/Enums.cs | 1 +
.../Interfaces/Drawing/IDrawingToolkit.cs | 2 +-
LongoMatch.Core/Store/DashboardButton.cs | 10 +-
LongoMatch.Core/Store/Templates/Dashboard.cs | 16 +-
LongoMatch.Core/StyleConf.cs | 20 +
LongoMatch.Drawing.Cairo/CairoBackend.cs | 25 +-
LongoMatch.Drawing/CanvasObjects/ButtonObject.cs | 122 ++++-
LongoMatch.Drawing/CanvasObjects/CanvasObject.cs | 2 +-
LongoMatch.Drawing/CanvasObjects/CardObject.cs | 3 +-
LongoMatch.Drawing/CanvasObjects/CategoryObject.cs | 524 ++++++++++++--------
.../CanvasObjects/PlayersTaggerObject.cs | 4 +-
LongoMatch.Drawing/CanvasObjects/PositionObject.cs | 4 +-
LongoMatch.Drawing/CanvasObjects/ScoreObject.cs | 12 +
LongoMatch.Drawing/CanvasObjects/TagObject.cs | 12 +
LongoMatch.Drawing/CanvasObjects/TaggerObject.cs | 11 +
LongoMatch.Drawing/CanvasObjects/TimelineObject.cs | 2 -
LongoMatch.Drawing/CanvasObjects/TimerObject.cs | 82 ++--
LongoMatch.Drawing/Widgets/DashboardCanvas.cs | 20 +-
LongoMatch.Drawing/Widgets/PositionTagger.cs | 5 +-
LongoMatch.GUI/Gui/Component/CodingWidget.cs | 4 +-
LongoMatch.GUI/Gui/Component/DashboardWidget.cs | 11 +-
LongoMatch.GUI/Gui/MainWindow.cs | 1 -
.../LongoMatch.Gui.Component.CodingWidget.cs | 2 +-
LongoMatch.GUI/gtk-gui/gui.stetic | 2 +-
LongoMatch/LongoMatch.csproj | 14 +-
data/images/dashboard/longomatch-event.svg | 68 +++
data/images/dashboard/longomatch-penalties.svg | 21 +
data/images/dashboard/longomatch-score.svg | 47 ++
data/images/dashboard/longomatch-tag.svg | 14 +
data/images/dashboard/longomatch-timer.svg | 59 +++
libcesarplayer/liblongomatch.cproj | 2 +
31 files changed, 817 insertions(+), 305 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Enums.cs b/LongoMatch.Core/Common/Enums.cs
index 3fbf69d..8b17530 100644
--- a/LongoMatch.Core/Common/Enums.cs
+++ b/LongoMatch.Core/Common/Enums.cs
@@ -188,6 +188,7 @@ namespace LongoMatch.Core.Common
}
public enum FontWeight {
+ Light,
Normal,
Bold
}
diff --git a/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
b/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
index 31bfb20..b3d10fa 100644
--- a/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
+++ b/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
@@ -66,7 +66,7 @@ namespace LongoMatch.Core.Interfaces.Drawing
void DrawEllipse (Point center, double axisX, double axisY);
void DrawText (Point point, double width, double height, string text, bool escape=false);
void DrawImage (Image image);
- void DrawImage (Point start, double width, double height, Image image, bool scale);
+ void DrawImage (Point start, double width, double height, Image image, bool scale, bool
masked=false);
void DrawArrow(Point start, Point stop, int lenght, double degrees, bool closed);
void Save (ICanvas canvas, double width, double height, string filename);
Image Copy (ICanvas canvas, double width, double height);
diff --git a/LongoMatch.Core/Store/DashboardButton.cs b/LongoMatch.Core/Store/DashboardButton.cs
index 224a253..9804671 100644
--- a/LongoMatch.Core/Store/DashboardButton.cs
+++ b/LongoMatch.Core/Store/DashboardButton.cs
@@ -32,7 +32,7 @@ namespace LongoMatch.Core.Store
Width = Constants.BUTTON_WIDTH;
Height = Constants.BUTTON_HEIGHT;
BackgroundColor = Color.Red;
- TextColor = Color.Grey2;
+ TextColor = Config.Style.PaletteBackgroundLight;
HotKey = new HotKey ();
}
@@ -125,6 +125,10 @@ namespace LongoMatch.Core.Store
[Serializable]
public class TagButton: DashboardButton
{
+ public TagButton () {
+ BackgroundColor = StyleConf.ButtonTagColor;
+ }
+
public Tag Tag {
get;
set;
@@ -145,6 +149,10 @@ namespace LongoMatch.Core.Store
[Serializable]
public class TimerButton: DashboardButton
{
+ public TimerButton () {
+ BackgroundColor = StyleConf.ButtonTimerColor;
+ }
+
public Timer Timer {
get;
set;
diff --git a/LongoMatch.Core/Store/Templates/Dashboard.cs b/LongoMatch.Core/Store/Templates/Dashboard.cs
index c6619cd..a482c0b 100644
--- a/LongoMatch.Core/Store/Templates/Dashboard.cs
+++ b/LongoMatch.Core/Store/Templates/Dashboard.cs
@@ -147,7 +147,7 @@ namespace LongoMatch.Core.Store.Templates
public AnalysisEventButton AddDefaultItem (int index) {
AnalysisEventButton button;
AnalysisEventType evtype;
- Color c = Color.Red;
+ Color c = StyleConf.ButtonEventColor;
HotKey h = new HotKey();
evtype = new AnalysisEventType {
@@ -206,24 +206,30 @@ namespace LongoMatch.Core.Store.Templates
template.List.Add (tagbutton);
cardButton = new PenaltyCardButton {
- PenaltyCard = new PenaltyCard (Catalog.GetString ("Red"),
+ PenaltyCard = new PenaltyCard (Catalog.GetString ("Red card"),
Color.Red, CardShape.Rectangle),
Position = new Point (10 + (10 + CAT_WIDTH) * 2, 10)};
template.List.Add (cardButton);
cardButton = new PenaltyCardButton {
- PenaltyCard = new PenaltyCard (Catalog.GetString ("Yellow"),
+ PenaltyCard = new PenaltyCard (Catalog.GetString ("Yellow card"),
Color.Yellow, CardShape.Rectangle),
Position = new Point (10 + (10 + CAT_WIDTH) * 3, 10)};
template.List.Add (cardButton);
scoreButton = new ScoreButton {
- Score = new Score (Catalog.GetString ("Field goal"), 1),
+ Score = new Score {
+ Name = Catalog.GetString ("Field goal"),
+ Points = 1,
+ Color = StyleConf.ButtonScoreColor},
Position = new Point (10 + (10 + CAT_WIDTH) * 4, 10)};
template.List.Add (scoreButton);
scoreButton = new ScoreButton {
- Score = new Score (Catalog.GetString ("Penalty goal"), 1),
+ Score = new Score {
+ Name = Catalog.GetString ("Penalty goal"),
+ Points = 1,
+ Color = StyleConf.ButtonScoreColor},
Position = new Point (10 + (10 + CAT_WIDTH) * 5, 10)};
template.List.Add (scoreButton);
diff --git a/LongoMatch.Core/StyleConf.cs b/LongoMatch.Core/StyleConf.cs
index 84508bf..19d0aa7 100644
--- a/LongoMatch.Core/StyleConf.cs
+++ b/LongoMatch.Core/StyleConf.cs
@@ -100,6 +100,26 @@ namespace LongoMatch.Core.Common
public const int NotebookTabIconSize = 18;
public const int NotebookTabSize = NotebookTabIconSize + 14;
+ public const int ButtonHeaderHeight = 22;
+ public const int ButtonHeaderWidth = 5 + 34 + 5;
+ public const int ButtonRecWidth = 40;
+ public const int ButtonLineWidth = 3;
+ public const int ButtonHeaderFontSize = 14;
+ public const int ButtonNameFontSize = 18;
+ public const int ButtonTimerFontSize = 24;
+ public const int ButtonButtonsFontSize = 10;
+ public const int ButtonMinWidth = 100;
+ public const string ButtonTimerIcon = "dashboard/longomatch-timer.svg";
+ public const string ButtonTagIcon = "dashboard/longomatch-tag.svg";
+ public const string ButtonScoreIcon = "dashboard/longomatch-score.svg";
+ public const string ButtonEventIcon = "dashboard/longomatch-event.svg";
+ public static Color ButtonTagColor = Color.Parse ("#d8ffc7");
+ public static Color ButtonTimerColor = Color.Parse ("#bebbff");
+ public static Color ButtonScoreColor = Color.Parse ("#d8ffc7");
+ public static Color ButtonPenaltyColor = Color.Parse ("#ffc7f0");
+ public static Color ButtonEventColor = Color.Parse ("#c7e9ff");
+
+
public int BenchLineWidth = 2;
public int TeamTaggerBenchBorder = 10;
diff --git a/LongoMatch.Drawing.Cairo/CairoBackend.cs b/LongoMatch.Drawing.Cairo/CairoBackend.cs
index 15463ad..f08e78e 100644
--- a/LongoMatch.Drawing.Cairo/CairoBackend.cs
+++ b/LongoMatch.Drawing.Cairo/CairoBackend.cs
@@ -112,6 +112,9 @@ namespace LongoMatch.Drawing.Cairo
public FontWeight FontWeight {
set {
switch (value) {
+ case FontWeight.Light:
+ fWeight = Weight.Light;
+ break;
case FontWeight.Bold:
fWeight = Weight.Semibold;
break;
@@ -283,7 +286,11 @@ namespace LongoMatch.Drawing.Cairo
public void DrawRectangle (Point start, double width, double height)
{
- DrawRoundedRectangle (start, width, height, 0);
+ CContext.Rectangle (new global::Cairo.Rectangle (start.X + LineWidth / 2,
+ start.Y + LineWidth / 2,
+ width - LineWidth,
+ height - LineWidth));
+ StrokeAndFill (false);
}
static public double ByteToDouble (byte val)
@@ -380,7 +387,7 @@ namespace LongoMatch.Drawing.Cairo
CContext.Paint ();
}
- public void DrawImage (Point start, double width, double height, Image image, bool scale)
+ public void DrawImage (Point start, double width, double height, Image image, bool scale,
bool masked=false)
{
double scaleX, scaleY;
Point offset;
@@ -395,8 +402,18 @@ namespace LongoMatch.Drawing.Cairo
CContext.Save ();
CContext.Translate (start.X + offset.X, start.Y + offset.Y);
CContext.Scale (scaleX, scaleY);
- Gdk.CairoHelper.SetSourcePixbuf (CContext, image.Value, 0, 0);
- CContext.Paint ();
+ if (masked) {
+ CContext.PushGroup ();
+ Gdk.CairoHelper.SetSourcePixbuf (CContext, image.Value, 0, 0);
+ CContext.Paint ();
+ var src = CContext.PopGroup ();
+ SetColor (FillColor);
+ CContext.Mask (src);
+ src.Dispose ();
+ } else {
+ Gdk.CairoHelper.SetSourcePixbuf (CContext, image.Value, 0, 0);
+ CContext.Paint ();
+ }
CContext.Restore ();
}
diff --git a/LongoMatch.Drawing/CanvasObjects/ButtonObject.cs
b/LongoMatch.Drawing/CanvasObjects/ButtonObject.cs
index 01674ea..fed89c5 100644
--- a/LongoMatch.Drawing/CanvasObjects/ButtonObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/ButtonObject.cs
@@ -26,14 +26,23 @@ namespace LongoMatch.Drawing.CanvasObjects
{
const int BORDER_SIZE = 4;
const int SELECTION_SIZE = 6;
+ protected ISurface backBufferSurface;
public ButtonObject () {
BackgroundColor = Config.Style.PaletteBackgroundLight;
BackgroundColorActive = Config.Style.PaletteActive;
BorderColor = Config.Style.PaletteBackgroundDark;
TextColor = Config.Style.PaletteText;
+ MinWidth = 20;
+ MinHeight = 20;
}
+ protected override void Dispose (bool disposing)
+ {
+ ResetBackbuffer ();
+ base.Dispose (disposing);
+ }
+
public virtual Point Position {
get;
set;
@@ -54,6 +63,11 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
}
+ public virtual Image Icon {
+ get;
+ set;
+ }
+
public virtual Color BorderColor {
get;
set;
@@ -73,6 +87,16 @@ namespace LongoMatch.Drawing.CanvasObjects
get;
set;
}
+
+ public int MinWidth {
+ get;
+ set;
+ }
+
+ public int MinHeight {
+ get;
+ set;
+ }
protected Color CurrentBackgroundColor {
get {
@@ -107,13 +131,23 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
}
- protected Point DrawPosition {
- get {
- if (!Active) {
- return Position;
- } else {
- return new Point (Position.X + 1, Position.Y + 1);
- }
+ public override void ReDraw ()
+ {
+ ResetBackbuffer ();
+ base.ReDraw ();
+ }
+
+ public override void ResetDrawArea ()
+ {
+ ResetBackbuffer ();
+ base.ResetDrawArea ();
+ }
+
+ protected void ResetBackbuffer ()
+ {
+ if (backBufferSurface != null) {
+ backBufferSurface.Dispose ();
+ backBufferSurface = null;
}
}
@@ -160,6 +194,9 @@ namespace LongoMatch.Drawing.CanvasObjects
default:
throw new Exception ("Unsupported move for tagger object: " + s.Position);
}
+ Width = Math.Max (MinWidth, Width);
+ Height = Math.Max (MinHeight, Height);
+ ResetBackbuffer ();
}
protected void DrawSelectionArea (IDrawingToolkit tk)
@@ -172,26 +209,41 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.FillColor = null;
tk.LineStyle = LineStyle.Dashed;
tk.LineWidth = 2;
- tk.DrawRectangle (DrawPosition, Width, Height);
+ tk.DrawRectangle (Position, Width, Height);
tk.StrokeColor = tk.FillColor = Constants.SELECTION_INDICATOR_COLOR;
tk.LineStyle = LineStyle.Normal;
- tk.DrawRectangle (new Point (DrawPosition.X + Width - SELECTION_SIZE / 2,
- DrawPosition.Y + Height - SELECTION_SIZE / 2),
+ tk.DrawRectangle (new Point (Position.X + Width - SELECTION_SIZE / 2,
+ Position.Y + Height - SELECTION_SIZE / 2),
SELECTION_SIZE, SELECTION_SIZE);
}
protected void DrawButton (IDrawingToolkit tk)
{
- tk.LineWidth = 0;
- tk.StrokeColor = BorderColor;
- tk.FillColor = CurrentBackgroundColor;
- tk.DrawRoundedRectangle (DrawPosition, Width, Height, 3);
+ Color front, back;
+
+ if (Active) {
+ tk.LineWidth = StyleConf.ButtonLineWidth;
+ front = BackgroundColor;
+ back = TextColor;
+ } else {
+ tk.LineWidth = 0;
+ front = TextColor;
+ back = BackgroundColor;
+ }
+ tk.FillColor = back;
+ tk.StrokeColor = front;
+ tk.DrawRectangle (Position, Width, Height);
+ if (Icon != null) {
+ tk.FillColor = front;
+ tk.DrawImage (new Point (Position.X + 5, Position.Y + 5),
+ Icon.Width, Icon.Height, Icon, false, true);
+ }
}
protected void DrawImage (IDrawingToolkit tk)
{
- Point pos = new Point (DrawPosition.X + BORDER_SIZE / 2, DrawPosition.Y + BORDER_SIZE
/ 2);
+ Point pos = new Point (Position.X + BORDER_SIZE / 2, Position.Y + BORDER_SIZE / 2);
if (Active && BackgroundImageActive != null) {
tk.DrawImage (pos, Width - BORDER_SIZE, Height - BORDER_SIZE,
BackgroundImageActive, true);
@@ -203,23 +255,49 @@ namespace LongoMatch.Drawing.CanvasObjects
protected void DrawText (IDrawingToolkit tk)
{
if (Text != null) {
- tk.FillColor = TextColor;
- tk.StrokeColor = TextColor;
+ if (Active) {
+ tk.FillColor = BackgroundColor;
+ tk.StrokeColor = BackgroundColor;
+ } else {
+ tk.FillColor = TextColor;
+ tk.StrokeColor = TextColor;
+ }
+ tk.FontSize = StyleConf.ButtonNameFontSize;
+ tk.FontWeight = FontWeight.Light;
tk.FontAlignment = FontAlignment.Center;
- tk.DrawText (DrawPosition, Width, Height, Text);
+ tk.DrawText (Position, Width, Height, Text);
+ }
+ }
+
+ void CreateBackBufferSurface () {
+ IDrawingToolkit tk = Config.DrawingToolkit;
+
+ ResetBackbuffer ();
+ backBufferSurface = tk.CreateSurface ((int)Width, (int)Height);
+ using (IContext c = backBufferSurface.Context) {
+ tk.Context = c;
+ tk.TranslateAndScale (new Point (-Position.X, -Position.Y),
+ new Point (1, 1));
+ DrawButton (tk);
+ DrawImage (tk);
+ DrawSelectionArea (tk);
+ DrawText (tk);
}
}
public override void Draw (IDrawingToolkit tk, Area area)
{
+ IContext ctx = tk.Context;
+
if (!UpdateDrawArea (tk, area, Area)) {
return;
}
+ if (backBufferSurface == null) {
+ CreateBackBufferSurface ();
+ }
+ tk.Context = ctx;
tk.Begin ();
- DrawButton (tk);
- DrawImage (tk);
- DrawSelectionArea (tk);
- DrawText (tk);
+ tk.DrawSurface (backBufferSurface, Position);
tk.End ();
}
}
diff --git a/LongoMatch.Drawing/CanvasObjects/CanvasObject.cs
b/LongoMatch.Drawing/CanvasObjects/CanvasObject.cs
index 0e1b529..c1da506 100644
--- a/LongoMatch.Drawing/CanvasObjects/CanvasObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/CanvasObject.cs
@@ -156,7 +156,7 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
}
- public bool Active {
+ public virtual bool Active {
get {
return active;
}
diff --git a/LongoMatch.Drawing/CanvasObjects/CardObject.cs b/LongoMatch.Drawing/CanvasObjects/CardObject.cs
index 2a37dd3..b2bbb9b 100644
--- a/LongoMatch.Drawing/CanvasObjects/CardObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/CardObject.cs
@@ -24,7 +24,6 @@ namespace LongoMatch.Drawing.CanvasObjects
{
public class CardObject: TaggerObject
{
-
public CardObject (PenaltyCardButton card): base (card)
{
Button = card;
@@ -65,7 +64,7 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.LineWidth = 2;
tk.StrokeColor = Button.TextColor;
tk.FillColor = Button.TextColor;
- tk.DrawText (DrawPosition, Button.Width, Button.Height, Button.PenaltyCard.Name);
+ tk.DrawText (Position, Button.Width, Button.Height, Button.PenaltyCard.Name);
DrawSelectionArea (tk);
tk.End ();
}
diff --git a/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
b/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
index bd8d98a..b5e7695 100644
--- a/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/CategoryObject.cs
@@ -17,47 +17,50 @@
//
using System;
using System.Collections.Generic;
+using System.IO;
using LongoMatch.Core.Common;
+using LongoMatch.Core.Handlers;
using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
using LongoMatch.Core.Store.Drawables;
-using Mono.Unix;
-using System.IO;
namespace LongoMatch.Drawing.CanvasObjects
{
public class CategoryObject: TaggerObject
{
+ public event ButtonSelectedHandler EditButtonTagsEvent;
- static Image RecordSurface = null;
- static Image CancelSurface = null;
- static Image EditSurface = null;
- static Image ApplySurface = null;
- static bool surfacesCached = false;
-
- Dictionary <Rectangle, object> rects;
+ static Image iconImage;
+ Dictionary <Rectangle, object> rects, buttonsRects;
Dictionary <string, List<Tag>> tagsByGroup;
- bool catSelected, tagSelected;
+ bool recording, emitEvent, delayEvent, editClicked;
+ bool cancelClicked, applyClicked, moved;
int nrows;
const int TIMEOUT_MS = 800;
Time currentTime;
System.Threading.Timer timer;
- object recordButton = new object ();
object cancelButton = new object ();
- ISurface backBufferSurface;
- Rectangle editRect, recordRect, cancelRect;
- double catWidth, heightPerRow, recordY;
+ object editbutton = new object ();
+ object applyButton = new object ();
+ Rectangle editRect, cancelRect, applyRect;
+ double catWidth, heightPerRow;
public CategoryObject (AnalysisEventButton category): base (category)
{
Button = category;
rects = new Dictionary <Rectangle, object> ();
+ buttonsRects = new Dictionary <Rectangle, object> ();
SelectedTags = new List<Tag> ();
CurrentTime = new Time (0);
- recordRect = new Rectangle ();
- cancelRect = new Rectangle ();
- editRect = new Rectangle ();
- LoadSurfaces ();
+ cancelRect = new Rectangle (new Point (0, 0), 0, 0);
+ editRect = new Rectangle (new Point (0, 0), 0, 0);
+ applyRect = new Rectangle (new Point (0, 0), 0, 0);
+ if (iconImage == null) {
+ iconImage = new Image (Path.Combine (Config.ImagesDir,
+ StyleConf.ButtonEventIcon));
+ }
+ MinWidth = 100;
+ MinHeight = HeaderHeight * 2;
}
protected override void Dispose (bool disposing)
@@ -66,7 +69,6 @@ namespace LongoMatch.Drawing.CanvasObjects
timer.Dispose ();
timer = null;
}
- ResetBackbuffer ();
base.Dispose (disposing);
}
@@ -75,9 +77,10 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
}
- public Tag AddTag {
- get;
- set;
+ public override Image Icon {
+ get {
+ return iconImage;
+ }
}
public Time CurrentTime {
@@ -87,7 +90,7 @@ namespace LongoMatch.Drawing.CanvasObjects
set {
currentTime = value;
if (Start != null && currentTime < Start) {
- CancelClicked ();
+ Clear ();
} else {
ReDraw ();
}
@@ -100,34 +103,39 @@ namespace LongoMatch.Drawing.CanvasObjects
}
}
- public override void ReDraw ()
- {
- ResetBackbuffer ();
- base.ReDraw ();
+ bool ShowApplyButton {
+ get {
+ return ShowTags && tagsByGroup.Count > 1
+ && Button.TagMode == TagMode.Predefined
+ && Mode != TagMode.Edit;
+ }
+ }
+
+ bool ShowTags {
+ get {
+ return Button.ShowSubcategories && Button.AnalysisEventType.Tags.Count != 0;
+ }
}
- public override void ResetDrawArea ()
- {
- ResetBackbuffer ();
- base.ResetDrawArea ();
+ int HeaderHeight {
+ get {
+ return iconImage.Height + 5;
+ }
}
- void ResetBackbuffer ()
- {
- if (backBufferSurface != null) {
- backBufferSurface.Dispose ();
- backBufferSurface = null;
+ int HeaderTextOffset {
+ get {
+ return iconImage.Width + 5;
}
}
- void LoadSurfaces ()
- {
- if (!surfacesCached) {
- RecordSurface = CreateSurface (StyleConf.RecordButton);
- CancelSurface = CreateSurface (StyleConf.CancelButton);
- EditSurface = CreateSurface (StyleConf.EditButton);
- ApplySurface = CreateSurface (StyleConf.ApplyButton);
- surfacesCached = true;
+ double HeaderTextWidth {
+ get {
+ if (Button.TagMode == TagMode.Free) {
+ return Width - HeaderTextOffset - StyleConf.ButtonRecWidth;
+ } else {
+ return Width - HeaderTextOffset;
+ }
}
}
@@ -140,29 +148,38 @@ namespace LongoMatch.Drawing.CanvasObjects
{
/* Header */
int tagsPerRow = Math.Max (1, Button.TagsPerRow);
- nrows = 1;
+ nrows = 0;
- /* Recorder */
- if (Button.TagMode == TagMode.Free) {
- nrows ++;
- }
-
if (Button.ShowSubcategories) {
foreach (List<Tag> tags in tagsByGroup.Values) {
nrows += (int)Math.Ceiling ((float)tags.Count / tagsPerRow);
}
}
- if (Mode == TagMode.Edit) {
- nrows ++;
- }
+ }
+
+ void Clear ()
+ {
+ recording = false;
+ emitEvent = false;
+ cancelClicked = false;
+ Start = null;
+ SelectedTags.Clear ();
+ Active = false;
}
void EmitCreateEvent ()
{
EmitClickEvent ();
- tagSelected = false;
- catSelected = false;
- SelectedTags.Clear ();
+ Clear ();
+ }
+
+ void StartRecording ()
+ {
+ recording = true;
+ if (Start == null) {
+ Start = CurrentTime;
+ }
+ Active = true;
}
void TimerCallback (Object state)
@@ -178,19 +195,24 @@ namespace LongoMatch.Drawing.CanvasObjects
TimerCallback (null);
return;
}
- if (timer == null) {
- timer = new System.Threading.Timer (TimerCallback, null, TIMEOUT_MS, 0);
- } else {
- timer.Change (TIMEOUT_MS, 0);
- }
+ //if (timer == null) {
+ // timer = new System.Threading.Timer (TimerCallback, null, TIMEOUT_MS, 0);
+ //} else {
+ // timer.Change (TIMEOUT_MS, 0);
+ //}
}
void CategoryClicked (AnalysisEventButton category)
{
if (Button.TagMode == TagMode.Predefined) {
- catSelected = true;
+ emitEvent = true;
+ Active = true;
} else if (Button.TagMode == TagMode.Free) {
- RecordClicked ();
+ if (!recording) {
+ StartRecording ();
+ } else {
+ emitEvent = true;
+ }
}
}
@@ -199,30 +221,14 @@ namespace LongoMatch.Drawing.CanvasObjects
if (SelectedTags.Contains (tag)) {
SelectedTags.Remove (tag);
} else {
+ SelectedTags.RemoveAll (t => t.Group == tag.Group);
SelectedTags.Add (tag);
- if (Button.TagMode == TagMode.Predefined || Mode == TagMode.Edit) {
- catSelected = true;
- tagSelected = true;
- }
- }
- }
-
- void CancelClicked ()
- {
- Start = null;
- ReDraw ();
- }
-
- void RecordClicked ()
- {
- if (Mode == TagMode.Edit) {
- return;
}
- if (Start == null) {
- Start = CurrentTime;
+ if (Button.TagMode == TagMode.Free) {
+ StartRecording ();
} else {
- EmitCreateEvent ();
- Start = null;
+ Active = true;
+ delayEvent = true;
}
ReDraw ();
}
@@ -230,7 +236,6 @@ namespace LongoMatch.Drawing.CanvasObjects
void UpdateGroups ()
{
tagsByGroup = Button.AnalysisEventType.TagsByGroup;
-
}
public List<Tag> SelectedTags {
@@ -238,69 +243,80 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
}
- public Tag GetTagForCoords (Point p)
+ bool CheckRect (Point p, Rectangle rect, object obj)
{
- Tag tag = null;
-
- foreach (Rectangle rect in rects.Keys) {
- Selection subsel = rect.GetSelection (p, 0);
- if (subsel != null) {
- if (rects [rect] is Tag) {
- tag = rects [rect] as Tag;
- }
- break;
- }
+ Selection subsel;
+
+ if (obj == null) {
+ return false;
}
- if (tag != AddTag) {
- return tag;
- } else {
- return null;
+ subsel = rect.GetSelection (p, 0);
+ if (subsel != null) {
+ if (obj is AnalysisEventButton) {
+ CategoryClicked (Button);
+ } else if (obj is Tag) {
+ TagClicked (obj as Tag);
+ } else if (obj == cancelButton) {
+ cancelClicked = true;
+ } else if (obj == editbutton) {
+ editClicked = true;
+ } else if (obj == applyButton) {
+ applyClicked = true;
+ }
+ return true;
}
+ return false;
}
public override void ClickPressed (Point p, ButtonModifier modif)
{
- foreach (Rectangle rect in rects.Keys) {
- Selection subsel;
- object obj = rects [rect];
- if (obj == null) {
- continue;
+ if (Mode == TagMode.Edit) {
+ editClicked = CheckRect (p, editRect, editbutton);
+ return;
+ }
+ foreach (Rectangle rect in buttonsRects.Keys) {
+ if (CheckRect (p, rect, buttonsRects [rect])) {
+ return;
}
- subsel = rect.GetSelection (p, 0);
- if (subsel != null) {
- if (obj is AnalysisEventButton) {
- CategoryClicked (Button);
- } else if (obj is Tag) {
- TagClicked (obj as Tag);
- } else if (obj == recordButton) {
- RecordClicked ();
- } else if (obj == cancelButton) {
- CancelClicked ();
- }
- break;
+ }
+ foreach (Rectangle rect in rects.Keys) {
+ if (CheckRect (p, rect, rects [rect])) {
+ return;
}
}
}
public override void ClickReleased ()
{
- if (catSelected && !tagSelected) {
- EmitClickEvent ();
- SelectedTags.Clear ();
- catSelected = false;
- } else if (tagSelected) {
+ if (editClicked && !moved && EditButtonTagsEvent != null) {
+ EditButtonTagsEvent (Tagger);
+ } else if (cancelClicked) {
+ Clear ();
+ } else if (emitEvent) {
+ EmitCreateEvent ();
+ } else if (delayEvent) {
DelayTagClicked ();
+ } else if (applyClicked) {
+ if (SelectedTags.Count > 1) {
+ EmitCreateEvent ();
+ }
}
+ emitEvent = delayEvent = moved = editClicked = applyClicked = false;
}
void DrawTagsGroup (IDrawingToolkit tk, List<Tag> tags, ref double yptr)
{
double rowwidth;
+ Point start;
int tagsPerRow, row = 0;
tagsPerRow = Math.Max (1, Button.TagsPerRow);
rowwidth = catWidth / tagsPerRow;
+ start = new Point (Position.X, Position.Y + HeaderHeight);
+ tk.FontSize = 12;
+ tk.FontWeight = FontWeight.Light;
+
/* Draw tags */
for (int i=0; i < tags.Count; i++) {
Point pos;
@@ -309,23 +325,33 @@ namespace LongoMatch.Drawing.CanvasObjects
row = i / tagsPerRow;
col = i % tagsPerRow;
- pos = new Point (Button.Position.X + col * rowwidth,
- Button.Position.Y + yptr + row * heightPerRow);
+ pos = new Point (start.X + col * rowwidth,
+ start.Y + yptr + row * heightPerRow);
+ tk.StrokeColor = Button.DarkColor;
+ tk.LineWidth = 1;
+ /* Draw last vertical line when the last row is not fully filled*/
if (col == 0) {
if (i + tagsPerRow > tags.Count) {
- rowwidth = catWidth / (tags.Count - i);
+ tk.LineStyle = LineStyle.Dashed;
+ var st = new Point (pos.X + rowwidth * ((i + 1) %
tagsPerRow), pos.Y);
+ tk.DrawLine (st, new Point (st.X, st.Y + heightPerRow));
+ tk.LineStyle = LineStyle.Normal;
}
}
- tk.StrokeColor = Button.DarkColor;
- tk.LineWidth = 1;
if (col == 0) {
+ if (row != 0) {
+ tk.LineStyle = LineStyle.Dashed;
+ }
/* Horizontal line */
tk.DrawLine (pos, new Point (pos.X + catWidth, pos.Y));
+ tk.LineStyle = LineStyle.Normal;
} else {
/* Vertical line */
+ tk.LineStyle = LineStyle.Dashed;
tk.DrawLine (pos, new Point (pos.X, pos.Y + heightPerRow));
+ tk.LineStyle = LineStyle.Normal;
}
tk.StrokeColor = Button.TextColor;
tag = tags [i];
@@ -335,25 +361,70 @@ namespace LongoMatch.Drawing.CanvasObjects
yptr += heightPerRow * (row + 1);
}
- void DrawEditButton (IDrawingToolkit tk, ref double yptr)
+ void DrawHeader (IDrawingToolkit tk)
{
- Point start;
- Tag tag = AddTag;
+ Color textColor;
+ Point pos;
+ double width, height;
+ int fontSize;
+
+ if (Active) {
+ textColor = BackgroundColor;
+ } else {
+ textColor = TextColor;
+ }
+
+ width = HeaderTextWidth;
+ height = HeaderHeight;
+ pos = new Point (Position.X + HeaderTextOffset, Position.Y);
+ fontSize = StyleConf.ButtonHeaderFontSize;
+
+ if (ShowTags) {
+ rects.Add (new Rectangle (Position, Width, HeaderHeight), Button);
+ if (recording) {
+ /* Draw Timer instead */
+ return;
+ }
+ } else {
+ if (!recording) {
+ width = Width;
+ height = Height - HeaderHeight;
+ pos = new Point (Position.X, Position.Y + HeaderHeight);
+ fontSize = StyleConf.ButtonNameFontSize;
+ }
+ rects.Add (new Rectangle (Position, Width, Height), Button);
+ }
+ tk.FontSize = fontSize;
+ tk.StrokeColor = BackgroundColor;
+ tk.StrokeColor = textColor;
+ tk.FontWeight = FontWeight.Light;
+ tk.DrawText (pos, width, height, Button.AnalysisEventType.Name);
+ }
+
+ void DrawEditButton (IDrawingToolkit tk)
+ {
+ Point pos;
+ Color c;
+ double width, height;
if (Mode != TagMode.Edit) {
return;
}
- tk.StrokeColor = Button.DarkColor;
- tk.LineWidth = 1;
- start = new Point (Button.Position.X, Button.Position.Y + yptr);
- tk.DrawLine (start, new Point (start.X + catWidth, start.Y));
- tk.StrokeColor = Button.TextColor;
- tk.DrawImage (start, catWidth / 2, heightPerRow, EditSurface, true);
- tk.DrawText (new Point (start.X + catWidth / 2, start.Y),
- catWidth / 2, heightPerRow, Catalog.GetString ("Edit"));
- editRect.Update (start, catWidth, heightPerRow);
- rects [editRect] = tag;
- yptr += heightPerRow;
+
+ c = Config.Style.PaletteBackgroundDark;
+ width = StyleConf.ButtonRecWidth;
+ height = HeaderHeight;
+ pos = new Point (Position.X + Width - StyleConf.ButtonRecWidth,
+ Position.Y + Height - height);
+ tk.LineWidth = 0;
+ tk.FillColor = new Color (c.R, c.G, c.B, 200);
+ tk.StrokeColor = BackgroundColor;
+ tk.DrawRectangle (pos, width, height);
+ tk.StrokeColor = Color.Green1;
+ tk.FontSize = StyleConf.ButtonButtonsFontSize;
+ tk.DrawText (pos, width, height, "✐ EDIT");
+ editRect.Update (pos, width, height);
+ buttonsRects [editRect] = editbutton;
}
void DrawSelectedTags (IDrawingToolkit tk)
@@ -363,45 +434,117 @@ namespace LongoMatch.Drawing.CanvasObjects
}
foreach (Rectangle r in rects.Keys) {
object obj = rects [r];
- if ((obj is Tag && SelectedTags.Contains (obj as Tag)) ||
- obj is AnalysisEventButton && catSelected) {
- double radius = (Math.Min (Math.Min (r.Height, r.Width), 20) / 2) - 2;
+ if (obj is Tag && SelectedTags.Contains (obj as Tag)) {
tk.LineWidth = 0;
- tk.FillColor = Config.Style.PaletteActive;
- tk.DrawCircle (new Point (r.TopLeft.X + radius, r.TopLeft.Y +
radius), radius);
+ tk.FontWeight = FontWeight.Light;
+ tk.FillColor = TextColor;
+ tk.FontSize = 12;
+ tk.DrawRectangle (new Point (r.TopLeft.X, r.TopLeft.Y), r.Width,
r.Height);
+ tk.StrokeColor = BackgroundColor;
+ tk.DrawText (new Point (r.TopLeft.X, r.TopLeft.Y), r.Width, r.Height,
+ (obj as Tag).Value);
}
}
}
- void DrawRecordButton (IDrawingToolkit tk)
+ void DrawRecordTime (IDrawingToolkit tk)
{
- Point pos = Button.Position;
- /* Draw timer */
- if (Button.TagMode == TagMode.Free) {
- Point p = new Point (pos.X, pos.Y + recordY);
- /* Draw Tagger */
- tk.StrokeColor = Button.DarkColor;
- tk.LineWidth = 1;
- tk.DrawLine (p, new Point (pos.X + catWidth, pos.Y + recordY));
- tk.StrokeColor = Button.TextColor;
- if (Start == null) {
- recordRect.Update (p, catWidth, heightPerRow);
- rects [recordRect] = recordButton;
- rects [cancelRect] = null;
- tk.DrawImage (p, catWidth, heightPerRow, RecordSurface, true);
+ if (recording && Mode != TagMode.Edit) {
+ if (ShowTags) {
+ tk.FontSize = 12;
+ tk.FontWeight = FontWeight.Normal;
+ tk.StrokeColor = BackgroundColor;
+ tk.DrawText (new Point (Position.X + HeaderTextOffset, Position.Y),
+ HeaderTextWidth, HeaderHeight,
+ (CurrentTime - Start).ToSecondsString ());
} else {
- recordRect.Update (p, catWidth - 20, heightPerRow);
- rects [recordRect] = recordButton;
- tk.DrawImage (p, 20, heightPerRow, ApplySurface, true);
- p.X += 20;
- tk.DrawText (p, catWidth - 40, heightPerRow, (CurrentTime -
Start).ToSecondsString ());
- p = new Point (pos.X + catWidth - 20, p.Y);
- cancelRect.Update (p, 20, heightPerRow);
- rects [cancelRect] = cancelButton;
- tk.StrokeColor = Button.DarkColor;
- tk.LineWidth = 1;
- tk.DrawLine (p, new Point (p.X, p.Y + heightPerRow));
- tk.DrawImage (p, 20, heightPerRow, CancelSurface, true);
+ tk.FontSize = 24;
+ tk.FontWeight = FontWeight.Bold;
+ tk.StrokeColor = BackgroundColor;
+ tk.DrawText (new Point (Position.X, Position.Y + HeaderHeight),
+ Width, Height - HeaderHeight,
+ (CurrentTime - Start).ToSecondsString ());
+ }
+ }
+ }
+
+ void DrawApplyButton (IDrawingToolkit tk)
+ {
+ Point pos;
+ double width, height;
+
+ if (!ShowApplyButton || SelectedTags.Count == 0) {
+ rects [applyRect] = null;
+ return;
+ }
+
+ pos = new Point (Position.X + Width - StyleConf.ButtonRecWidth,
+ Position.Y);
+ width = StyleConf.ButtonRecWidth;
+ height = HeaderHeight;
+ tk.FillColor = Config.Style.PaletteBackgroundDark;
+ tk.LineWidth = 0;
+ tk.DrawRectangle (pos, width, height);
+ tk.StrokeColor = Color.Green1;
+ tk.FontSize = 12;
+ tk.DrawText (pos, width, height, " ✔ ");
+ applyRect.Update (pos, width, height);
+ buttonsRects[applyRect] = applyButton;
+ }
+
+ void DrawRecordButton (IDrawingToolkit tk)
+ {
+ Point pos;
+ double width, height;
+
+ if (Button.TagMode != TagMode.Free) {
+ return;
+ }
+
+ pos = new Point (Position.X + Width - StyleConf.ButtonRecWidth,
+ Position.Y);
+
+ width = StyleConf.ButtonRecWidth;
+ height = HeaderHeight;
+ tk.FontSize = StyleConf.ButtonButtonsFontSize;
+ if (!recording) {
+ tk.FillColor = Config.Style.PaletteBackgroundDark;
+ tk.StrokeColor = BackgroundColor;
+ tk.LineWidth = StyleConf.ButtonLineWidth;
+ tk.DrawRectangle (pos, width, height);
+ tk.StrokeColor = Color.Red1;
+ tk.DrawText (pos, width, height, "● REC");
+ } else {
+ tk.FillColor = tk.StrokeColor = BackgroundColor;
+ tk.DrawRectangle (pos, width, height);
+ tk.StrokeColor = TextColor;
+ tk.DrawText (pos, width, height, "✕");
+ cancelRect.Update (pos, width, height);
+ buttonsRects [cancelRect] = cancelButton;
+ }
+ }
+
+ new void DrawButton (IDrawingToolkit tk)
+ {
+ if (!ShowTags) {
+ base.DrawButton (tk);
+ } else {
+ tk.FillColor = BackgroundColor;
+ tk.StrokeColor = TextColor;
+ tk.LineWidth = 0;
+ tk.DrawRectangle (Position, Width, Height);
+ if (Active) {
+ tk.FillColor = TextColor;
+ tk.DrawRectangle (Position, Width, HeaderHeight);
+ }
+ if (Icon != null) {
+ if (Active) {
+ tk.FillColor = BackgroundColor;
+ } else {
+ tk.FillColor = TextColor;
+ }
+ tk.DrawImage (new Point (Position.X + 5, Position.Y + 5),
+ Icon.Width, Icon.Height, Icon, false, true);
}
}
}
@@ -409,14 +552,14 @@ namespace LongoMatch.Drawing.CanvasObjects
void DrawBackbuffer (IDrawingToolkit tk)
{
Point pos;
- double yptr = 0;
rects.Clear ();
+ buttonsRects.Clear ();
UpdateGroups ();
UpdateRows ();
- heightPerRow = Button.Height / nrows;
- catWidth = Button.Width;
- pos = Button.Position;
+ heightPerRow = (Height - HeaderHeight) / nrows;
+ catWidth = Width;
+ pos = Position;
tk.Begin ();
tk.TranslateAndScale (new Point (-Position.X, -Position.Y),
@@ -426,27 +569,16 @@ namespace LongoMatch.Drawing.CanvasObjects
/* Draw Rectangle */
DrawButton (tk);
DrawImage (tk);
-
- /* Draw header */
- tk.FillColor = LongoMatch.Core.Common.Color.Grey2;
- tk.LineWidth = 2;
- tk.StrokeColor = Button.TextColor;
- tk.DrawText (pos, catWidth, heightPerRow, Button.EventType.Name);
- rects.Add (new Rectangle (pos, catWidth, heightPerRow), Button);
- yptr += heightPerRow;
+ DrawHeader (tk);
+ DrawRecordButton (tk);
if (Button.ShowSubcategories) {
+ double yptr = 0;
foreach (List<Tag> tags in tagsByGroup.Values) {
DrawTagsGroup (tk, tags, ref yptr);
}
}
-
- DrawEditButton (tk, ref yptr);
-
- if (Button.TagMode == TagMode.Free) {
- recordY = yptr;
- }
-
+ DrawEditButton (tk);
tk.End ();
}
@@ -454,9 +586,7 @@ namespace LongoMatch.Drawing.CanvasObjects
{
IDrawingToolkit tk = Config.DrawingToolkit;
- if (backBufferSurface != null) {
- backBufferSurface.Dispose ();
- }
+ ResetBackbuffer ();
backBufferSurface = tk.CreateSurface ((int)Width, (int)Height);
using (IContext c = backBufferSurface.Context) {
@@ -468,6 +598,7 @@ namespace LongoMatch.Drawing.CanvasObjects
public override void Move (Selection s, Point p, Point start)
{
base.Move (s, p, start);
+ moved = true;
SelectedTags.Clear ();
switch (s.Position) {
case SelectionPosition.Right:
@@ -490,8 +621,9 @@ namespace LongoMatch.Drawing.CanvasObjects
tk.Context = ctx;
tk.Begin ();
tk.DrawSurface (backBufferSurface, Position);
- DrawRecordButton (tk);
DrawSelectedTags (tk);
+ DrawRecordTime (tk);
+ DrawApplyButton (tk);
DrawSelectionArea (tk);
tk.End ();
}
diff --git a/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
b/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
index b52e110..796d15e 100644
--- a/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/PlayersTaggerObject.cs
@@ -83,6 +83,8 @@ namespace LongoMatch.Drawing.CanvasObjects
field.Dispose ();
subPlayers.Dispose ();
subInjury.Dispose ();
+ homeButton.Dispose ();
+ awayButton.Dispose ();
base.Dispose (disposing);
}
@@ -528,7 +530,7 @@ namespace LongoMatch.Drawing.CanvasObjects
void EmitSubsitutionEvent (PlayerObject player1, PlayerObject player2)
{
TeamTemplate team;
- List<PlayerObject> bench, field;
+ List<PlayerObject> bench;
if (substitutionPlayer.Team == Team.LOCAL) {
team = homeTeam;
diff --git a/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
b/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
index 4862e25..a7e9654 100644
--- a/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/PositionObject.cs
@@ -126,10 +126,8 @@ namespace LongoMatch.Drawing.CanvasObjects
public override void Draw (IDrawingToolkit tk, Area area)
{
- Color color, scolor;
+ Color color;
double relSize;
- Area objectArea;
-
relSize = Math.Max (1, (double)Width / 200);
diff --git a/LongoMatch.Drawing/CanvasObjects/ScoreObject.cs b/LongoMatch.Drawing/CanvasObjects/ScoreObject.cs
index bef8725..3e53502 100644
--- a/LongoMatch.Drawing/CanvasObjects/ScoreObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/ScoreObject.cs
@@ -25,9 +25,15 @@ namespace LongoMatch.Drawing.CanvasObjects
{
public class ScoreObject: TaggerObject
{
+ static Image iconImage;
+
public ScoreObject (ScoreButton score): base (score)
{
Button = score;
+ if (iconImage == null) {
+ iconImage = new Image (System.IO.Path.Combine (Config.ImagesDir,
+ StyleConf.ButtonScoreIcon));
+ }
}
public ScoreButton Button {
@@ -35,6 +41,12 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
}
+ public override Image Icon {
+ get {
+ return iconImage;
+ }
+ }
+
public override string Text {
get {
return Button.Name;
diff --git a/LongoMatch.Drawing/CanvasObjects/TagObject.cs b/LongoMatch.Drawing/CanvasObjects/TagObject.cs
index eb1b3e7..1816f7b 100644
--- a/LongoMatch.Drawing/CanvasObjects/TagObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TagObject.cs
@@ -25,10 +25,16 @@ namespace LongoMatch.Drawing.CanvasObjects
{
public class TagObject: TaggerObject
{
+ static Image iconImage;
+
public TagObject (TagButton tagger): base (tagger)
{
TagButton = tagger;
Toggle = true;
+ if (iconImage == null) {
+ iconImage = new Image (System.IO.Path.Combine (Config.ImagesDir,
+ StyleConf.ButtonTagIcon));
+ }
}
public TagButton TagButton {
@@ -36,6 +42,12 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
}
+ public override Image Icon {
+ get {
+ return iconImage;
+ }
+ }
+
public override string Text {
get {
return TagButton.Tag.Value;
diff --git a/LongoMatch.Drawing/CanvasObjects/TaggerObject.cs
b/LongoMatch.Drawing/CanvasObjects/TaggerObject.cs
index f28644b..2790bcd 100644
--- a/LongoMatch.Drawing/CanvasObjects/TaggerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TaggerObject.cs
@@ -101,6 +101,17 @@ namespace LongoMatch.Drawing.CanvasObjects
}
}
+ public override bool Active {
+ get {
+ return base.Active;
+ }
+ set {
+ if (Mode != TagMode.Edit) {
+ base.Active = value;
+ }
+ }
+ }
+
public virtual int NRows {
get {
return 1;
diff --git a/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
b/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
index 22cb284..90f3927 100644
--- a/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
@@ -340,8 +340,6 @@ namespace LongoMatch.Drawing.CanvasObjects
base.DrawBackground (tk, area);
if (ShowLine) {
- Color c;
-
linepos = OffsetY + Height - StyleConf.TimelineLineSize;
tk.FillColor = Config.Style.PaletteBackgroundDark;
tk.StrokeColor = Config.Style.PaletteBackgroundDark;
diff --git a/LongoMatch.Drawing/CanvasObjects/TimerObject.cs b/LongoMatch.Drawing/CanvasObjects/TimerObject.cs
index 0c7b7b8..3d9e5ba 100644
--- a/LongoMatch.Drawing/CanvasObjects/TimerObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TimerObject.cs
@@ -15,10 +15,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
-using System;
-using System.Linq;
using LongoMatch.Core.Common;
-using LongoMatch.Core.Interfaces;
using LongoMatch.Core.Interfaces.Drawing;
using LongoMatch.Core.Store;
@@ -27,13 +24,19 @@ namespace LongoMatch.Drawing.CanvasObjects
public class TimerObject: TaggerObject
{
Time currentTime;
- Image backgroundImage;
+ static Image iconImage;
public TimerObject (TimerButton timer): base (timer)
{
Button = timer;
Toggle = true;
CurrentTime = new Time (0);
+ if (iconImage == null) {
+ iconImage = new Image (System.IO.Path.Combine (Config.ImagesDir,
+ StyleConf.ButtonTimerIcon));
+ }
+ MinWidth = StyleConf.ButtonMinWidth;
+ MinHeight = StyleConf.ButtonHeaderHeight + StyleConf.ButtonTimerFontSize;
}
public TimerButton Button {
@@ -41,6 +44,12 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
}
+ public override Image Icon {
+ get {
+ return iconImage;
+ }
+ }
+
public Time CurrentTime {
set {
bool update = false;
@@ -48,11 +57,12 @@ namespace LongoMatch.Drawing.CanvasObjects
if (CurrentTimeNode != null) {
if (value < CurrentTimeNode.Start) {
Button.Timer.CancelTimer ();
+ Active = false;
CurrentTimeNode = null;
}
}
if (value != null && currentTime != null &&
- currentTime.Seconds != value.Seconds) {
+ currentTime.Seconds != value.Seconds) {
update = true;
}
currentTime = value;
@@ -80,17 +90,9 @@ namespace LongoMatch.Drawing.CanvasObjects
}
}
- public override Image BackgroundImage {
- get {
- if (backgroundImage != null) {
- return backgroundImage;
- } else {
- return Button.BackgroundImage;
- }
- }
- set {
- backgroundImage = value;
- }
+ public Image TeamImage {
+ get;
+ set;
}
public override void ClickReleased ()
@@ -112,33 +114,41 @@ namespace LongoMatch.Drawing.CanvasObjects
public override void Draw (IDrawingToolkit tk, Area area)
{
- double h;
-
- if (CurrentTimeNode == null || Mode == TagMode.Edit) {
- h = Button.Height;
- } else {
- h = Button.Height / 2;
- }
-
if (!UpdateDrawArea (tk, area, Area)) {
return;
- };
+ }
+
+ base.Draw (tk, area);
tk.Begin ();
- /* Draw Rectangle */
- DrawButton (tk);
- DrawImage (tk);
- /* Draw header */
- tk.LineWidth = 2;
- tk.StrokeColor = Button.TextColor;
- tk.FillColor = Button.TextColor;
- tk.FontWeight = FontWeight.Bold;
- tk.DrawText (DrawPosition, Button.Width, h, Button.Timer.Name);
- if (CurrentTimeNode != null && Mode != TagMode.Edit) {
- tk.DrawText (new Point (DrawPosition.X, Position.Y + h), Button.Width, h,
+ if (Active && Mode != TagMode.Edit) {
+ tk.LineWidth = 2;
+ tk.StrokeColor = Button.BackgroundColor;
+ tk.FillColor = Button.BackgroundColor;
+ tk.FontWeight = FontWeight.Normal;
+ tk.FontSize = StyleConf.ButtonHeaderFontSize;
+ tk.FontAlignment = FontAlignment.Left;
+ tk.DrawText (new Point (Position.X + StyleConf.ButtonHeaderWidth, Position.Y),
+ Button.Width - StyleConf.ButtonHeaderWidth,
+ StyleConf.ButtonHeaderHeight, Button.Timer.Name);
+ tk.FontWeight = FontWeight.Bold;
+ tk.FontSize = StyleConf.ButtonTimerFontSize;
+ tk.FontAlignment = FontAlignment.Center;
+ tk.DrawText (new Point (Position.X, Position.Y +
StyleConf.ButtonHeaderHeight),
+ Button.Width, Button.Height - StyleConf.ButtonHeaderHeight,
PartialTime.ToSecondsString ());
+ } else {
+ Text = Button.Timer.Name;
+ DrawText (tk);
+ Text = null;
}
+
+ if (TeamImage != null) {
+ tk.DrawImage (new Point (Position.X + Width - 40, Position.Y + 5), 40,
+ iconImage.Height, TeamImage, true);
+ }
+
DrawSelectionArea (tk);
tk.End ();
}
diff --git a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
index c95aa75..e081b38 100644
--- a/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
+++ b/LongoMatch.Drawing/Widgets/DashboardCanvas.cs
@@ -33,7 +33,7 @@ namespace LongoMatch.Drawing.Widgets
{
public event ButtonsSelectedHandlers TaggersSelectedEvent;
- public event ButtonSelectedHandler AddNewTagEvent;
+ public event ButtonSelectedHandler EditButtonTagsEvent;
public event ShowButtonsTaggerMenuHandler ShowMenuEvent;
public event NewEventHandler NewTagEvent;
@@ -154,12 +154,7 @@ namespace LongoMatch.Drawing.Widgets
sel = Selections.LastOrDefault ();
if (sel != null) {
TaggerObject to = sel.Drawable as TaggerObject;
- Tag tag = null;
-
- if (to is CategoryObject) {
- tag = (to as CategoryObject).GetTagForCoords (coords);
- }
- ShowMenuEvent (to.Tagger, tag);
+ ShowMenuEvent (to.Tagger, null);
}
}
@@ -239,8 +234,8 @@ namespace LongoMatch.Drawing.Widgets
foreach (AnalysisEventButton cat in template.List.OfType<AnalysisEventButton>()) {
CategoryObject co = new CategoryObject (cat);
co.ClickedEvent += HandleTaggerClickedEvent;
+ co.EditButtonTagsEvent += (t) => EditButtonTagsEvent (t);
co.Mode = TagMode;
- co.AddTag = AddTag;
AddObject (co);
}
foreach (PenaltyCardButton c in template.List.OfType<PenaltyCardButton>()) {
@@ -262,9 +257,9 @@ namespace LongoMatch.Drawing.Widgets
to.Mode = TagMode;
if (Project != null && t.BackgroundImage == null) {
if (t.Timer.Team == Team.LOCAL) {
- to.BackgroundImage = Project.LocalTeamTemplate.Shield;
+ to.TeamImage = Project.LocalTeamTemplate.Shield;
} else if (t.Timer.Team == Team.VISITOR) {
- to.BackgroundImage = Project.VisitorTeamTemplate.Shield;
+ to.TeamImage = Project.VisitorTeamTemplate.Shield;
}
}
AddObject (to);
@@ -324,11 +319,6 @@ namespace LongoMatch.Drawing.Widgets
button = tagger.Tagger as EventButton;
if (TagMode == TagMode.Edit) {
- if (tagger is CategoryObject) {
- if ((tagger as CategoryObject).SelectedTags.Contains (AddTag)) {
- AddNewTagEvent (tagger.Tagger);
- }
- }
return;
}
diff --git a/LongoMatch.Drawing/Widgets/PositionTagger.cs b/LongoMatch.Drawing/Widgets/PositionTagger.cs
index 65ce458..e12943a 100644
--- a/LongoMatch.Drawing/Widgets/PositionTagger.cs
+++ b/LongoMatch.Drawing/Widgets/PositionTagger.cs
@@ -135,9 +135,8 @@ namespace LongoMatch.Drawing.Widgets
public void RemovePlays (List<TimelineEvent> plays)
{
- List<ICanvasObject> objects;
-
- foreach (ICanvasObject co in Objects.Where (o => plays.Contains ((o as
PositionObject).Play)).ToList()) {
+ foreach (ICanvasObject co in
+ Objects.Where (o => plays.Contains ((o as PositionObject).Play)).ToList()) {
RemoveObject (co);
}
}
diff --git a/LongoMatch.GUI/Gui/Component/CodingWidget.cs b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
index 7e8b613..eb51c37 100644
--- a/LongoMatch.GUI/Gui/Component/CodingWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/CodingWidget.cs
@@ -261,9 +261,7 @@ namespace LongoMatch.Gui.Component
play.Team = teamtagger.SelectedTeam;
play.Players = selectedPlayers ?? new List<Player> ();
play.Tags = tags ?? new List<Tag> ();
- if (eventType.TagFieldPosition || eventType.TagGoalPosition ||
eventType.TagHalfFieldPosition) {
- Config.GUIToolkit.EditPlay (play, project, false, true, false, false);
- }
+ Config.GUIToolkit.EditPlay (play, project, true, true, true, true);
teamtagger.ResetSelection ();
selectedPlayers = null;
Config.EventsBroker.EmitNewEvent (play);
diff --git a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
index 2c4ebf9..a94ee85 100644
--- a/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/DashboardWidget.cs
@@ -66,7 +66,7 @@ namespace LongoMatch.Gui.Component
tagger.TaggersSelectedEvent += HandleTaggersSelectedEvent;
tagger.ShowMenuEvent += HandleShowMenuEvent;
tagger.NewTagEvent += HandleNewTagEvent;
- tagger.AddNewTagEvent += HandleAddNewTagEvent;
+ tagger.EditButtonTagsEvent += HandleAddNewTagEvent;
drawingarea.CanFocus = true;
drawingarea.KeyPressEvent += HandleKeyPressEvent;
fieldeventbox.ButtonPressEvent += HandleFieldButtonPressEvent;
@@ -149,9 +149,12 @@ namespace LongoMatch.Gui.Component
set {
template = value;
tagger.Template = value;
- fieldimage.Pixbuf = value.FieldBackground.Scale (50, 50).Value;
- hfieldimage.Pixbuf = value.HalfFieldBackground.Scale (50, 50).Value;
- goalimage.Pixbuf = value.GoalBackground.Scale (50, 50).Value;
+ try {
+ fieldimage.Pixbuf = value.FieldBackground.Scale (50, 50).Value;
+ hfieldimage.Pixbuf = value.HalfFieldBackground.Scale (50, 50).Value;
+ goalimage.Pixbuf = value.GoalBackground.Scale (50, 50).Value;
+ } catch {
+ }
periodsentry.Text = String.Join ("-", template.GamePeriods);
Edited = false;
// Start with disabled widget until something get selected
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index c4e4e18..4874768 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -59,7 +59,6 @@ namespace LongoMatch.Gui
{
this.Build();
this.guiToolKit = guiToolkit;
-
Title = Constants.SOFTWARE_NAME;
TagSubcategoriesAction.Active = !Config.FastTagging;
projectType = ProjectType.None;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
index da93f26..62b2123 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
@@ -25,7 +25,7 @@ namespace LongoMatch.Gui.Component
this.notebook = new global::Gtk.Notebook ();
this.notebook.CanFocus = true;
this.notebook.Name = "notebook";
- this.notebook.CurrentPage = 1;
+ this.notebook.CurrentPage = 0;
this.notebook.TabPos = ((global::Gtk.PositionType)(0));
this.notebook.ShowBorder = false;
// Container child notebook.Gtk.Notebook+NotebookChild
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 03f98f2..dd25713 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -10348,7 +10348,7 @@ You can continue with the current capture, cancel it or save your project.
<widget class="Gtk.Notebook" id="notebook">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="CurrentPage">1</property>
+ <property name="CurrentPage">0</property>
<property name="TabPos">Left</property>
<property name="ShowBorder">False</property>
<child>
diff --git a/LongoMatch/LongoMatch.csproj b/LongoMatch/LongoMatch.csproj
index 10367f1..5410f59 100644
--- a/LongoMatch/LongoMatch.csproj
+++ b/LongoMatch/LongoMatch.csproj
@@ -7,6 +7,8 @@
<OutputType>Exe</OutputType>
<RootNamespace>LongoMatch</RootNamespace>
<AssemblyName>LongoMatch</AssemblyName>
+ <ProductVersion>12.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -41,10 +43,16 @@
<Compile Include="AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
- <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>glib-sharp-2.0</Package>
+ </Reference>
+ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>gtk-sharp-2.0</Package>
+ </Reference>
<Reference Include="Mono.Posix" />
- <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+ <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+ <Package>gtk-sharp-2.0</Package>
+ </Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LongoMatch.Services\LongoMatch.Services.csproj">
diff --git a/data/images/dashboard/longomatch-event.svg b/data/images/dashboard/longomatch-event.svg
new file mode 100644
index 0000000..cc3cd7a
--- /dev/null
+++ b/data/images/dashboard/longomatch-event.svg
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ width="18.301264"
+ height="18"
+ viewBox="0 -0.022 18.301264 18"
+ enable-background="new 0 -0.022 25.386 24.969"
+ xml:space="preserve"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="longomatch-event.svg"><metadata
+ id="metadata19"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs17" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="733"
+ inkscape:window-height="480"
+ id="namedview15"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:zoom="9.4517202"
+ inkscape:cx="9.1497921"
+ inkscape:cy="8.9995472"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="Layer_1" /><g
+ id="g3"
+ transform="matrix(0.72088098,0,0,0.72088098,-1.157436e-4,-0.00565281)"><path
+ d="m 22.443,13.34 -1.545,2 -2,-1.544 c -0.551,-0.426 -1.344,-0.324 -1.769,0.228 -0.425,0.549
-0.323,1.342 0.228,1.768 l 2,1.545 -1.545,2.001 c -0.426,0.55 -0.324,1.342 0.228,1.769 0.549,0.426
1.342,0.324 1.769,-0.227 l 1.545,-2.001 2.002,1.545 c 0.551,0.426 1.342,0.324 1.768,-0.227 0.426,-0.552
0.325,-1.344 -0.227,-1.769 l -2.002,-1.545 1.545,-2 c 0.426,-0.552 0.325,-1.344 -0.228,-1.769 -0.552,-0.427
-1.344,-0.326 -1.769,0.226 z"
+ id="path5"
+ inkscape:connector-curvature="0"
+ style="fill:#252627" /><path
+ d="M 16.845,3.263 14.337,3.585 14.015,1.077 c -0.089,-0.69 -0.72,-1.179 -1.41,-1.089 -0.691,0.089
-1.179,0.721 -1.09,1.411 L 11.837,3.906 9.329,4.229 C 8.64,4.318 8.151,4.949 8.24,5.64 8.328,6.33 8.959,6.819
9.65,6.73 l 2.507,-0.323 0.323,2.508 c 0.088,0.69 0.719,1.179 1.41,1.089 0.69,-0.089 1.179,-0.721 1.089,-1.41
l -0.32,-2.507 2.508,-0.322 c 0.69,-0.089 1.179,-0.721 1.089,-1.41 -0.089,-0.693 -0.72,-1.181 -1.411,-1.092 z"
+ id="path7"
+ inkscape:connector-curvature="0"
+ style="fill:#252627" /><path
+ d="M 5.578,8.638 4.033,10.641 2.031,9.096 C 1.48,8.671 0.687,8.772 0.263,9.322 -0.163,9.873
-0.06,10.666 0.491,11.091 l 2,1.546 -1.545,2 c -0.425,0.55 -0.323,1.344 0.228,1.769 0.551,0.426 1.343,0.323
1.769,-0.227 l 1.545,-2.001 2.003,1.545 c 0.55,0.424 1.342,0.323 1.767,-0.227 0.426,-0.551 0.323,-1.344
-0.227,-1.769 L 6.03,12.184 7.575,10.181 C 8,9.63 7.898,8.838 7.348,8.412 6.795,7.986 6.002,8.088 5.578,8.638
z"
+ id="path9"
+ inkscape:connector-curvature="0"
+ style="fill:#252627" /><g
+ id="g11"><path
+ d="m 24.626,7.727 0,0 L 23.628,6.956 20.962,4.897 C 20.411,4.472 19.618,4.573 19.193,5.125
18.768,5.676 18.87,6.467 19.42,6.893 l 1.585,1.223 c -1.528,0.359 -3.931,1.129 -6.49,2.764 -2.052,1.31
-3.923,4.235 -4.748,5.649 -0.625,-0.222 -1.303,-0.323 -2.006,-0.233 -2.379,0.306 -4.06,2.483 -3.754,4.861
0.306,2.38 2.483,4.059 4.861,3.754 2.378,-0.306 4.06,-2.482 3.754,-4.861 -0.117,-0.917 -0.518,-1.726
-1.097,-2.364 0.834,-1.447 2.532,-4.021 4.122,-5.035 2.083,-1.33 4.067,-2.024 5.425,-2.381 l -1.042,1.349 c
-0.425,0.551 -0.324,1.343 0.228,1.768 0.551,0.425 1.343,0.324 1.769,-0.227 l 2.058,-2.666 0.761,-0.985 C
25.05,9.252 25.156,8.918 25.112,8.567 25.065,8.218 24.883,7.924 24.626,7.727 z M 8.542,22.42 c -1.002,0.13
-1.92,-0.579 -2.05,-1.583 -0.129,-1.004 0.581,-1.921 1.583,-2.05 1.004,-0.129 1.922,0.579 2.05,1.583
0.129,1.002 -0.579,1.92 -1.583,2.05 z"
+ id="path13"
+ inkscape:connector-curvature="0"
+ style="fill:#252627" /></g></g></svg>
\ No newline at end of file
diff --git a/data/images/dashboard/longomatch-penalties.svg b/data/images/dashboard/longomatch-penalties.svg
new file mode 100644
index 0000000..974bea1
--- /dev/null
+++ b/data/images/dashboard/longomatch-penalties.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="33.799px" height="18px" viewBox="0 0 33.799 18" enable-background="new 0 0 33.799 18"
xml:space="preserve">
+<g>
+ <g>
+ <path fill="#FFFFFF"
d="M2.961,7.481C2.154,7.482,1.483,8.144,1.459,8.978c-0.025,0.827,0.602,1.496,1.411,1.498
+ c0.807-0.001,1.478-0.662,1.504-1.497C4.4,8.151,3.773,7.482,2.961,7.481z"/>
+ <path fill="#262626"
d="M10.943,14.018c0.536-1.195,1.945-1.73,3.14-1.194l2.759,1.238l1.238-2.759
+
c0.536-1.195,1.944-1.731,3.137-1.195l0.503,0.225c0.076-0.437,0.133-0.882,0.147-1.338c0.019-0.648-0.027-1.276-0.136-1.884
+
l11.932-2.603l0.136-4.494l-14.577-0.01l-0.089,2.997l-4.376-0.003l0.092-2.996L13.39,0C9.363-0.003,5.887,2.791,4.756,6.599
+
c-0.48-0.387-1.084-0.613-1.749-0.613c-1.607-0.003-2.956,1.34-3.005,2.993c-0.052,1.657,1.213,2.998,2.825,2.999
+
c0.665,0,1.283-0.226,1.788-0.613c0.635,2.685,2.467,4.862,4.9,5.919c0.03-0.103,0.057-0.207,0.102-0.307
+ C9.616,16.975,10.943,14.018,10.943,14.018z
M2.872,10.477c-0.81-0.001-1.436-0.67-1.411-1.498
+
c0.024-0.834,0.696-1.497,1.503-1.497c0.812,0.001,1.438,0.67,1.412,1.498C4.349,9.815,3.678,10.475,2.872,10.477z"/>
+ </g>
+ <path fill="#262626"
d="M21.685,6.825c0.393,1.843,0.219,3.846-0.624,5.724c-2.045,4.558-7.255,6.659-11.637,4.693
+ c-2.654-1.191-4.395-3.601-4.902-6.329C4.193,9.136,4.387,7.226,5.193,5.429"/>
+</g>
+</svg>
diff --git a/data/images/dashboard/longomatch-score.svg b/data/images/dashboard/longomatch-score.svg
new file mode 100644
index 0000000..f37bc4b
--- /dev/null
+++ b/data/images/dashboard/longomatch-score.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px"
+ width="30.289px" height="18px" viewBox="0 0 30.289 18" enable-background="new 0 0 30.289 18"
xml:space="preserve">
+<g id="Calque_1">
+</g>
+<g id="Layer_1">
+ <g>
+ <path fill="none"
d="M25.644,14.392c0.207-0.207,0.4-0.446,0.571-0.738c0.301-0.514,0.535-1.165,0.703-1.95
+
c0.168-0.785,0.254-1.708,0.254-2.772c0-0.148-0.005-0.301-0.013-0.454s-0.013-0.3-0.013-0.441l-6.17,4.634
+ c0.196,0.618,0.453,1.118,0.765,1.506"/>
+ <path fill="none"
d="M26.716,5.182c-0.295-0.868-0.687-1.512-1.172-1.929c-0.485-0.417-1.058-0.626-1.717-0.626
+
c-0.472,0-0.91,0.125-1.317,0.375c-0.405,0.25-0.758,0.634-1.058,1.152c-0.298,0.518-0.535,1.167-0.708,1.949
+
c-0.174,0.781-0.259,1.707-0.259,2.778c0,0.175,0,0.339,0,0.494c0,0.153,0.008,0.31,0.026,0.467L26.716,5.182z"/>
+ <g>
+ <polygon fill="#252627" points="7.855,0.19 5.258,0.19 0,3.075 1.014,5.696 4.687,3.587
4.687,14.648 0.469,14.648 0.469,17.507
+ 11.491,17.507 11.491,14.648 7.855,14.648 "/>
+ <path fill="#252627"
d="M15.652,17.625c0.278-0.122,0.519-0.292,0.722-0.507c0.203-0.214,0.363-0.467,0.482-0.756
+
c0.117-0.29,0.176-0.602,0.176-0.935c0-0.325-0.06-0.633-0.176-0.923c-0.119-0.29-0.279-0.538-0.482-0.751
+
c-0.203-0.21-0.443-0.377-0.722-0.5c-0.279-0.124-0.577-0.184-0.9-0.184s-0.619,0.061-0.894,0.184
+
c-0.274,0.124-0.515,0.29-0.722,0.5c-0.207,0.212-0.369,0.461-0.489,0.751c-0.118,0.29-0.176,0.598-0.176,0.923
+
c0,0.334,0.058,0.645,0.176,0.935c0.12,0.288,0.281,0.542,0.489,0.756c0.206,0.215,0.448,0.386,0.722,0.507
+ c0.275,0.124,0.573,0.184,0.894,0.184S15.371,17.748,15.652,17.625z"/>
+ <path fill="#252627"
d="M13.137,8.051c0.206,0.212,0.448,0.377,0.722,0.5c0.275,0.124,0.573,0.184,0.894,0.184
+
c0.321,0,0.619-0.061,0.9-0.184c0.278-0.123,0.519-0.288,0.722-0.5c0.203-0.21,0.363-0.461,0.482-0.749
+
c0.117-0.29,0.176-0.602,0.176-0.935c0-0.325-0.06-0.633-0.176-0.922c-0.119-0.291-0.279-0.542-0.482-0.757
+
c-0.203-0.215-0.443-0.384-0.722-0.507c-0.279-0.122-0.577-0.184-0.9-0.184c-0.322,0-0.619,0.062-0.894,0.184
+
c-0.274,0.124-0.515,0.292-0.722,0.507c-0.207,0.214-0.369,0.465-0.489,0.757c-0.118,0.289-0.176,0.597-0.176,0.922
+ c0,0.334,0.058,0.645,0.176,0.935C12.768,7.59,12.929,7.841,13.137,8.051z"/>
+ </g>
+ <path fill="none" d="M23.705,1.487"/>
+ <path fill="#252627"
d="M29.823,4.812c-0.315-1.114-0.747-2.026-1.3-2.737c-0.553-0.712-1.214-1.234-1.982-1.568
+
c-0.771-0.334-1.611-0.5-2.521-0.5c-1.048,0-1.986,0.203-2.814,0.606c-0.828,0.404-1.525,0.989-2.09,1.758
+
c-0.566,0.768-0.998,1.71-1.297,2.825c-0.301,1.115-0.451,2.378-0.451,3.791c0,1.554,0.156,2.89,0.469,4.004
+
c0.312,1.114,0.747,2.03,1.305,2.746c0.034,0.043,0.071,0.081,0.107,0.122l-0.008,0.016c1.183,1.317,2.748,2.119,4.465,2.119
+
c1.325,0,2.559-0.477,3.598-1.301v-0.034c0.46-0.338,0.885-0.727,1.246-1.213c0.571-0.768,1.001-1.708,1.299-2.824
+ c0.294-1.116,0.441-2.379,0.441-3.794C30.289,7.268,30.133,5.928,29.823,4.812z
M20.482,9.376
+
c0.001-0.155,0.001-0.319,0.001-0.494c0-1.071,0.085-1.997,0.259-2.778c0.173-0.782,0.41-1.431,0.708-1.949
+
c0.301-0.519,0.653-0.902,1.058-1.152c0.407-0.25,0.845-0.375,1.317-0.375c0.658,0,1.232,0.208,1.717,0.626
+
c0.485,0.417,0.876,1.06,1.172,1.929l-6.206,4.661C20.49,9.684,20.482,9.528,20.482,9.376z M26.92,11.706
+
c-0.168,0.786-0.402,1.435-0.703,1.95c-0.126,0.216-0.268,0.396-0.415,0.563l-0.005-0.002c-0.567,0.68-1.261,1.08-2.01,1.08
+
c-0.807,0-1.545-0.476-2.133-1.254c-0.271-0.368-0.503-0.814-0.678-1.369l6.17-4.634c0,0.141,0.005,0.287,0.013,0.441
+ c0.008,0.153,0.013,0.306,0.013,0.454C27.174,9.997,27.088,10.92,26.92,11.706z"/>
+ </g>
+</g>
+</svg>
diff --git a/data/images/dashboard/longomatch-tag.svg b/data/images/dashboard/longomatch-tag.svg
new file mode 100644
index 0000000..aaad5fd
--- /dev/null
+++ b/data/images/dashboard/longomatch-tag.svg
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px"
+ width="30.563px" height="17.999px" viewBox="0 0 30.563 17.999" enable-background="new 0 0 30.563
17.999" xml:space="preserve">
+<g id="Layer_1">
+</g>
+<g id="Calque_1">
+ <path fill="#252627"
d="M28.349,10.096C29,9.463,29,8.432,28.347,7.797L20.656,0.33c-0.236-0.23-0.485-0.32-0.952-0.32L1.535,0
+ C0.688-0.001,0.001,0.667,0,1.493l0.102,15.009c0.002,0.826,0.691,1.495,1.538,1.496l18.075-0.045
+ c0.467,0.001,0.75-0.192,0.957-0.393L28.349,10.096L28.349,10.096z
M19.486,10.678c-0.978-0.952-0.978-2.499-0.001-3.45
+
c0.978-0.952,2.57-0.952,3.548,0c0.981,0.954,0.981,2.501,0.002,3.453C22.058,11.632,20.466,11.632,19.486,10.678z"/>
+</g>
+</svg>
diff --git a/data/images/dashboard/longomatch-timer.svg b/data/images/dashboard/longomatch-timer.svg
new file mode 100644
index 0000000..3422e0e
--- /dev/null
+++ b/data/images/dashboard/longomatch-timer.svg
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Icons"
+ x="0px"
+ y="0px"
+ width="18"
+ height="18"
+ viewBox="0 0 18 18"
+ enable-background="new 0 0 22.985 22.985"
+ xml:space="preserve"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="longomatch-timer.svg"><metadata
+ id="metadata12"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs10" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="798"
+ inkscape:window-height="844"
+ id="namedview8"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:zoom="12.874565"
+ inkscape:cx="9"
+ inkscape:cy="8.9999998"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="Icons" /><g
+ id="timemachine"
+ transform="scale(0.7831194,0.7831194)"><path
+ d="m 11.493,0 c 2.988,0 5.833,1.17 7.963,3.231 l 2.303,-2.303 c 0.138,-0.138 0.321,-0.21 0.508,-0.21
0.092,0 0.186,0.017 0.275,0.055 0.269,0.11 0.443,0.373 0.443,0.664 v 6.465 c 0,0.397 -0.321,0.718
-0.718,0.718 h -6.465 c -0.29,0 -0.552,-0.175 -0.664,-0.443 -0.111,-0.269 -0.05,-0.578 0.156,-0.782 l
2.138,-2.139 c -1.596,-1.524 -3.714,-2.382 -5.94,-2.382 -4.753,0 -8.619,3.866 -8.619,8.619 0,4.753
3.866,8.619 8.619,8.619 4.478,0 8.254,-3.494 8.594,-7.956 0.029,-0.374 0.341,-0.663 0.717,-0.663 h 1.44 c
0.199,0 0.389,0.082 0.524,0.227 0.135,0.145 0.205,0.341 0.192,0.538 C 22.56,18.273 17.524,22.985
11.492,22.985 5.156,22.985 0,17.829 0,11.493 0,5.157 5.156,0 11.493,0 z"
+ id="path4"
+ inkscape:connector-curvature="0"
+ style="fill:#252627" /><path
+ d="M 15.444,10.056 H 12.93 V 5.387 c 0,-0.199 -0.161,-0.359 -0.359,-0.359 h -2.155 c -0.199,0
-0.359,0.161 -0.359,0.359 v 5.028 0.718 1.436 c 0,0.199 0.161,0.359 0.359,0.359 h 2.155 2.873 c 0.199,0
0.359,-0.161 0.359,-0.359 v -1.436 -0.718 c 0,-0.199 -0.161,-0.359 -0.359,-0.359 z"
+ id="path6"
+ inkscape:connector-curvature="0"
+ style="fill:#252627" /></g></svg>
\ No newline at end of file
diff --git a/libcesarplayer/liblongomatch.cproj b/libcesarplayer/liblongomatch.cproj
index c74c8c8..16564d8 100644
--- a/libcesarplayer/liblongomatch.cproj
+++ b/libcesarplayer/liblongomatch.cproj
@@ -22,6 +22,8 @@
</Compiler>
<Language>C</Language>
<Target>Bin</Target>
+ <ProductVersion>12.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]