local druid = require("druid.druid")
local const_druid = require("druid.const")
local layout = require("druid.extended.layout")

function init(self)
	druid.register("layout", layout)
	self.druid = druid.new(self)

	self.druid:new_layout("node_zoom_test", const_druid.LAYOUT_MODE.STRETCH)
		:fit_into_window()

	self.druid:new_layout("image_1", const_druid.LAYOUT_MODE.STRETCH)
		:fit_into_node(gui.get_node("back_1"))
	self.druid:new_layout("image_2", const_druid.LAYOUT_MODE.ZOOM_MAX)
		:fit_into_node(gui.get_node("back_2"))
	self.druid:new_layout("image_3", const_druid.LAYOUT_MODE.ZOOM_MIN)
		:fit_into_node(gui.get_node("back_3"))
	self.druid:new_layout("image_4", const_druid.LAYOUT_MODE.STRETCH_X)
		:fit_into_node(gui.get_node("back_4"))
	self.druid:new_layout("image_5", const_druid.LAYOUT_MODE.STRETCH_Y)
		:fit_into_node(gui.get_node("back_5"))
	self.druid:new_layout("image_6", const_druid.LAYOUT_MODE.FIT)
		:fit_into_node(gui.get_node("back_6"))
end


function final(self)
	self.druid:final()
end


function update(self, dt)
	self.druid:update(dt)
end


function on_message(self, message_id, message, sender)
	self.druid:on_message(message_id, message, sender)
end


function on_input(self, action_id, action)
	return self.druid:on_input(action_id, action)
end
