Mercurial > boomslang
diff pyntnclick/widgets/__init__.py @ 636:2748d3afcae5 pyntnclick
Excise albow. Really.
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sun, 12 Feb 2012 00:10:17 +0200 |
parents | 8ff93e53c882 |
children | 2703924c8c70 |
line wrap: on
line diff
--- a/pyntnclick/widgets/__init__.py Sun Feb 12 00:01:03 2012 +0200 +++ b/pyntnclick/widgets/__init__.py Sun Feb 12 00:10:17 2012 +0200 @@ -7,22 +7,23 @@ import textwrap -import albow.controls -import albow.menu -from albow.resource import get_font, get_image from pygame.color import Color from pygame.rect import Rect from pygame.draw import lines as draw_lines from pygame import mouse +from pyntnclick.widgets.base import Widget from pyntnclick.cursor import CursorWidget # XXX: Need a way to get at the constants. from pyntnclick.constants import GameConstants BUTTON_SIZE = GameConstants().button_size +# XXX: Needs a way to get at resource: +from pyntnclick.resources import Resources +get_image = Resources("Resources").get_image -class BoomLabel(albow.controls.Label): +class BoomLabel(Widget): # WAS: albow.controls.Label): trim_line_top = 0 @@ -146,7 +147,7 @@ return False -class HandButton(albow.controls.Image): +class HandButton(Widget): # WAS: albow.controls.Image): """The fancy hand button for the widget""" def __init__(self, action): @@ -159,7 +160,7 @@ self.action() -class PopupMenuButton(albow.controls.Button): +class PopupMenuButton(Widget): # WAS: albow.controls.Button): def __init__(self, text, action): albow.controls.Button.__init__(self, text, action) @@ -169,7 +170,7 @@ self.margin = (BUTTON_SIZE - self.font.get_linesize()) / 2 -class PopupMenu(albow.menu.Menu, CursorWidget): +class PopupMenu(Widget): # WAS: albow.menu.Menu, CursorWidget): def __init__(self, screen): CursorWidget.__init__(self, screen) @@ -192,7 +193,7 @@ self.invoke_item(item) -class BoomImageButton(albow.controls.Image): +class BoomImageButton(Widget): # WAS: albow.controls.Image): """The fancy image button for the screens""" FOLDER = None