Commit 6ed4bfad authored by Srishti Sethi's avatar Srishti Sethi

Rounded goocanvas Rect buttons|translatable strings|game.svg size incr

parent 27e24f54
......@@ -45,7 +45,7 @@ class BrailleMap:
BrailleChar(rootitem, index*(CELL_WIDTH+40)+60,
130, 38, letter ,color_on, color_off, circle_fill,
circle_stroke,True ,False ,True , None)
for index, letter in enumerate(string.ascii_uppercase[20:25]):
for index, letter in enumerate(string.ascii_uppercase[20:26]):
BrailleChar(rootitem, index*(CELL_WIDTH+40)+60,
220, 38, letter ,color_on, color_off, circle_fill,
circle_stroke,True ,False ,True , None)
......@@ -58,4 +58,4 @@ class BrailleMap:
for index in range(4):
BrailleChar(rootitem,index * (CELL_WIDTH + 40) + 60,
400 , 38,SYMBOL[index],color_on, color_off, circle_fill,
circle_stroke,True ,False ,True , None)
\ No newline at end of file
circle_stroke,True ,False ,True , None)
......@@ -129,11 +129,16 @@ class Gcompris_braille_lotto:
)
#Button to display the number to be checked in the ticket
goocanvas.Image(parent = self.root,
pixbuf = gcompris.utils.load_pixmap("braille_lotto/button.svg"),
x = 20,
y = 340,
)
goocanvas.Rect(parent = self.root,
x = 25,
y = 350,
width = 170,
height = 90,
radius_x = 17,
radius_y = 17,
stroke_color = "black",
fill_color = "#d38d5f" ,
line_width = 2)
#Check number
goocanvas.Text(
......@@ -153,7 +158,7 @@ class Gcompris_braille_lotto:
parent = self.root,
svg_handle = svghandle,
svg_id = "#FIG1",
tooltip = "Click me to get some hint"
tooltip = _("Click me to get some hint")
)
self.hint_left_button.translate(210, 330)
self.hint_left_button.connect("button_press_event", self.clue_left)
......@@ -165,7 +170,7 @@ class Gcompris_braille_lotto:
parent = self.root,
svg_handle = svghandle,
svg_id = "#FIG2",
tooltip = "Click me to get some hint"
tooltip = _("Click me to get some hint")
)
self.hint_right_button.translate(290, 330)
self.hint_right_button.connect("button_press_event", self.clue_right)
......@@ -206,11 +211,17 @@ class Gcompris_braille_lotto:
)
#Generate Number Button
generate_number = goocanvas.Image(parent = self.root,
pixbuf = gcompris.utils.load_pixmap("braille_lotto/button2.svg"),
x = 610,
y = 340,
)
generate_number = goocanvas.Rect(parent = self.root,
x = 610,
y = 350,
width = 170,
height = 90,
radius_x = 17,
radius_y = 17,
stroke_color = "black",
fill_color = "#d33e5f",
line_width = 2)
generate_number.connect("button_press_event", self.generateNumber)
gcompris.utils.item_focus_init(generate_number, None)
......@@ -269,9 +280,9 @@ class Gcompris_braille_lotto:
if (self.check_random[self.counter] in self.ticket_array[0:6]):
self.findColumn()
self.status_one.props.text = " Hey,you have \n "" it. Its there \n"" in your\n " + self.column + " column"
self.status_one.props.text = _(" Hey,you have \n "" it. Its there \n"" in your\n " + self.column + " column")
else :
self.status_one.props.text = " Oops, number\n"" isn't there\n" " in your ticket!"
self.status_one.props.text = _(" Oops, number\n"" isn't there\n" " in your ticket!")
self.timerAnim = gobject.timeout_add(200, self.hideCalloutLeft)
def clue_right(self, event , target, item):
......@@ -290,9 +301,9 @@ class Gcompris_braille_lotto:
)
if (self.check_random[self.counter] in self.ticket_array[6:12]):
self.findColumn()
self.status_two.props.text = " Hey,you have \n "" it. Its there \n"" in your\n " + self.column + " column"
self.status_two.props.text = _(" Hey,you have \n "" it. Its there \n"" in your\n " + self.column + " column")
else :
self.status_two.props.text = " Oops, number\n"" isn't there\n" " in your ticket!"
self.status_two.props.text = _(" Oops, number\n"" isn't there\n" " in your ticket!")
self.timerAnim = gobject.timeout_add(100, self.hideCalloutRight)
......@@ -335,10 +346,10 @@ class Gcompris_braille_lotto:
def number_call(self):
if(self.counter == 11):
self.displayGameStatus()
self.game_status.props.text = " Game Over"
self.game_status.props.text = _(" Game Over")
self.timer_inc = gobject.timeout_add(self.status_timer,
self.game_over)
else :
elif (self.counter < 11):
self.check_number = goocanvas.Text(
parent = self.root,
text= self.check_random[self.counter],
......@@ -347,6 +358,7 @@ class Gcompris_braille_lotto:
font = "SANS 20",
anchor=gtk.ANCHOR_CENTER,
)
def game_over(self):
self.status_timer -= 1
if self.status_timer == 0 :
......@@ -436,9 +448,9 @@ class Gcompris_braille_lotto:
if(self.score_player_a == 6 or self.score_player_b == 6):
self.displayGameStatus()
if(self.score_player_a == 6):
self.game_status.props.text = "PLAYER 1\n" "You WON"
self.game_status.props.text = _("PLAYER 1\n" "You WON")
elif(self.score_player_b == 6):
self.game_status.props.text = "PLAYER 2 \n" "You WON"
self.game_status.props.text = _("PLAYER 2 \n" "You WON")
self.timer_inc = gobject.timeout_add(self.status_timer,
self.timer_loop)
......@@ -448,14 +460,14 @@ class Gcompris_braille_lotto:
def displayGameStatus(self):
self.game = goocanvas.Image(parent = self.root,
pixbuf = gcompris.utils.load_pixmap("braille_lotto/game.svg"),
x = 230 ,
y = 150,
x = 200 ,
y = 100,
)
self.game_status = goocanvas.Text(
parent = self.root,
text= "",
x=375,
y=220,
x=365,
y=200,
font = "SANS 30",
fill_color = "blue",
anchor=gtk.ANCHOR_CENTER,
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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"
width="174.17999"
height="110.34"
id="svg3960"
version="1.1"
inkscape:version="0.48.0 r9654"
sodipodi:docname="button.svg">
<defs
id="defs3" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.2"
inkscape:cx="160"
inkscape:cy="74.166666"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1256"
inkscape:window-height="701"
inkscape:window-x="0"
inkscape:window-y="37"
inkscape:window-maximized="1" />
<metadata
id="metadata3964">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-80.997761)">
<rect
style="fill:#d38d5f;fill-opacity:1;stroke:#000000;stroke-width:2.06761503;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
id="rect4098"
width="165.63531"
height="92.915855"
x="4.638341"
y="92.141853"
rx="22.963081"
ry="17.955" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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"
width="177.17999"
height="110.34"
id="svg3960"
version="1.1"
inkscape:version="0.48.0 r9654"
sodipodi:docname="button2.svg">
<defs
id="defs3" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.2"
inkscape:cx="6.25"
inkscape:cy="74.166666"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1256"
inkscape:window-height="701"
inkscape:window-x="0"
inkscape:window-y="37"
inkscape:window-maximized="1" />
<metadata
id="metadata3964">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-80.997761)">
<rect
style="fill:#d33e5f;fill-opacity:1;stroke:#000000;stroke-width:2.06356406;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline"
id="rect4098"
width="166.4727"
height="92.086571"
x="6.3029823"
y="89.639824"
rx="23.079172"
ry="17.794748" />
</g>
</svg>
......@@ -9,8 +9,8 @@
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"
width="85mm"
height="54mm"
width="354.17999"
height="255.34"
id="svg3004"
version="1.1"
inkscape:version="0.48.0 r9654"
......@@ -26,7 +26,7 @@
inkscape:pageshadow="2"
inkscape:zoom="1.2"
inkscape:cx="160"
inkscape:cy="50.416665"
inkscape:cy="74.381378"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
......@@ -50,10 +50,11 @@
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
id="layer1"
transform="translate(0,64.001973)">
<path
style="fill:#e6e6e6;fill-opacity:0.82352941;stroke:#0e181a;stroke-width:3.16607952;stroke-miterlimit:4;stroke-opacity:1;display:inline;enable-background:new"
d="m 25.411669,7.9337203 c 65.749271,0 151.241431,0 247.121311,0 4.32656,0 7.8097,11.2945577 7.8097,25.3240487 l -0.009,27.756994 0.009,55.450527 c 0,14.02953 -13.99872,19.81337 -18.32529,19.81337 -188.522921,-5.68345 6.92165,108.27468 -140.34767,17.22082 C 22.162559,148.62806 23.895439,125.88491 17.601993,116.46529 l 0,-83.207521 c 0,-14.029491 3.483098,-25.3240487 7.809676,-25.3240487 z"
style="fill:#e6e6e6;fill-opacity:0.82352941;stroke:#0e181a;stroke-width:4.10547256;stroke-miterlimit:4;stroke-opacity:1;display:inline;enable-background:new"
d="m 17.879046,-54.961156 c 83.913234,0 193.023534,0 315.391294,0 5.52182,0 9.96722,14.880323 9.96722,33.363856 l -0.0114,36.569207 0.0114,73.054804 c 0,18.483589 -17.86603,26.103669 -23.38786,26.103669 C 79.245248,106.64255 328.68354,256.7798 140.72944,136.81841 13.732332,130.40043 15.94394,100.43684 7.9118595,88.026711 l 0,-109.624011 c 0,-18.483533 4.4453415,-33.363856 9.9671865,-33.363856 z"
id="BUBBLE1"
sodipodi:nodetypes="cccccccccc"
inkscape:label="#BUBBLE1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment