Platformer
Platformer
Functions | Variables
eternal2Deditor Namespace Reference

Functions

def getPath ()
 Gets the current OS path. More...
 
def osStartFile (file)
 Opens the given file based on the OS.
 
def resetGlobalVars ()
 Resets all global variables.
 
def open ()
 Opens the current level file. More...
 
def save ()
 Saves the current level file. More...
 
def play ()
 Plays the current level file. More...
 
def levelOrderConfig ()
 Gets the level order config file name. More...
 
def changeLevelName ()
 Changes the level name. More...
 
def checkNameDups (name)
 Checks for duplicates of the current name in global objects. More...
 
def createGameObject ()
 Creates a new game object. More...
 
def openGameObjectScript ()
 Opens the currently selected game object's script file. More...
 
def dupGameObject ()
 Duplicates the currently selected game object. More...
 
def selectFromCanvas (event)
 Selects an object based on the cursor position. More...
 
def canvasMoveStart (event)
 Begins moving the canvas based on the mouse position. More...
 
def canvasMouseMove (event)
 Moves the canvas based on the mouse position. More...
 
def deleteSelected (key)
 Deletes the selected game object. More...
 
def drawImage (path, obj)
 Draws the given image to the canvas. More...
 
def redrawObjects ()
 Redraws all game objects on the canvas. More...
 
def layerUpFunc ()
 Sets the currently selected game object to be layered one layer up. More...
 
def layerDownFunc ()
 Sets the currently selected game object to be layered one layer down. More...
 
def refreshFields ()
 Refreshes all of the fields. More...
 
def refreshList ()
 Refreshes the list of game objects. More...
 
def selectInList (event)
 Selects a game object from the list. More...
 
def setName ()
 Sets the name via name field input. More...
 
def setX ()
 Sets the x coordinate via x field input. More...
 
def setY ()
 Sets the y coordinate via y field input. More...
 
def setW ()
 Sets the width via width field input. More...
 
def setH ()
 Sets the height via height field input. More...
 
def setScriptName ()
 Sets the script name via script field input. More...
 
def setClassName ()
 Sets the class name via class field input. More...
 
def setSpriteName ()
 Sets the sprite name via sprite field input. More...
 
def setPermanentField ()
 Sets the permanent field via permanent field input. More...
 
def refreshAll ()
 Refreshes everything. More...
 

Variables

list globalObjs = []
 The global object list.
 
 selected = None
 The current selected object.
 
string curFileName = "temp.lvl"
 The current level file name.
 
list spriteStore = []
 Stores sprites for later.
 
 app = gui("Eternal2DEditor", "1200x900")
 Create the application window.
 
string canvasTitle = "Scene View"
 The title of the main canvas. More...
 
 canvas = app.addCanvas(canvasTitle, 0, 0)
 Main canvas with images of GameObjects. More...
 
 gain
 
string nameField = "Name"
 The label for the namefield. More...
 
string xField = "X"
 The label for the x coordinate field. More...
 
string yField = "Y"
 The label for the y coordinate field. More...
 
string wField = "W"
 The label for the width field. More...
 
string hField = "H"
 The label for the height field. More...
 
string permanentField = "Permanent"
 The label for the permanent field. More...
 
string moduleNameField = "Module Name"
 The label for the module name field. More...
 
 scriptEntry = app.addLabelEntry(moduleNameField, 4, 0, 2, 1)
 
string classNameField = "Class Name"
 The label for the class name field. More...
 
string spriteNameField = "Sprite Name"
 The label for the sprite name field. More...
 
string layerUp = "Move Up"
 The label for the layer up name field. More...
 
string layerDown = "Move Down"
 The label for the layer down name field. More...
 
string listBox = "Scene Hierarchy"
 The label for the scene hierarchy.
 
 lb = app.addListBox(listBox, [], 1, 0)
 Side list with all objects.
 

Detailed Description

Runs the python editor GUI interface.
All python code relevant to the editor is found here. 

Function Documentation

◆ canvasMouseMove()

def eternal2Deditor.canvasMouseMove (   event)

Moves the canvas based on the mouse position.

◆ canvasMoveStart()

def eternal2Deditor.canvasMoveStart (   event)

Begins moving the canvas based on the mouse position.

Here is the call graph for this function:

◆ changeLevelName()

def eternal2Deditor.changeLevelName ( )

Changes the level name.

◆ checkNameDups()

def eternal2Deditor.checkNameDups (   name)

Checks for duplicates of the current name in global objects.

Will append -dup if there is a duplicate.

Here is the caller graph for this function:

◆ createGameObject()

