45 lines
886 B
Lua
45 lines
886 B
Lua
local t = {}
|
|
local lg = assert( love ).graphics
|
|
local modal = require 'ui.modal'
|
|
local button = require 'ui.button'
|
|
local camera = require 'ui.camera'
|
|
local map = require 'map.map'
|
|
|
|
local node
|
|
local moveModal = modal.new{}
|
|
local selectModal = modal.new{}
|
|
|
|
button.new{ name = "ATTACK NODE",
|
|
group = t,
|
|
icon = lg.newImage("icons/node-attack.png"),
|
|
x = 615,
|
|
y = 0,
|
|
callback = function()
|
|
node = map.ainodes.newNode( true )
|
|
return moveModal:start()
|
|
end
|
|
}
|
|
|
|
button.new{ name = "PLACEMENT NODE",
|
|
group = t,
|
|
icon = lg.newImage("icons/node-place.png"),
|
|
x = 615,
|
|
y = 1 * (4 + button.h),
|
|
callback = function()
|
|
node = map.ainodes.newNode( true )
|
|
return moveModal:start()
|
|
end
|
|
}
|
|
|
|
button.new{ name = "MOVE NODE",
|
|
group = t,
|
|
y = 2 * (4 + button.h),
|
|
x = 615,
|
|
}
|
|
|
|
button.new{ name = "DELETE NODE",
|
|
group = t,
|
|
y = 3 * (4 + button.h),
|
|
x = 615,
|
|
}
|
|
return t |