[longomatch] Add Shield to teams templates
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add Shield to teams templates
- Date: Wed, 21 Sep 2011 21:06:29 +0000 (UTC)
commit 511cad0384ec8f800d52baef4717c14bb09c42d2
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Sep 16 16:08:26 2011 +0200
Add Shield to teams templates
LongoMatch/Store/Templates/TeamTemplate.cs | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch/Store/Templates/TeamTemplate.cs b/LongoMatch/Store/Templates/TeamTemplate.cs
index 16b944f..ae7575e 100644
--- a/LongoMatch/Store/Templates/TeamTemplate.cs
+++ b/LongoMatch/Store/Templates/TeamTemplate.cs
@@ -20,6 +20,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using Mono.Unix;
+using Gdk;
using LongoMatch.Common;
using LongoMatch.Interfaces;
@@ -30,6 +31,10 @@ namespace LongoMatch.Store.Templates
public class TeamTemplate: List<Player>, ITemplate<Player>
{
+ private byte[] thumbnailBuf;
+ private const int MAX_WIDTH=100;
+ private const int MAX_HEIGHT=75;
+
public TeamTemplate() {
TeamName = Catalog.GetString("default");
}
@@ -44,6 +49,17 @@ namespace LongoMatch.Store.Templates
set;
}
+ public Pixbuf Shield {
+ get {
+ if(thumbnailBuf != null)
+ return new Pixbuf(thumbnailBuf);
+ else return null;
+ } set {
+ var pix = ImageUtils.Scale(value, MAX_WIDTH, MAX_HEIGHT);
+ thumbnailBuf = ImageUtils.Serialize(pix);
+ }
+ }
+
public List<Player> PlayingPlayersList {
get {
return this.Where(p=>p.Playing).Select(p=>p).ToList();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]