mirror of https://github.com/OpenMW/openmw.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.7 KiB
C++
54 lines
1.7 KiB
C++
#include "util.hpp"
|
|
|
|
#include <MyGUI_FactoryManager.h>
|
|
|
|
#include "adapter.hpp"
|
|
#include "container.hpp"
|
|
#include "flex.hpp"
|
|
#include "image.hpp"
|
|
#include "text.hpp"
|
|
#include "textedit.hpp"
|
|
#include "widget.hpp"
|
|
#include "window.hpp"
|
|
|
|
#include "element.hpp"
|
|
#include "registerscriptsettings.hpp"
|
|
|
|
namespace LuaUi
|
|
{
|
|
|
|
void registerAllWidgets()
|
|
{
|
|
MyGUI::FactoryManager::getInstance().registerFactory<LuaAdapter>("Widget");
|
|
MyGUI::FactoryManager::getInstance().registerFactory<LuaWidget>("Widget");
|
|
MyGUI::FactoryManager::getInstance().registerFactory<LuaText>("Widget");
|
|
MyGUI::FactoryManager::getInstance().registerFactory<LuaTextEdit>("Widget");
|
|
MyGUI::FactoryManager::getInstance().registerFactory<LuaWindow>("Widget");
|
|
MyGUI::FactoryManager::getInstance().registerFactory<LuaImage>("Widget");
|
|
MyGUI::FactoryManager::getInstance().registerFactory<LuaTileRect>("BasisSkin");
|
|
MyGUI::FactoryManager::getInstance().registerFactory<LuaContainer>("Widget");
|
|
MyGUI::FactoryManager::getInstance().registerFactory<LuaFlex>("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" },
|
|
{ "LuaImage", "Image" },
|
|
{ "LuaFlex", "Flex" },
|
|
{ "LuaContainer", "Container" },
|
|
};
|
|
return types;
|
|
}
|
|
|
|
void clearUserInterface()
|
|
{
|
|
clearSettings();
|
|
while (!Element::sAllElements.empty())
|
|
Element::sAllElements.begin()->second->destroy();
|
|
}
|
|
}
|