using BansheeEngine;
namespace BansheeEditor
{
///
/// Displays in-game viewport in the editor.
///
public class GameWindow : EditorWindow
{
///
/// Opens the game window.
///
[MenuItem("Windows/Game", ButtonModifier.CtrlAlt, ButtonCode.G, 6000)]
private static void OpenGameWindow()
{
OpenWindow();
}
///
/// Starts execution of the game in the game window.
///
[MenuItem("Tools/Play", 9300)]
[ToolbarItem("Play", ToolbarIcon.Play, "", 1800, true)]
private static void Play()
{
if (EditorApplication.IsPaused)
EditorApplication.IsPaused = false;
else
EditorApplication.IsPlaying = !EditorApplication.IsPlaying;
}
///
/// Pauses the execution of the game on the current frame.
///
[MenuItem("Tools/Pause", 9299)]
[ToolbarItem("Pause", ToolbarIcon.Pause, "", 1799)]
private static void Pause()
{
EditorApplication.IsPaused = !EditorApplication.IsPaused;
}
///
/// Moves the execution of the game by one frame forward.
///
[MenuItem("Tools/Step", 9298)]
[ToolbarItem("Step", ToolbarIcon.Step, "", 1798)]
private static void Step()
{
EditorApplication.FrameStep();
}
///
protected override LocString GetDisplayName()
{
return new LocEdString("Game");
}
}
}