function meu:get_preset_nb()	return 8	end

function meu:define_ui()
	local ref	= self.ref
	local ui 	= self.ui
	local bu
	local par

	self:add_camera()

	--self:add_bu_texture_target_unit()

	--self:add_rendering()
	--self:add_nb_uv( {1, 12.5}, self:get_layer_bdd(1) )

	local ix = 1
	local iy = 1
	local SY,DY = 1,.1
	local SYT = .8

	self:set_tab_key( "Base" )
	bu = self:add_text(			{ix,iy,		4,SYT},	"BUTTON" )
		:set_ui_active( false )
	iy = iy + SYT + DY

	bu = self:add_button(		{ix+1,iy,	4,SY},	"ON/OFF" ) --,	self, "val_test", false )
	--bu = self:add_text(			{ix+5,iy,	3,SY},	"ON/OFF Result" )
		--todo
		--bu:set_target_lua( self, "val_test" )
	iy = iy + SY + DY

	bu = self:add_button(		{ix+1,iy,	SY,SY},	"Check" )
	iy = iy + SY + DY

	bu = self:add_trig(			{ix+1,iy,	4,SY},	"Trig" ):set_color_back( "restart" )
			:set_fn_on_click( aaa.bell )
			:set_fx_on_click( true )
	iy = iy + SY*2 + DY

	bu = self:add_text(			{ix,iy,		4,SYT},	"SELECTOR" )
	:set_ui_active( false )
	iy = iy + SYT + DY*3

	bu = self:add_selector(		{ix,iy,		8,SY},	"Mode" )
		:set_item_text( 2, "Yes", "NO", "1", "2", "3", "4" )
	iy = iy + SY + DY*3

	bu = self:add_selector(		{ix,iy,		8,SY},	"Multiple" )
		:set_item_text( 1, "A", "B", "C", "D" )
		:set_selection_multiple( true )
	iy = iy + SY*2 + DY
	
	bu = self:add_text(			{ix,iy,		4,SYT},	"TEXT" )
		:set_ui_active( false )
	iy = iy + SYT + DY

	bu = self:add_text_info(	{ix,iy,		4,SY},	"Info" )
	iy = iy + SY + DY/2

	bu = self:add_text(			{ix,iy,		4,SY},	"Edit" )
	iy = iy + SY + DY/2

	ix,iy = 9,2
	bu = self:add_text(			{ix,iy,		4,SYT},	"SLIDER" )
		:set_ui_active( false )
	iy = iy + SYT + DY

	bu = self:add_slider(		{ix,iy,		8,SY},	"Value",	nil,nil,	1,	0,8	)
		:add_values_def( .5,1,2,3,4,6 )
	iy = iy + SY

	bu = self:add_slider_two(	{ix,iy,		8,SY},	"Two" )
		bu:set_value( .25, 1 )
		bu:set_value( .75, 2 )
	iy = iy + SY

	bu = self:add_slider_two(	{ix,iy,		8,SY},	"Two Linear" )
		:set_draw_step_linear(true)
		bu:set_value( .25, 1 )
		bu:set_value( .75, 2 )
	iy = iy + SY + DY

	local SYS = 2.8
	bu = self:add_slider_xy(	{ix,iy,		8,SYS},	"XY" )
		bu:set_value( .5, 1 )
		bu:set_value( .5, 2 )
	iy = iy + SYS

	bu = self:add_slider_multi(	{ix,iy,		8,SYS},	"MULTI",	4 )
		bu:set_ui_top_size( false )
		bu:set_value( .5, 1 )
		bu:set_value( .5, 2 )
	iy = iy + SYS
	
	bu = self:add_slider_multi_curve(	{ix,iy,	8,SYS},	"CURVE",	4 )
		bu:set_ui_top_size( false )
		bu:set_value( .5, 1 )
		bu:set_value( .5, 2 )
	iy = iy + SYS + DY

	self:set_tab_key( "More" )
	ix,iy = 1,1
	
	bu = self:add_text(		{ix,iy,		8,SY},	"More BUTTON" )
	iy = iy + SY + DY

	self:add_blending(		{ix+1,iy,	2,SY} )
	iy = iy + SY + DY

	bu = self:add_button( 	{ix+1,iy,	4,SY},	"What",		self, "s_what",     1   )
		bu:set_multiple( { "Option A" , "Oui", "Non" }, "what" )
	iy = iy + SY*2 + DY

	bu = self:add_bu_texture_target_unit(	{ix,iy, 	8,5},		"Tex",	1, true, self:get_layer(1) )
	iy = iy + 5 + DY

	bu = self:add_trig(		{ix,iy,	6,SY},	"Test" ):set_color_back( "restart" )
		:set_method_on_click( self, "test" )
		:set_fx_on_click( true )
	iy = iy + SY*2 + DY
end

function meu:test()
	aaaa.print_fn()
end

function meu:init()
end

function meu:update()
	if false then
		aaa.debug.show( self:get_bu_by_key("ON/OFF"):get_value(), "ON/OFF" ) 
		aaa.debug.show( self:get_bu_by_key("Check")	:get_value(), "Check" ) 
		aaa.debug.show( self:get_bu_by_key("Trig")	:get_value(), "Trig" ) 
	end
	MEU.update( self )
end

function meu:draw()
	local alpha = self:get_alpha()
	gol.color_white( alpha )
	MEU.draw( self )
end

