Magic_Game/samples/ImGuiSample/main.cpp

42 lines
598 B
C++
Raw Normal View History

// Copyright (C) 2019 Nomango
2019-03-11 11:11:39 +08:00
#include "MainScene.h"
2019-04-11 14:40:54 +08:00
using namespace kiwano;
2019-03-11 11:11:39 +08:00
class ImGuiApp
: public Application
{
public:
ImGuiApp()
{
// <20><><EFBFBD><EFBFBD> ImGui <20><><EFBFBD><EFBFBD>
Use(&ImGuiView::Instance());
// <20><>ʼ<EFBFBD><CABC>
Options options(L"ImGui Demo", 1280, 800);
2019-03-11 11:11:39 +08:00
Init(options);
}
void OnStart() override
{
MainScenePtr scene = new MainScene;
2019-03-11 11:11:39 +08:00
EnterScene(scene);
}
};
int WINAPI wWinMain(HINSTANCE, HINSTANCE, PWSTR, int)
2019-03-11 11:11:39 +08:00
{
try
{
ImGuiApp app;
app.Run();
}
catch (std::exception& e)
{
::MessageBoxA(nullptr, e.what(), "An exception has occurred!", MB_ICONERROR | MB_OK);
}
return 0;
}