Commit bf631156 authored by SrishAkaTux's avatar SrishAkaTux

Green fill for correct sequence else red|Added makefile.am files

parent df5e601f
SUBDIRS =
SUBDIRS = resources
pythondir = $(PYTHON_PLUGIN_DIR)
......
......@@ -66,6 +66,7 @@ class Gcompris_louis_braille:
self.counter = 0
self.gamewon = 0
self.item = 0
self.groupitem_array = []
self.coorditem_array = []
......@@ -108,7 +109,7 @@ class Gcompris_louis_braille:
# Insert the lines in the correct order
for index in range(n_lines):
self.reordering.add_line( str(self.dataset.get(str(index + 1), "_story") ) )
self.reordering.add_line( str(self.dataset.get(str(index + 1), _("story"))))
ok = goocanvas.Svg(parent = self.rootitem,
svg_handle = gcompris.skin.svg_get(),
......@@ -164,7 +165,7 @@ class Gcompris_louis_braille:
20, 50, LOUIS_BRAILLE_NAME[index] ,COLOR_ON, COLOR_OFF,
CIRCLE_FILL, CIRCLE_FILL,True,False ,False, None)
story = self.dataset.get(str(level),"_story")
story = self.dataset.get(str(level),_("story"))
#Rectangle for YEAR
goocanvas.Rect(parent=self.rootitem,
......@@ -180,7 +181,7 @@ class Gcompris_louis_braille:
goocanvas.Text(parent = self.rootitem,
x=420.0,
y=395.0,
text=str(self.dataset.get(str(level),"_year")),
text=str(self.dataset.get(str(level) , "year")),
fill_color="black",
anchor = gtk.ANCHOR_CENTER,
alignment = pango.ALIGN_CENTER,
......@@ -222,7 +223,7 @@ class Gcompris_louis_braille:
gcompris.bonus.display(gcompris.bonus.WIN,gcompris.bonus.TUX)
self.gamewon = 1
else :
gcompris.bonus.display(gcompris.bonus.LOOSE,gcompris.bonus.TUX)
self.reordering.is_not_done()
def previous_event(self, event, target,item, level):
if (self.gcomprisBoard.level == 1):
......@@ -276,6 +277,7 @@ class Reordering:
def __init__(self, louisbraille, max_item):
self.louisbraille = louisbraille
self.rootitem = louisbraille.rootitem
self.rectbox_array = []
self.index = 0
self.randoms = range(max_item)
random.shuffle(self.randoms)
......@@ -294,6 +296,15 @@ class Reordering:
return False
return True
#To indicate correct and wrong lines
def is_not_done(self):
for index , item in enumerate (self.orders):
group_index = item.get_data("index")
if ( group_index != index ):
self.rectbox_array[index].set_property("fill_color","#F95234")
else :
self.rectbox_array[index].set_property("fill_color","#5DF934")
def add_line(self, text):
position = self.randoms[ self.index ]
y = (position + 0.5) * 43
......@@ -302,7 +313,7 @@ class Reordering:
# Save in the item itself where is its correct position
group_item.set_data("index", self.index)
# Create Rounded Rectangles for each story
goocanvas.Rect(parent = group_item,
rect_box = goocanvas.Rect(parent = group_item,
x = 100,
y = 0,
width = 550,
......@@ -312,6 +323,8 @@ class Reordering:
stroke_color = "orange",
fill_color = "white",
line_width = 2.0)
self.rectbox_array.append(rect_box)
self.orders[ position ] = group_item
# Displaying the STORY
......@@ -325,6 +338,7 @@ class Reordering:
font = 'SANS 9',
width = 500,
)
# It is hard to manage focus when we move the item
# gcompris.utils.item_focus_init(self.dragText, self.dragRect)
group_item.connect("button_press_event", self.component_drag)
......@@ -360,7 +374,6 @@ class Reordering:
self.move_group( index, self.get_group_index(group) )
return
def component_drag(self, widget, target, event):
groupitem = target.get_parent()
groupitem.raise_(None)
......@@ -388,4 +401,4 @@ class Reordering:
to_y = groupitem.get_data('yref')
groupitem.set_properties(x = to_x, y = to_y)
return True
return True
\ No newline at end of file
......@@ -6,13 +6,13 @@
section="/experimental"
icon="louis_braille.svg"
difficulty="1"
author="your name here"
author="Srishti Sethi (srishakatux@gmail.com)"
boarddir=""
demo="1">
<title>Louis Braille</title>
<description>The Story Of Louis Braille</description>
<prerequisite></prerequisite>
<goal>Read the story of Louis Braille ,his biography and discovery of braille code.Click on the previous and next buttons to move to the respective story page.At the end of story, arrange the sequence.In the entry box in front of each story type the alphabet to indicate its sequence and press enter.</goal>
<goal>Read the story of Louis Braille, his biography and discovery of braille code. Click on the previous and next buttons to move to the respective story page. At the end of story, arrange the sequence of story by draging the round boxes.Click on OK button to confirm the sequence.Each correctly arranged line will me marked with green color otherwise with red color.</goal>
<manual></manual>
<credit>Louis Braille Video :http://bit.ly/qedAtc</credit>
</Board>
......
SUBDIRS = louis_braille
\ No newline at end of file
imgdir = $(pkgdatadir)/@PACKAGE_DATA_DIR@/louis_braille
img_DATA = \
activity.desktop \
background.svgz \
braile.jpg \
braille_ball.jpg \
chart.png \
fireplace.jpg \
louis.png \
night_printing.jpg \
piano.svg \
rnib.jpg \
statue.jpg \
teach.jpg \
workshop.jpg
# Do not use the INTLTOOL_DESKTOP_RULE, we don't need to embed the translations
# in the file themselves. GCompris pick the translations from the po file at
# runtime.
activity.desktop: activity.desktop.in
sed -e "s/^_//g" $< > $@
EXTRA_DIST = $(img_DATA) activity.desktop.in
CLEANFILES = activity.desktop
[1]
_year = 1809
_story = Born January 4th at Coupvary near Paris in France.
year = 1809
story = Born January 4th at Coupvary near Paris in France.
image = louis_braille/louis.png
[2]
_year = 1812
_story = Louis Braille injured his left eye with a stitching awl from his fathers workshop.
year = 1812
story = Louis Braille injured his left eye with a stitching awl from his fathers workshop.
image = louis_braille/workshop.jpg
[3]
_year = 1812
_story = At the age of three Louis became blind due to sympathetic ophthalmia.
year = 1812
story = At the age of three Louis became blind due to sympathetic ophthalmia.
image = louis_braille/fireplace.jpg
[4]
_year = 1819
_story = At the age of 10 he was sent to Paris to study at the Royal Institute for Blind Youth.
year = 1819
story = At the age of 10 he was sent to Paris to study at the Royal Institute for Blind Youth.
image = louis_braille/rnib.jpg
[5]
_year = 1820
_story = He began to impress his classmates and began to play piano and the organ.
year = 1820
story = He began to impress his classmates and began to play piano and the organ.
image = louis_braille/piano.svg
[6]
_year = 1821
_story = Charles Barbier, a french soldier visited school and shared invention of night writing ,a code of 12 raised dots to share information on battlefield.
year = 1821
story = Charles Barbier, a french soldier visited school and shared invention of night writing ,a code of 12 raised dots to share information on battlefield.
image = louis_braille/night_printing.jpg
[7]
_year = 1824
_story = Louis trimmed Barbier's 12 dots into 6 and invented Braille.
year = 1824
story = Louis trimmed Barbier's 12 dots into 6 and invented Braille.
image = louis_braille/braile.jpg
[8]
_year = 1828
_story = He became a professor after graduating and secretly taught his method.
year = 1828
story = He became a professor after graduating and secretly taught his method.
image = louis_braille/teach.jpg
[9]
_year = 1837
_story = He revised and extended braille to include mathematics, symbols, punctuations and music notations.
year = 1837
story = He revised and extended braille to include mathematics, symbols, punctuations and music notations.
image = louis_braille/chart.png
[10]
_year = 1852
_story = He died of tuberculosis.He is burried in the Pantheon in Paris.A monument is erected to honor him.
year = 1852
story = He died of tuberculosis.He is burried in the Pantheon in Paris.A monument is erected to honor him.
image = louis_braille/statue.jpg
[11]
_year = After his Death
_story = Braille got accepted as a world wide standard.Louis proved if you have motivation you can do incredible things.
image = louis_braille/braille_ball.jpg
\ No newline at end of file
year = After his Death
story = Braille got accepted as a world wide standard.Louis proved if you have motivation you can do incredible things.
image = louis_braille/braille_ball.jpg
[1]
year = 1809
story = Born January 4th at Coupvary near Paris in France.
image = louis_braille/louis.png
[2]
year = 1812
story = Louis Braille injured his left eye with a stitching awl from his fathers workshop.
image = louis_braille/workshop.jpg
[3]
year = 1812
story = At the age of three Louis became blind due to sympathetic ophthalmia.
image = louis_braille/fireplace.jpg
[4]
year = 1819
story = At the age of 10 he was sent to Paris to study at the Royal Institute for Blind Youth.
image = louis_braille/rnib.jpg
[5]
year = 1820
story = He began to impress his classmates and began to play piano and the organ.
image = louis_braille/piano.svg
[6]
year = 1821
story = Charles Barbier, a french soldier visited school and shared invention of night writing ,a code of 12 raised dots to share information on battlefield.
image = louis_braille/night_printing.jpg
[7]
year = 1824
story = Louis trimmed Barbier's 12 dots into 6 and invented Braille.
image = louis_braille/braile.jpg
[8]
year = 1828
story = He became a professor after graduating and secretly taught his method.
image = louis_braille/teach.jpg
[9]
year = 1837
story = He revised and extended braille to include mathematics, symbols, punctuations and music notations.
image = louis_braille/chart.png
[10]
year = 1852
story = He died of tuberculosis.He is burried in the Pantheon in Paris.A monument is erected to honor him.
image = louis_braille/statue.jpg
[11]
year = After his Death
story = Braille got accepted as a world wide standard.Louis proved if you have motivation you can do incredible things.
image = louis_braille/braille_ball.jpg
\ No newline at end of file
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