| 
									
										
										
										
											2019-03-12 00:27:54 +08:00
										 |  |  |  | // Copyright (C) 2019 Nomango
 | 
					
						
							| 
									
										
										
										
											2019-03-11 11:11:39 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-14 17:55:06 +08:00
										 |  |  |  | #include "MainScene.h"
 | 
					
						
							| 
									
										
										
										
											2019-03-12 00:27:54 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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() | 
					
						
							|  |  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2019-03-12 00:27:54 +08:00
										 |  |  |  | 		// <20><><EFBFBD><EFBFBD> ImGui <20><><EFBFBD><EFBFBD>
 | 
					
						
							| 
									
										
										
										
											2019-07-30 15:27:01 +08:00
										 |  |  |  | 		Use(ImGuiModule::Instance()); | 
					
						
							| 
									
										
										
										
											2019-03-12 00:27:54 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 		// <20><>ʼ<EFBFBD><CABC>
 | 
					
						
							| 
									
										
										
										
											2019-03-14 17:55:06 +08:00
										 |  |  |  | 		Options options(L"ImGui Demo", 1280, 800); | 
					
						
							| 
									
										
										
										
											2019-03-11 11:11:39 +08:00
										 |  |  |  | 		Init(options); | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 	void OnStart() override | 
					
						
							|  |  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2019-03-14 17:55:06 +08:00
										 |  |  |  | 		MainScenePtr scene = new MainScene; | 
					
						
							| 
									
										
										
										
											2019-03-11 11:11:39 +08:00
										 |  |  |  | 		EnterScene(scene); | 
					
						
							|  |  |  |  | 	} | 
					
						
							|  |  |  |  | }; | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-14 17:55:06 +08:00
										 |  |  |  | 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; | 
					
						
							|  |  |  |  | } |