[gbrainy] Make family relation puzzle to use the same positions and weight that verbal analogies since it is s



commit 93cf821d7c04f67649f4bf79e7e93b4af97a7f74
Author: Jordi Mas <jmas softcatala org>
Date:   Sun Nov 13 17:47:04 2011 +0100

    Make family relation puzzle to use the same positions and weight that verbal analogies since it is similar and allowing long translations to fit

 data/games.xml                      |   16 ++++++++--------
 src/Core/Main/Xml/GameXmlFactory.cs |    3 +++
 2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/data/games.xml b/data/games.xml
index 3b144e7..1d94cdd 100644
--- a/data/games.xml
+++ b/data/games.xml
@@ -667,20 +667,20 @@
 
 			<string _text = "Choose one of the following:" x = "0.1" y = "0.15" size = "large"/>
 
-			<option x = "0.25" y = "0.3" width ="0.6" height ="0.1" order ="randomized" correct = "yes">
-				<string _text = "[option_prefix] His mother" x = "0.05" y = "0.02" size = "large"/>
+			<option x = "0.1" y = "0.30" width ="0.8" height ="0.1" order ="randomized" correct = "yes">
+				<string _text = "[option_prefix] His mother" x = "0.05" y = "0.02" size = "medium"/>
 			</option>
 
-			<option x = "0.25" y = "0.4" width ="0.6" height ="0.1" order ="randomized">
-				<string _text = "[option_prefix] Has no relation" x = "0.05" y = "0.02" size = "large"/>
+			<option x = "0.1" y = "0.45" width ="0.8" height ="0.1" order ="randomized">
+				<string _text = "[option_prefix] Has no relation" x = "0.05" y = "0.02" size = "medium"/>
 			</option>
 
-			<option x = "0.25" y = "0.5" width ="0.6" height ="0.1" order ="randomized">
-				<_string msgctxt="John's father's sister's sister-in-law is also?" x = "0.05" y = "0.02" size = "large">[option_prefix] His cousin</_string>
+			<option x = "0.1" y = "0.60" width ="0.8" height ="0.1" order ="randomized">
+				<_string msgctxt="John's father's sister's sister-in-law is also?" x = "0.05" y = "0.02" size = "medium">[option_prefix] His cousin</_string>
 			</option>
 
-			<option x = "0.25" y = "0.6" width ="0.6" height ="0.1" order ="randomized">
-				<string _text = "[option_prefix] His son-in-law" x = "0.05" y = "0.02" size = "large"/>
+			<option x = "0.1" y = "0.75" width ="0.8" height ="0.1" order ="randomized">
+				<string _text = "[option_prefix] His son-in-law" x = "0.05" y = "0.02" size = "medium"/>
 			</option>
 			<_answer>His mother</_answer>
 			<_rationale>The sister's sister-in-law is John's father's wife, that is, John's mother.</_rationale>
diff --git a/src/Core/Main/Xml/GameXmlFactory.cs b/src/Core/Main/Xml/GameXmlFactory.cs
index 57635a9..94ceced 100644
--- a/src/Core/Main/Xml/GameXmlFactory.cs
+++ b/src/Core/Main/Xml/GameXmlFactory.cs
@@ -420,6 +420,9 @@ namespace gbrainy.Core.Main.Xml
 						if (String.Compare (str, "yes", true) == 0)
 							option.Correct = true;
 
+						if (option.X + option.Width > 1 || option.Y + option.Height > 1)
+							Console.WriteLine ("GameXmlFactory. Wrong option size. x+width and y+height cannot be larger than 1");
+
 						break;
 					default:
 						if (String.IsNullOrEmpty (name) == false)



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