Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2014-08-09 00:36:31 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2014-08-09 00:36:31 (GMT)
commit0b087a9c83105640214eb38778d92f8c1aa5b47b (patch)
treeae0ee5237b71b424197eec2e20a82178c494ce3b
parent363729087b695d38f823d1e4942250ce6c09954e (diff)
Remove the old help screen
The content is not longer relevant, and the UI was ugly. If needed, we can implement it in a window
-rw-r--r--dominoactivity.py7
-rw-r--r--dominoview.py61
2 files changed, 1 insertions, 67 deletions
diff --git a/dominoactivity.py b/dominoactivity.py
index 397831d..c84da86 100644
--- a/dominoactivity.py
+++ b/dominoactivity.py
@@ -7,7 +7,6 @@
from gi.repository import Gtk
from gi.repository import Gdk
import cairo
-import os
import sys
import json
@@ -140,6 +139,7 @@ class Domino(activity.Activity):
self.game = None
self.show_scores = False
self.surface = None
+ self._start_game(None)
self.drawingarea.queue_draw()
def get_points_by_name(self, game_processor_name):
@@ -164,11 +164,6 @@ class Domino(activity.Activity):
table.show_scores(ctx, self.list_points)
return
- if self.game is None:
- table = DominoTableView()
- table.help(ctx)
- return
-
ctx.set_source_surface(self.surface)
ctx.paint()
diff --git a/dominoview.py b/dominoview.py
index 2065de5..7696e6d 100644
--- a/dominoview.py
+++ b/dominoview.py
@@ -7,7 +7,6 @@
from gi.repository import Gdk
import cairo
-from gi.repository import Rsvg
from gettext import gettext as _
@@ -166,66 +165,6 @@ class DominoTableView():
y = y + altoRenglon
ctx.move_to(x, y)
- def help(self, ctx):
- altoRenglon = 45
- x = self._margin_x + 20
- y = altoRenglon * 4
- ctx.set_line_width(1)
- ctx.set_source_rgb(1, 1, 0)
- ctx.rectangle(self._margin_x + 10, altoRenglon * 3,
- SIZE * self.cantX - 10, y + altoRenglon * 4)
- ctx.stroke()
-
- stroke_r, stroke_g, stroke_b = 0, 0, 0
- ctx.set_source_rgb(stroke_r, stroke_g, stroke_b)
-
- ctx.select_font_face("Sans", cairo.FONT_SLANT_NORMAL,
- cairo.FONT_WEIGHT_NORMAL)
- ctx.set_font_size(30)
-
- ctx.move_to(x, y)
- ctx.show_text(_("You can select a piece with the arrow keys "
- "and use it with enter."))
-
- y = y + altoRenglon
- ctx.move_to(x, y)
- ctx.show_text(_("When you selected the piece, you can move it "
- "to the place "))
-
- y = y + altoRenglon
- ctx.move_to(x, y)
- ctx.show_text(_("with the arrows , turn it with space and place "
- "it with enter."))
-
- y = y + altoRenglon
- ctx.move_to(x, y)
- ctx.show_text(_("If you want use another piece, press escape."))
-
- y = y + altoRenglon
- ctx.move_to(x + 80, y)
- ctx.show_text(_("You can use the cursors to move too."))
-
- y = y + altoRenglon
- ctx.move_to(x + 80, y)
- ctx.show_text(_("And use check to select, circle to rotate"))
-
- y = y + altoRenglon
- ctx.move_to(x + 80, y)
- ctx.show_text(_("and X to use another piece."))
-
- self.show_svg(ctx, "icons/cursors.svg", x, y - (altoRenglon * 2.75))
- self.show_svg(ctx, "icons/gamekeys.svg", x, y - (altoRenglon * 1.25))
-
- def show_svg(self, ctx, file_name, x, y):
- h = Rsvg.Handle.new_from_file(file_name)
- surf = cairo.ImageSurface(cairo.FORMAT_ARGB32, 100, 100)
- temp_ctx = cairo.Context(surf)
- h.render_cairo(temp_ctx)
- ctx.translate(x, y)
- ctx.set_source_surface(surf)
- ctx.paint()
- ctx.translate(-x, -y)
-
def msg_end_game(self, ctx, win):
ctx.select_font_face("Sans", cairo.FONT_SLANT_NORMAL,
cairo.FONT_WEIGHT_BOLD)