44 lines
		
	
	
		
			644 B
		
	
	
	
		
			C++
		
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			644 B
		
	
	
	
		
			C++
		
	
	
	
// Copyright (C) 2019 Nomango
 | 
						|
 | 
						|
#include "easy2d.h"
 | 
						|
#include "easy2d-imgui.h"
 | 
						|
#include "MainScene.h"
 | 
						|
 | 
						|
using namespace easy2d;
 | 
						|
 | 
						|
class ImGuiApp
 | 
						|
	: public Application
 | 
						|
{
 | 
						|
public:
 | 
						|
	ImGuiApp()
 | 
						|
	{
 | 
						|
		// Ìí¼Ó ImGui ×é¼þ
 | 
						|
		Use(&ImGuiView::Instance());
 | 
						|
 | 
						|
		// ³õʼ»¯
 | 
						|
		Options options(L"ImGui Demo", 1280, 800);
 | 
						|
 | 
						|
		Init(options);
 | 
						|
	}
 | 
						|
 | 
						|
	void OnStart() override
 | 
						|
	{
 | 
						|
		MainScenePtr scene = new MainScene;
 | 
						|
		EnterScene(scene);
 | 
						|
	}
 | 
						|
};
 | 
						|
 | 
						|
int WINAPI wWinMain(HINSTANCE, HINSTANCE, PWSTR, int)
 | 
						|
{
 | 
						|
	try
 | 
						|
	{
 | 
						|
		ImGuiApp app;
 | 
						|
		app.Run();
 | 
						|
	}
 | 
						|
	catch (std::exception& e)
 | 
						|
	{
 | 
						|
		::MessageBoxA(nullptr, e.what(), "An exception has occurred!", MB_ICONERROR | MB_OK);
 | 
						|
	}
 | 
						|
	return 0;
 | 
						|
}
 |