CorsixTH Lua Documentation

UIPlaceObjects Class

The dialog shown when placing objects.

Declared on: line 30 of Lua/dialogs/place_objects.lua.
Inheritance: UIPlaceObjects ยป Window
Subclasses: UIEditRoom

Method Index

Member Index

(*) only used in superclass methods
function UIPlaceObjects:UIPlaceObjects(ui, object_list, pay_for)

Constructor for the class.

Parameters:

NameTypeDescription
ui UI The active ui.
object_list table a list of tables with objects to place. Keys are "object", "qty" and "existing_object". The first is the object_type of the object, the second how many, and if the key "existing_object" is set it should be an already existing object that is about to be moved. In particular, if that object has a variable called current_frame then that frame will be used when drawing the object as it is being moved.
pay_for ? ?

Declared on: line 33 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:addObjects(object_list, pay_for)

Parameters:

NameTypeDescription
object_list ? ?
pay_for ? ?

Declared on: line 156 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:draw(canvas, x, y)

Parameters:

NameTypeDescription
canvas ? ?
x ? ?
y ? ?

Overrides: Window:draw.
Declared on: line 518 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:onMouseUp(button, x, y)

Parameters:

NameTypeDescription
button ? ?
x ? ?
y ? ?

Overrides: Window:onMouseUp.
Declared on: line 448 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:placeObject(dont_close_if_empty)

Parameters:

NameTypeDescription
dont_close_if_empty ? ?

Declared on: line 476 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:removeAllObjects(refund)

Parameters:

NameTypeDescription
refund ? ?

Declared on: line 280 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:removeObject(object, dont_close_if_empty, refund)

precondition: self.active_index has to correspond to the object to be removed

Parameters:

NameTypeDescription
object ? ?
dont_close_if_empty ? ?
refund ? ?

Declared on: line 239 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:removeObjects(object_list, refund)

Parameters:

NameTypeDescription
object_list ? ?
refund ? ?

Declared on: line 290 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:resize(num_slots)

changes the window size and buttons to num_slots slots

Parameters:

NameTypeDescription
num_slots ? ?

Declared on: line 91 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:selectObjectType(object_type)

Parameters:

NameTypeDescription
object_type ? ?

Declared on: line 878 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:setActiveIndex(index)

Parameters:

NameTypeDescription
index ? ?

Declared on: line 320 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:setBlueprintCell(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Declared on: line 574 of Lua/dialogs/place_objects.lua.

function UIPlaceObjects:setOrientation(orient)

Parameters:

NameTypeDescription
orient ? ?

Declared on: line 367 of Lua/dialogs/place_objects.lua.

Page generated on Sat Feb 07, 2015 at 18:38:28 by LDocGen.