Skip to content

Commit

Permalink
-replaced string exceptions with Exception
Browse files Browse the repository at this point in the history
-added a textarea to the gui5.py example
  • Loading branch information
peter.rogers committed Dec 29, 2010
1 parent 2175b7f commit eabe114
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions examples/gui5.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,10 @@
c.td(gui.Label("Keysym"))
c.td(gui.Keysym(),colspan=3)

c.tr()
c.td(gui.Label("Text Area"), colspan=4, align=-1)

c.tr()
c.td(gui.TextArea(value="Cuzco the Goat", width=150, height=70), colspan=4)

app.run(c)
2 changes: 1 addition & 1 deletion pgu/gui/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def subsurface(s,r):
"""
r = pygame.Rect(r)
if r.x < 0 or r.y < 0:
raise "gui.subsurface: %d %d %s"%(s.get_width(),s.get_height(),r)
raise Exception("gui.subsurface: %d %d %s"%(s.get_width(),s.get_height(),r))
w,h = s.get_width(),s.get_height()
if r.right > w:
r.w -= r.right-w
Expand Down
2 changes: 1 addition & 1 deletion pgu/gui/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _load(self, name):
for dname in dnames:
if os.path.isdir(dname): break
if not os.path.isdir(dname):
raise 'could not find theme '+name
raise Exception('could not find theme '+name)

fname = os.path.join(dname,"config.txt")
if os.path.isfile(fname):
Expand Down

0 comments on commit eabe114

Please sign in to comment.