[gcompris/gcomprisbraille] Rounded goocanvas Rect buttons|translatable strings|game.svg size incr
- From: Srishti Sethi <srishs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprisbraille] Rounded goocanvas Rect buttons|translatable strings|game.svg size incr
- Date: Sun, 24 Jul 2011 14:34:06 +0000 (UTC)
commit 6ed4bfad8e9e0bb721a20d7c88a24b03b0a39e0d
Author: Srishti Sethi <srishakatux gmail com>
Date: Sun Jul 24 20:03:35 2011 +0530
Rounded goocanvas Rect buttons|translatable strings|game.svg size incr
src/braille_alphabets-activity/BrailleMap.py | 4 +-
src/braille_lotto-activity/braille_lotto.py | 60 +++++++++++-------
.../resources/braille_lotto/button.jpg | Bin 1821 -> 0 bytes
.../resources/braille_lotto/button.svg | 65 --------------------
.../resources/braille_lotto/button2.png | Bin 1535 -> 0 bytes
.../resources/braille_lotto/button2.svg | 65 --------------------
.../resources/braille_lotto/game.svg | 13 ++--
.../resources/braille_lotto/generate_number.png | Bin 1096 -> 0 bytes
.../resources/braille_lotto/sablier.gif | Bin 25708 -> 0 bytes
.../resources/braille_lotto/sablier.txt | 1 -
10 files changed, 45 insertions(+), 163 deletions(-)
---
diff --git a/src/braille_alphabets-activity/BrailleMap.py b/src/braille_alphabets-activity/BrailleMap.py
index 64a8f60..b0f6ffc 100644
--- a/src/braille_alphabets-activity/BrailleMap.py
+++ b/src/braille_alphabets-activity/BrailleMap.py
@@ -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)
diff --git a/src/braille_lotto-activity/braille_lotto.py b/src/braille_lotto-activity/braille_lotto.py
index d231e28..bf8f9c8 100644
--- a/src/braille_lotto-activity/braille_lotto.py
+++ b/src/braille_lotto-activity/braille_lotto.py
@@ -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,
diff --git a/src/braille_lotto-activity/resources/braille_lotto/game.svg b/src/braille_lotto-activity/resources/braille_lotto/game.svg
index 7911fc5..685bfbf 100644
--- a/src/braille_lotto-activity/resources/braille_lotto/game.svg
+++ b/src/braille_lotto-activity/resources/braille_lotto/game.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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]