--------------------------------------------------------------------
-- s_create_select_flower.lua
-- オブジェクト生成（SelectFlower用）
--
-- author IZUMI STUDIO
-- date
--------------------------------------------------------------------
require(".\\scripts\\menu\\s_common")


---------------------------------------------------------------------
-- Flower 1
---------------------------------------------------------------------
CAPTION_Z = -(25.0+2.0)*PROJ_HALF_WIDTH/400.0*1.333
PROJ_CAPTION_RADIUS = ( -CAMERA_POS_Z + CAPTION_Z ) / math.cos( PROJ_FOV/2.0 )
PROJ_CAPTION_HALF_WIDTH = PROJ_CAPTION_RADIUS * math.sin( PROJ_FOV/2.0 )

Scene.CreateBar( 0,
	PROJ_HALF_WIDTH/400.0*1.333,
	PROJ_HALF_WIDTH/400.0*1.333,
	PROJ_HALF_WIDTH/400.0*1.333,
	CAMERA_SELECT_FLOWER[4], CAMERA_SELECT_FLOWER[5], CAMERA_SELECT_FLOWER[6],
	CAMERA_SELECT_FLOWER[1], CAMERA_SELECT_FLOWER[2], CAMERA_SELECT_FLOWER[3],
	(255.78-400.0)/400.0*1.333 * PROJ_HALF_WIDTH,
	(300.0-319.0)/300.0 * PROJ_HALF_WIDTH,
	0.0,
	MODEL_NAME_MENU_BUTTON_FLOWER, -- model
	OPTION_CAPTION + OPTION_IMAGE, -- option
	"scripts\\menu\\s_push_flower1.lua", -- on click script
	
	-- Caption
	0.0, -66.5*PROJ_CAPTION_HALF_WIDTH/400.0*1.333, CAPTION_Z, -- Caption Pos
	"1st", -- Caption Text
	1.0, 1.0, 1.0, 1.0, -- Caption Color
	ALIGN_CENTER + ALIGN_VCENTER, 38.0/300.0 * PROJ_HALF_WIDTH,         -- Align, Font Size
	
	-- Caption 2
	0.0, 0.0, 0.0, -- Caption Pos
	"", -- Caption Text
	0.0, 0.0, 0.0, 0.0, -- Caption Color
	0, 1.0,         -- Align, Font Size
	
	-- Image
	"hibiscus_illust_border", -- name
	0.0, 31.5*PROJ_CAPTION_HALF_WIDTH/400.0*1.333, CAPTION_Z, -- pos
	 60.0*PROJ_CAPTION_HALF_WIDTH/400.0*1.333,
	-60.0*PROJ_CAPTION_HALF_WIDTH/400.0*1.333,
	-60.0*PROJ_CAPTION_HALF_WIDTH/400.0*1.333,
	 60.0*PROJ_CAPTION_HALF_WIDTH/400.0*1.333, -- dest rect
	0.0, 255.0, 0.0, 255.0 -- src rect
	 )


---------------------------------------------------------------------
-- Flower 2
---------------------------------------------------------------------
CAPTION_Z = -(25.0+2.0)*PROJ_HALF_WIDTH/400.0*1.333
PROJ_CAPTION_RADIUS = ( -CAMERA_POS_Z + CAPTION_Z ) / math.cos( PROJ_FOV/2.0 )
PROJ_CAPTION_HALF_WIDTH = PROJ_CAPTION_RADIUS * math.sin( PROJ_FOV/2.0 )

