Snake
Public Member Functions | List of all members
Interface.GUI Class Reference

A Class that will contain useful functions in order for the creation of main interface. More...

Public Member Functions

def runfile (runfilename)
 A function for running other files. More...
 
def button (Surface, color, Rect, width)
 A method to create a button. More...
 
def text (text, fontStyle, fontSize, color, coord, surface)
 A method to display text. More...
 

Detailed Description

A Class that will contain useful functions in order for the creation of main interface.

Member Function Documentation

def Interface.GUI.button (   Surface,
  color,
  Rect,
  width 
)

A method to create a button.

This method will make a box on the interface

Parameters
surfaceThe background (surface) the box should be made on
colorThe color of the button to be made
RectThe coordinate of the button with the length and width
widthThe width of the sides of button
def Interface.GUI.runfile (   runfilename)

A function for running other files.

Executes another python file when this is selected, Given that the file is in same folder.

Parameters
runfilenameThe name of the file to be executed
def Interface.GUI.text (   text,
  fontStyle,
  fontSize,
  color,
  coord,
  surface 
)

A method to display text.

This function will print the text on the interface

Parameters
textThe text to be printed
fontStyleThe font Style of the text to be displayed
fontSizeThe size of the text written
colorThe color of the text
coordThe coordinate at which the text should start displaying
surfaceThe background (surface) the text should be printed on

The documentation for this class was generated from the following file: