gbrainy r367 - trunk/src



Author: jmas
Date: Mon Jun  2 19:48:13 2008
New Revision: 367
URL: http://svn.gnome.org/viewvc/gbrainy?rev=367&view=rev

Log:
2008-06-02 Jordi Mas <jmas softcatala org>

	*  MemoryIndications.cs: When showing the right answer, show the 
	  indications to memorize and the figure



Modified:
   trunk/src/ChangeLog
   trunk/src/MemoryIndications.cs

Modified: trunk/src/MemoryIndications.cs
==============================================================================
--- trunk/src/MemoryIndications.cs	(original)
+++ trunk/src/MemoryIndications.cs	Mon Jun  2 19:48:13 2008
@@ -150,6 +150,7 @@
 	private Indication[] indications_wrongB;
 	private Indication[] indications_wrongC;
 	private ArrayListIndicesRandom answers;
+	private int ans;
 
 	public override string Name {
 		get {return Catalog.GetString ("Memorize indications");}
@@ -224,6 +225,7 @@
 		for (int i = 0; i < answers.Count; i++) {
 			if (answers [i] == 0) {
 				right_answer += (char) (65 + i);
+				ans = i;
 				break;
 			}
 		}
@@ -294,11 +296,24 @@
 	{
 		base.DrawObjectToMemorize (gr, area_width, area_height);
 
-		for (int i = 0; i < indications.Length; i++)
-		{
-			gr.MoveTo (0.3, 0.2 + i * 0.08);
-			gr.ShowText (indications[i].ToString ());
-			gr.Stroke ();
+		if (DrawAnswer == false) {
+			for (int i = 0; i < indications.Length; i++)
+			{
+				gr.MoveTo (0.3, 0.2 + i * 0.08);
+				gr.ShowText (indications[i].ToString ());
+				gr.Stroke ();
+			}
+		} else {
+				for (int i = 0; i < indications.Length; i++)
+				{
+					gr.MoveTo (0.1, 0.2 + i * 0.08);
+					gr.ShowText (indications[i].ToString ());
+					gr.Stroke ();
+				}
+				DrawPossibleAnswers (gr, 0.7, 0.3, WhichAnswer (answers[ans]));
+				gr.MoveTo (0.7, 0.5);
+				gr.ShowText (String.Format (Catalog.GetString ("Figure {0}"), (char) (65 + ans)));
+				gr.Stroke ();
 		}
 	}
 }



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