--------------------------------------------------------------------
-- s_init_destpos_select_flower.lua
-- カーソル移動先ポイント初期化（SelectFlower）
--
-- author IZUMI STUDIO
-- date
--------------------------------------------------------------------
require(".\\scripts\\menu\\s_common")

BASE_RESOLUTION_WIDTH  = 800
BASE_RESOLUTION_HEIGHT = 600
resolutionWidth  = Scene.GetEnvParameterInt("ResolutionWidth")
resolutionHeight = Scene.GetEnvParameterInt("ResolutionHeight")
aspectRatio      = Scene.GetEnvParameterFloat("AspectRatio")

-- 「1.333 部分と、その外側」と考える
margin    = ( (aspectRatio-1.333) / (aspectRatio) ) * resolutionWidth / 2.0
mainWidth = resolutionWidth * 1.333 / aspectRatio

button_Flower1Pos = {
	margin + 255.78 / BASE_RESOLUTION_WIDTH * mainWidth,
	319.0 / BASE_RESOLUTION_HEIGHT * resolutionHeight }

button_Flower2Pos = {
	margin + 544.22 / BASE_RESOLUTION_WIDTH * mainWidth,
	319.0 / BASE_RESOLUTION_HEIGHT * resolutionHeight }

button_ReturnPos = {
	margin + 190.0 / BASE_RESOLUTION_WIDTH * mainWidth,
	560.5 / BASE_RESOLUTION_HEIGHT * resolutionHeight }


-- 全てクリアする
Scene.ClearCursorDestPoints(0)

-- ボタン（flower1）
Scene.AddCursorDestPoint( 0, 
	button_Flower1Pos[1], button_Flower1Pos[2], -- dest
	button_ReturnPos[1], button_ReturnPos[2], -- up
	button_ReturnPos[1], button_ReturnPos[2], -- down
	button_Flower2Pos[1], button_Flower2Pos[2], -- left
	button_Flower2Pos[1], button_Flower2Pos[2] ) -- right

-- ボタン（flower2）
Scene.AddCursorDestPoint( 0, 
	button_Flower2Pos[1], button_Flower2Pos[2], -- dest
	button_ReturnPos[1], button_ReturnPos[2], -- up
	button_ReturnPos[1], button_ReturnPos[2], -- down
	button_Flower1Pos[1], button_Flower1Pos[2], -- left
	button_Flower1Pos[1], button_Flower1Pos[2] ) -- right

-- ボタン（Return）
Scene.AddCursorDestPoint( 0, 
	button_ReturnPos[1], button_ReturnPos[2], -- dest
	button_Flower1Pos[1], button_Flower1Pos[2], -- up
	button_Flower1Pos[1], button_Flower1Pos[2], -- down
	button_Flower1Pos[1], button_Flower1Pos[2], -- left
	button_Flower2Pos[1], button_Flower2Pos[2] ) -- right


