--------------------------------------------------------------------
-- s_init_destpos_select_mode.lua
-- カーソル移動先ポイント初期化（SelectMode）
--
-- 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_1playerPos = {
	margin + 406.0 / BASE_RESOLUTION_WIDTH * mainWidth,
	222.0 / BASE_RESOLUTION_HEIGHT * resolutionHeight }

button_2playersPos = {
	margin + 406.0 / BASE_RESOLUTION_WIDTH * mainWidth,
	319.0 / BASE_RESOLUTION_HEIGHT * resolutionHeight }

button_RecordsPos = {
	margin + 406.0 / BASE_RESOLUTION_WIDTH * mainWidth,
	416.0 / BASE_RESOLUTION_HEIGHT * resolutionHeight }

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


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

-- ボタン（1player）
Scene.AddCursorDestPoint( 0, 
	button_1playerPos[1], button_1playerPos[2], -- dest
	button_ReturnPos[1], button_ReturnPos[2], -- up
	button_2playersPos[1], button_2playersPos[2], -- down
	button_1playerPos[1], button_1playerPos[2], -- left
	button_1playerPos[1], button_1playerPos[2] ) -- right

-- ボタン（2player）
Scene.AddCursorDestPoint( 0, 
	button_2playersPos[1], button_2playersPos[2], -- dest
	button_1playerPos[1], button_1playerPos[2], -- up
	button_RecordsPos[1], button_RecordsPos[2], -- down
	button_2playersPos[1], button_2playersPos[2], -- left
	button_2playersPos[1], button_2playersPos[2] ) -- right

-- ボタン（Records）
Scene.AddCursorDestPoint( 0, 
	button_RecordsPos[1], button_RecordsPos[2], -- dest
	button_2playersPos[1], button_2playersPos[2], -- up
	button_ReturnPos[1], button_ReturnPos[2], -- down
	button_RecordsPos[1], button_RecordsPos[2], -- left
	button_RecordsPos[1], button_RecordsPos[2] ) -- right

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


