Mercurial > boomslang
changeset 613:44d4e3020874 pyntnclick
Remove a lot of albow
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 11 Feb 2012 21:18:41 +0200 |
parents | cfc16ded7b34 |
children | 974cc69d3762 |
files | pyntnclick/gamescreen.py pyntnclick/main.py pyntnclick/scenewidgets.py scripts/build_unix.sh |
diffstat | 4 files changed, 10 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/pyntnclick/gamescreen.py Sat Feb 11 21:12:45 2012 +0200 +++ b/pyntnclick/gamescreen.py Sat Feb 11 21:18:41 2012 +0200 @@ -2,15 +2,13 @@ # Copyright Boomslang team, 2010 (see COPYING File) # Main menu for the game -from albow.controls import Widget -from albow.layout import Row -from albow.palette_view import PaletteView from pygame import Rect, mouse from pygame.color import Color from pyntnclick.cursor import CursorWidget from pyntnclick.engine import Screen from pyntnclick.state import handle_result +from pyntnclick.widgets.base import Widget from pyntnclick.widgets import ( MessageDialog, BoomButton, HandButton, PopupMenu, PopupMenuButton) @@ -23,14 +21,13 @@ LEAVE = constants.leave -class InventoryView(PaletteView): +class InventoryView(Widget): + # TODO: Make this work again sel_color = Color("yellow") sel_width = 2 - def __init__(self, screen): - PaletteView.__init__(self, (BUTTON_SIZE, BUTTON_SIZE), 1, 6, - scrolling=True) + def __init__(self, rect): self.screen = screen self.game = screen.game self.state_widget = screen.state_widget @@ -195,11 +192,10 @@ self.invalidate() -class ToolBar(Row): +class ToolBar(Widget): def __init__(self, items): for item in items: item.height = BUTTON_SIZE - Row.__init__(self, items, spacing=0, width=SCREEN[0]) self.bg_color = (31, 31, 31) def draw(self, surface):
--- a/pyntnclick/main.py Sat Feb 11 21:12:45 2012 +0200 +++ b/pyntnclick/main.py Sat Feb 11 21:18:41 2012 +0200 @@ -14,10 +14,9 @@ import pygame from pygame.locals import SWSURFACE -from albow.shell import Shell from pyntnclick.engine import Engine -from pyntnclick.gamescreen import GameScreen, DefMenuScreen, DefEndScreen +from pyntnclick.gamescreen import DefMenuScreen, DefEndScreen from pyntnclick.constants import GameConstants, DEBUG_ENVVAR from pyntnclick.resources import Resources from pyntnclick.sound import Sound
--- a/pyntnclick/scenewidgets.py Sat Feb 11 21:12:45 2012 +0200 +++ b/pyntnclick/scenewidgets.py Sat Feb 11 21:18:41 2012 +0200 @@ -5,11 +5,14 @@ from pygame.color import Color from pygame.colordict import THECOLORS from pygame.surface import Surface -from albow.resource import get_image from pyntnclick.state import Thing from pyntnclick.widgets import BoomLabel +# XXX: Needs a way to get at resource: +from pyntinclick.resource import Resource +get_image = Resource().get_image + class Interact(object):
--- a/scripts/build_unix.sh Sat Feb 11 21:12:45 2012 +0200 +++ b/scripts/build_unix.sh Sat Feb 11 21:18:41 2012 +0200 @@ -14,10 +14,5 @@ cd build -# Add albow to our game -unzip ../deps/Albow-2.1.0.zip > /dev/null -mv Albow-2.1.0/albow ${GAME_NAME} -rm -rf Albow-2.1.0 - tar czf ../dist/${TARBALL_NAME} ${GAME_NAME}