Scene.CreateBar( 0,
	PROJ_HALF_WIDTH/400.0*1.333,
	PROJ_HALF_WIDTH/400.0*1.333,
	PROJ_HALF_WIDTH/400.0*1.333,
	CAMERA_SELECT_FLOWER[4], CAMERA_SELECT_FLOWER[5], CAMERA_SELECT_FLOWER[6],
	CAMERA_SELECT_FLOWER[1], CAMERA_SELECT_FLOWER[2], CAMERA_SELECT_FLOWER[3],
	(544.22-400.0)/400.0*1.333 * PROJ_HALF_WIDTH,
	(300.0-319.0)/300.0 * PROJ_HALF_WIDTH,
	0.0,
	MODEL_NAME_MENU_BUTTON_FLOWER, -- model
	OPTION_CAPTION + OPTION_IMAGE, -- option
	"scripts\\menu\\s_push_flower2.lua", -- on click script
	
	-- Caption
	0.0, -66.5*PROJ_CAPTION_HALF_WIDTH/400.0*1.333, CAPTION_Z, -- Caption Pos
	"2nd", -- Caption Text
	1.0, 1.0, 1.0, 1.0, -- Caption Color
	ALIGN_CENTER + ALIGN_VCENTER, 38.0/300.0 * PROJ_HALF_WIDTH,         -- Align, Font Size
	
	-- Caption 2
	0.0, 0.0, 0.0, -- Caption Pos
	"", -- Caption Text
	0.0, 0.0, 0.0, 0.0, -- Caption Color
	0, 1.0,         -- Align, Font Size
	
	-- Image
	"sunflower_illust_border", -- name
	0.0, 31.5*PROJ_CAPTION_HALF_WIDTH/400.0*1.333, CAPTION_Z, -- pos
	 60.0*PROJ_CAPTION_HALF_WIDTH/400.0*1.333,
	-60.0*PROJ_CAPTION_HALF_WIDTH/400.0*1.333,
	-60.0*PROJ_CAPTION_HALF_WIDTH/400.0*1.333,
	 60.0*PROJ_CAPTION_HALF_WIDTH/400.0*1.333, -- dest rect
	0.0, 255.0, 0.0, 255.0 -- src rect
	 )


---------------------------------------------------------------------
-- Return
---------------------------------------------------------------------
CAPTION_Z = -(20.0+2.0)*PROJ_HALF_WIDTH/400.0*1.333
PROJ_CAPTION_RADIUS = ( -CAMERA_POS_Z + CAPTION_Z ) / math.cos( PROJ_FOV/2.0 )
PROJ_CAPTION_HALF_WIDTH = PROJ_CAPTION_RADIUS * math.sin( PROJ_FOV/2.0 )

Scene.CreateBar( 0,
	PROJ_HALF_WIDTH/400.0*1.333,
	PROJ_HALF_WIDTH/400.0*1.333,
	PROJ_HALF_WIDTH/400.0*1.333,
	CAMERA_SELECT_FLOWER[4], CAMERA_SELECT_FLOWER[5], CAMERA_SELECT_FLOWER[6],
	CAMERA_SELECT_FLOWER[1], CAMERA_SELECT_FLOWER[2], CAMERA_SELECT_FLOWER[3],
	(24.0-400.0)/400.0 * PROJ_HALF_WIDTH,
	(300.0-560.5)/300.0 * PROJ_HALF_WIDTH,
	0.0,
	MODEL_NAME_MENU_BUTTON_RETURN, -- model
	OPTION_CAPTION, -- option
	"scripts\\menu\\s_push_return4.lua", -- on click script
	
	-- Caption
	0.0, 0.0, CAPTION_Z, -- Caption Pos
	"Return", -- Caption Text
	1.0, 1.0, 1.0, 1.0, -- Caption Color
	ALIGN_CENTER + ALIGN_VCENTER, 21.0/300.0 * PROJ_HALF_WIDTH,         -- Align, Font Size
	
	-- Caption 2
	0.0, 0.0, 0.0, -- Caption Pos
	"", -- Caption Text
	0.0, 0.0, 0.0, 0.0, -- Caption Color
	0, 1.0,         -- Align, Font Size
	
	-- Image
	"", -- name
	0.0, 0.0, 0.0, -- pos
	0.0, 0.0, 0.0, 0.0, -- dest rect
	0.0, 0.0, 0.0, 0.0 -- src rect
	 )




