pygamegsoc12 / alchemymadness / layout.py

from pygame.locals import Rect

__all__ = ('screen_size', 'Main')

screen_size = (800, 600)

class Main(object):
    block_rect = Rect(0, 0, 25, 25)
    small_block_rect = Rect(0, 0, 12, 12)
    grid_size = Rect(0, 0, 10, 15) # size in blocks
    grid_rects = (
        Rect(50, 50, block_rect.w * grid_size.w, block_rect.h * grid_size.h),
        Rect(330, 58, small_block_rect.w * grid_size.w, small_block_rect.h * grid_size.h),
        Rect(478, 58, small_block_rect.w * grid_size.w, small_block_rect.h * grid_size.h),
        Rect(626, 58, small_block_rect.w * grid_size.w, small_block_rect.h * grid_size.h),
    )
    potion_rect = Rect(372, 360, 130, 194)
    small_potion_rect = Rect(553, 454, 68, 100)
    spiral_rect = Rect(718, 255, 82, 280)
    tube_rects = tuple(Rect(63 + i * 25, 447, 24, 76) for i in range(9))
    input_rects = (
        Rect(300, 277, 56, 71),
        Rect(400, 236, 50, 40),
        Rect(513, 236, 50, 40),
        Rect(625, 236, 50, 40),
    )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.