[gbrainy] Fix figure patterns selection area for mouse



commit 3d148a1302a762f3e75370cc511ee3b0575f71f4
Author: Jordi Mas <jmas softcatala org>
Date:   Sat Jan 19 09:31:07 2013 +0100

    Fix figure patterns selection area for mouse

 src/Games/Logic/PuzzleFigurePattern.cs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/Games/Logic/PuzzleFigurePattern.cs b/src/Games/Logic/PuzzleFigurePattern.cs
index 112e914..ebba694 100644
--- a/src/Games/Logic/PuzzleFigurePattern.cs
+++ b/src/Games/Logic/PuzzleFigurePattern.cs
@@ -106,19 +106,19 @@ namespace gbrainy.Games.Logic
 
 		private void SetDrawAnswer()
 		{
-			double h = 0.3, sel_marginw = 0.05, sel_marginh = 0.025;
+			double h = 0.25, sel_marginw = 0.05, sel_marginh = 0.025;
 			double x = DrawAreaX + 0.1, y = DrawAreaY + 0.62;
 			int fig_count = (int) Figures.Last;
 
-			HorizontalContainer container = new HorizontalContainer (x, y,  (1 + fig_count) * (figure_size + space_x), h);
+			HorizontalContainer container = new HorizontalContainer (x, y, fig_count * (figure_size + space_x), h);
 			DrawableArea drawable_area;
 
 			AddWidget (container);
 
 			for (int i = 0; i < fig_count; i++)
 			{
-				drawable_area = new DrawableArea (figure_size  + space_x, figure_size);
-				drawable_area.SelectedArea = new Rectangle (-sel_marginw, -sel_marginh, figure_size  + sel_marginw * 2, h - sel_marginh * 2);
+				drawable_area = new DrawableArea (figure_size  + space_x, h);
+				drawable_area.SelectedArea = new Rectangle (-sel_marginw, -sel_marginh, figure_size  + sel_marginw * 2, h);
 				drawable_area.Data = i;
 				drawable_area.DataEx = Answer.GetMultiOption (i);
 				container.AddChild (drawable_area);



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