mkRPG
 All Classes Namespaces Functions
Public Member Functions | Public Attributes
interface.gui.gui_elements.Container Class Reference

List of all members.

Public Member Functions

def __init__
def build
def add
def remove
def empty
def draw
def render
def handle_event
def move
def set_position

Public Attributes

 style
 pos
 need_build
 background

Detailed Description

Simple container for other elements 

Constructor & Destructor Documentation

def interface.gui.gui_elements.Container.__init__ (   self,
  elements,
  style 
)
Elements is a list of GUIElement sub-classes instances and their
    position relatively to the top left corner of the container. Each
    element will be blit accordingly to its Rect attribute (position
    is relative to the container top left corner)
    Style should have the following attributes:
size : int * int (if 0,0 the area will fit)
background_color : int * int * int * int (R,G,B and alpha)
background_image : pygame.Surface (to use
                        Note that unlike the Button class, the
                        container class requires a
                        background_color attribute even if
                        this attribute is specified)
background_pattern : str (should be "unique" or "repeat", only
                          necessary when background_image is
                          used)

Member Function Documentation

def interface.gui.gui_elements.Container.add (   self,
  sprites 
)
add GUIElement sub class instances to the container 
build the background of the container 
def interface.gui.gui_elements.Container.draw (   self,
  surface 
)
draw all elements (except background) on surface 
remove everything from the container 
def interface.gui.gui_elements.Container.remove (   self,
  sprites 
)
remove GUIElement sub class instances to the container 
draw all the elements over the background and return it 

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions