root/src/hoverDescription.py @ 572

Revision 572, 0.9 KB (checked in by ecoughlan, 2 years ago)

unused imports and DIM files

Line 
1'''
2Created on Mar 23, 2012
3
4@author: TechTrek
5'''
6
7from window import Window
8from text import Text
9from image import Image
10from dim import hoverDescriptionDim as DIM
11import dimensions
12from globals import *
13
14
15class HoverDescription(Window):
16    """
17        The general hover description for other buttons.
18    """
19
20    def __init__(self, text):
21        """
22            initializes the hover description.
23
24            input type: str(text)
25            return type: none
26        """
27        Window.__init__(self, DIM.POS, True)
28
29        self.addImg(Image(DIM.POS, DIM.W, DIM.H, buttonDir + "info_background"))
30
31        self.addText(Text(DIM.TEXT_POS, text, SM_TEXT, WHITE, DIM.TEXT_W))
32
33    def render(self, surface):
34        if surface is not None:
35            self.resize(dimensions.SCREEN_W / float(ORIG_SCREEN_W),
36                        dimensions.SCREEN_H / float(ORIG_SCREEN_H))
37            Window.render(self, surface)
Note: See TracBrowser for help on using the browser.