require "StandardMouseButton"
require "CDialog"

-- reserve constructor
Book_MagazineDialog = 
{
	name = "Book_MagazineDialog"
}

function Book_MagazineDialog:Create(  )
	log("magaz create")
	-- The main screen container
	local instance = root.dialogs[ self.name ];
	instance:SetPosition( 0, 0 )
	CDialog:Attach( instance )

	-- The buttons

	local btnDone = instance.btnDone
	
	-- The main init function
	function instance:Init( )
		log("magaz init")
		-- init done button
--		StandardMouseButton( btnDone )
--		function btnDone:Pressed( )
--			log("magaz press")
--			instance:ScreenEvent( "btnDone", "" )
--			instance:CloseAndSave( )
--		end
	end

	StandardMouseButton( btnDone )
	function btnDone:Pressed( )
		log("magaz press")
--		instance:ScreenEvent( "btnDone", "" )
		instance:CloseAndSave( )
	end
	
	function instance:OnUpdate( )
		self:OnUpdateDialog()
	end

end

Book_MagazineDialog:Create( )



