using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DxLibDLL;
namespace DesignProject
{
partial class Scene
{
public void CreateTitle()
{
this.sceneMenu.Add(new MenuManager(this));
this.sceneMenu[this.sceneMenu.Count - 1].menu.Add(
new Menu(
this.sceneMenu[this.sceneMenu.Count - 1],
(Menu menu) =>
{
if (menu.system.key.PushMoment(DX.KEY_INPUT_UP))
{
menu.cursorY -= 1;
if (menu.cursorY < 0)
{
menu.cursorY = 0;
}
}
if (menu.system.key.PushMoment(DX.KEY_INPUT_DOWN))
{
menu.cursorY += 1;
if (menu.cursorY >= 3)
{
menu.cursorY = 2;
}
}
if (menu.system.key.PushMoment(DX.KEY_INPUT_Z))
{
switch (menu.cursorY)
{
case (0):
//接続画面へ
menu.system.scene.nextSceneID = 1;
break;
case (1):
//編集画面へ
break;
case (2):
//終了
menu.system.isClose = true;
break;
default:
break;
}
}
if (menu.system.key.PushMoment(DX.KEY_INPUT_X))
{
menu.cursorY = 2;
}
return;
},
(Menu menu) =>
{
DX.DrawString(320 - 45 + 10, 240 - 100 + 10, "TITLE", DX.GetColor(255, 0, 0));
DX.DrawString(320 - 50 + 10, 240 + 10, "せつぞく", DX.GetColor(255, 255, 255));
DX.DrawString(320 - 50 + 10, 240 + 40, "test2", DX.GetColor(255, 255, 255));
DX.DrawString(320 - 50 + 10, 240 + 70, "おわる", DX.GetColor(255, 255, 255));
DX.DrawBox(
320 - 90 + 5,
240 + 5 + menu.cursorY * 30,
320 - 90 + 160,
240 + 5 + menu.cursorY * 30 + 25,
DX.GetColor(255, 255, 255),
DX.FALSE
);
return;
},
(Menu menu) =>
{
return;
}
)
);
}
}
}
最終更新:2011年01月11日 10:35