mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 05:56:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			890 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			890 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "widgetlist.hpp"
 | |
| 
 | |
| #include <MyGUI_FactoryManager.h>
 | |
| 
 | |
| #include "widget.hpp"
 | |
| #include "text.hpp"
 | |
| #include "textedit.hpp"
 | |
| #include "window.hpp"
 | |
| 
 | |
| namespace LuaUi
 | |
| {
 | |
| 
 | |
|     void registerAllWidgets()
 | |
|     {
 | |
|         MyGUI::FactoryManager::getInstance().registerFactory<LuaWidget>("Widget");
 | |
|         MyGUI::FactoryManager::getInstance().registerFactory<LuaText>("Widget");
 | |
|         MyGUI::FactoryManager::getInstance().registerFactory<LuaTextEdit>("Widget");
 | |
|         MyGUI::FactoryManager::getInstance().registerFactory<LuaWindow>("Widget");
 | |
|     }
 | |
| 
 | |
|     const std::unordered_map<std::string, std::string>& widgetTypeToName()
 | |
|     {
 | |
|         static std::unordered_map<std::string, std::string> types{
 | |
|             { "LuaWidget", "Widget" },
 | |
|             { "LuaText", "Text" },
 | |
|             { "LuaTextEdit", "TextEdit" },
 | |
|             { "LuaWindow", "Window" },
 | |
|         };
 | |
|         return types;
 | |
|     }
 | |
| }
 |