def eternal2Deditor.createGameObject ( )

Creates a new game object.

Here is the call graph for this function:

◆ deleteSelected()

def eternal2Deditor.deleteSelected (   key)

Deletes the selected game object.

Here is the call graph for this function:

◆ drawImage()

def eternal2Deditor.drawImage (   path,
  obj 
)

Draws the given image to the canvas.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dupGameObject()

def eternal2Deditor.dupGameObject ( )

Duplicates the currently selected game object.

Here is the call graph for this function:

◆ getPath()

def eternal2Deditor.getPath ( )

Gets the current OS path.

Here is the caller graph for this function:

◆ layerDownFunc()

def eternal2Deditor.layerDownFunc ( )

Sets the currently selected game object to be layered one layer down.

Here is the call graph for this function:

◆ layerUpFunc()

def eternal2Deditor.layerUpFunc ( )

Sets the currently selected game object to be layered one layer up.

Here is the call graph for this function:

◆ levelOrderConfig()

def eternal2Deditor.levelOrderConfig ( )

Gets the level order config file name.

Here is the call graph for this function:

◆ open()

def eternal2Deditor.open ( )

Opens the current level file.

Here is the call graph for this function:

◆ openGameObjectScript()

def eternal2Deditor.openGameObjectScript ( )

Opens the currently selected game object's script file.

Here is the call graph for this function:

◆ play()

def eternal2Deditor.play ( )

Plays the current level file.

Here is the call graph for this function:

◆ redrawObjects()

def eternal2Deditor.redrawObjects ( )

Redraws all game objects on the canvas.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshAll()

def eternal2Deditor.refreshAll ( )

Refreshes everything.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshFields()

def eternal2Deditor.refreshFields ( )

Refreshes all of the fields.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshList()

def eternal2Deditor.refreshList ( )

Refreshes the list of game objects.

Here is the caller graph for this function:

◆ save()

def eternal2Deditor.save ( )

Saves the current level file.

Here is the call graph for this function:

◆ selectFromCanvas()

def eternal2Deditor.selectFromCanvas (   event)

Selects an object based on the cursor position.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectInList()

def eternal2Deditor.selectInList (   event)

Selects a game object from the list.

Here is the call graph for this function:

◆ setClassName()

def eternal2Deditor.setClassName ( )

Sets the class name via class field input.

◆ setH()

def eternal2Deditor.setH ( )

Sets the height via height field input.

Here is the call graph for this function:

◆ setName()

def eternal2Deditor.setName ( )

Sets the name via name field input.

Here is the call graph for this function:

◆ setPermanentField()

def eternal2Deditor.setPermanentField ( )

Sets the permanent field via permanent field input.

◆ setScriptName()

def eternal2Deditor.setScriptName ( )

Sets the script name via script field input.

◆ setSpriteName()

def eternal2Deditor.setSpriteName ( )

Sets the sprite name via sprite field input.

Here is the call graph for this function:

◆ setW()

def eternal2Deditor.setW ( )

Sets the width via width field input.

Here is the call graph for this function:

◆ setX()

def eternal2Deditor.setX ( )

Sets the x coordinate via x field input.

Here is the call graph for this function:

◆ setY()

def eternal2Deditor.setY ( )

Sets the y coordinate via y field input.

Here is the call graph for this function:

Variable Documentation

◆ canvas

eternal2Deditor.canvas = app.addCanvas(canvasTitle, 0, 0)

Main canvas with images of GameObjects.

◆ canvasTitle

string eternal2Deditor.canvasTitle = "Scene View"

The title of the main canvas.

◆ classNameField

string eternal2Deditor.classNameField = "Class Name"

The label for the class name field.

◆ hField

string eternal2Deditor.hField = "H"

The label for the height field.

◆ layerDown

string eternal2Deditor.layerDown = "Move Down"

The label for the layer down name field.

◆ layerUp

string eternal2Deditor.layerUp = "Move Up"

The label for the layer up name field.

◆ moduleNameField

string eternal2Deditor.moduleNameField = "Module Name"

The label for the module name field.

◆ nameField

string eternal2Deditor.nameField = "Name"

The label for the namefield.

◆ permanentField

string eternal2Deditor.permanentField = "Permanent"

The label for the permanent field.

◆ spriteNameField

string eternal2Deditor.spriteNameField = "Sprite Name"

The label for the sprite name field.

◆ wField

string eternal2Deditor.wField = "W"

The label for the width field.

◆ xField

string eternal2Deditor.xField = "X"

The label for the x coordinate field.

◆ yField

string eternal2Deditor.yField = "Y"

The label for the y coordinate field.