root/src/closeButton.py @ 538

Revision 538, 0.8 KB (checked in by jelinson, 2 years ago)

refacoted window; added support for getting window by type and attribute

Line 
1'''
2Created on April 5, 2012
3
4@author: TechTrek
5'''
6
7from window import Window
8from image import Image
9from dim import closeButtonDim as DIM
10from globals import *
11
12
13class CloseButton(Window):
14    """
15        Close button for menus and other windows.
16    """
17   
18    def __init__(self, pos, visible, windowResponse, isGlowy=False):
19        """
20            initializes the closebutton.
21           
22            input type: (int int)(pos) bool(visible) function(windowResponse)
23                        bool(isGlow)
24        """
25        Window.__init__(self, pos, visible)
26        if not isGlowy:
27            self.addImg(Image(self.pos, DIM.W, DIM.H, buttonDir + "close_button"))
28        else:
29            self.addImg(Image(self.pos, DIM.W, DIM.H, buttonDir + "glowy_close_button"))
30        self.addResponse(windowResponse)
Note: See TracBrowser for help on using the browser.