Ir para conteúdo

Posts Recomendados

Então galera, eu não vi algo parecido aqui na parte de OTC, então vim mostrar pra vocês, a lista de funções fica na pasta onde está o OTC -src/framework/luafunctions.cpp

Vou disponibilizar os da minha lista de funções, que acho que é a padrão pois não editei:

g_lua.bindGlobalFunction("torect", [](const std::string& v) { return stdext::from_string<Rect>(v); });
g_lua.bindGlobalFunction("topoint", [](const std::string& v) { return stdext::from_string<Point>(v); });
g_lua.bindGlobalFunction("tocolor", [](const std::string& v) { return stdext::from_string<Color>(v); });
g_lua.bindGlobalFunction("tosize", [](const std::string& v) { return stdext::from_string<Size>(v); });
g_lua.bindGlobalFunction("recttostring", [](const Rect& v) { return stdext::to_string(v); });
g_lua.bindGlobalFunction("pointtostring", [](const Point& v) { return stdext::to_string(v); });
g_lua.bindGlobalFunction("colortostring", [](const Color& v) { return stdext::to_string(v); });
g_lua.bindGlobalFunction("sizetostring", [](const Size& v) { return stdext::to_string(v); });
g_lua.bindGlobalFunction("iptostring", [](int v) { return stdext::ip_to_string(v); });
g_lua.bindGlobalFunction("stringtoip", [](const std::string& v) { return stdext::string_to_ip(v); });
g_lua.bindGlobalFunction("listSubnetAddresses", [](uint32 a, uint8 b) { return stdext::listSubnetAddresses(a, b); });
g_lua.bindGlobalFunction("ucwords", [](std::string s) { return stdext::ucwords(s); });


// Platform
g_lua.registerSingletonClass("g_platform");
g_lua.bindSingletonFunction("g_platform", "spawnProcess", &Platform::spawnProcess, &g_platform);
g_lua.bindSingletonFunction("g_platform", "getProcessId", &Platform::getProcessId, &g_platform);
g_lua.bindSingletonFunction("g_platform", "isProcessRunning", &Platform::isProcessRunning, &g_platform);
g_lua.bindSingletonFunction("g_platform", "copyFile", &Platform::copyFile, &g_platform);
g_lua.bindSingletonFunction("g_platform", "fileExists", &Platform::fileExists, &g_platform);
g_lua.bindSingletonFunction("g_platform", "removeFile", &Platform::removeFile, &g_platform);
g_lua.bindSingletonFunction("g_platform", "killProcess", &Platform::killProcess, &g_platform);
g_lua.bindSingletonFunction("g_platform", "getTempPath", &Platform::getTempPath, &g_platform);
g_lua.bindSingletonFunction("g_platform", "openUrl", &Platform::openUrl, &g_platform);
g_lua.bindSingletonFunction("g_platform", "getCPUName", &Platform::getCPUName, &g_platform);
g_lua.bindSingletonFunction("g_platform", "getTotalSystemMemory", &Platform::getTotalSystemMemory, &g_platform);
g_lua.bindSingletonFunction("g_platform", "getOSName", &Platform::getOSName, &g_platform);
g_lua.bindSingletonFunction("g_platform", "getFileModificationTime", &Platform::getFileModificationTime, &g_platform);


// Application
g_lua.registerSingletonClass("g_app");
g_lua.bindSingletonFunction("g_app", "setName", &Application::setName, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "setCompactName", &Application::setCompactName, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "setVersion", &Application::setVersion, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "isRunning", &Application::isRunning, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "isStopping", &Application::isStopping, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getName", &Application::getName, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getCompactName", &Application::getCompactName, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getVersion", &Application::getVersion, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getBuildCompiler", &Application::getBuildCompiler, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getBuildDate", &Application::getBuildDate, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getBuildRevision", &Application::getBuildRevision, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getBuildCommit", &Application::getBuildCommit, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getBuildType", &Application::getBuildType, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getBuildArch", &Application::getBuildArch, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getOs", &Application::getOs, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "getStartupOptions", &Application::getStartupOptions, static_cast<Application*>(&g_app));
g_lua.bindSingletonFunction("g_app", "exit", &Application::exit, static_cast<Application*>(&g_app));


// Crypt
g_lua.registerSingletonClass("g_crypt");
g_lua.bindSingletonFunction("g_crypt", "genUUID", &Crypt::genUUID, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "setMachineUUID", &Crypt::setMachineUUID, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "getMachineUUID", &Crypt::getMachineUUID, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "encrypt", &Crypt::encrypt, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "decrypt", &Crypt::decrypt, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "sha1Encode", &Crypt::sha1Encode, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "md5Encode", &Crypt::md5Encode, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "rsaGenerateKey", &Crypt::rsaGenerateKey, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "rsaSetPublicKey", &Crypt::rsaSetPublicKey, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "rsaSetPrivateKey", &Crypt::rsaSetPrivateKey, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "rsaCheckKey", &Crypt::rsaCheckKey, &g_crypt);
g_lua.bindSingletonFunction("g_crypt", "rsaGetSize", &Crypt::rsaGetSize, &g_crypt);


// Clock
g_lua.registerSingletonClass("g_clock");
g_lua.bindSingletonFunction("g_clock", "micros", &Clock::micros, &g_clock);
g_lua.bindSingletonFunction("g_clock", "millis", &Clock::millis, &g_clock);
g_lua.bindSingletonFunction("g_clock", "seconds", &Clock::seconds, &g_clock);


// ConfigManager
g_lua.registerSingletonClass("g_configs");
g_lua.bindSingletonFunction("g_configs", "load", &ConfigManager::load, &g_configs);
g_lua.bindSingletonFunction("g_configs", "save", &ConfigManager::save, &g_configs);
g_lua.bindSingletonFunction("g_configs", "set", &ConfigManager::set, &g_configs);
g_lua.bindSingletonFunction("g_configs", "setList", &ConfigManager::setList, &g_configs);
g_lua.bindSingletonFunction("g_configs", "get", &ConfigManager::get, &g_configs);
g_lua.bindSingletonFunction("g_configs", "getList", &ConfigManager::getList, &g_configs);
g_lua.bindSingletonFunction("g_configs", "exists", &ConfigManager::exists, &g_configs);
g_lua.bindSingletonFunction("g_configs", "remove", &ConfigManager::remove, &g_configs);
g_lua.bindSingletonFunction("g_configs", "setNode", &ConfigManager::setNode, &g_configs);
g_lua.bindSingletonFunction("g_configs", "mergeNode", &ConfigManager::mergeNode, &g_configs);
g_lua.bindSingletonFunction("g_configs", "getNode", &ConfigManager::getNode, &g_configs);


// Logger
g_lua.registerSingletonClass("g_logger");
g_lua.bindSingletonFunction("g_logger", "log", &Logger::log, &g_logger);
g_lua.bindSingletonFunction("g_logger", "fireOldMessages", &Logger::fireOldMessages, &g_logger);
g_lua.bindSingletonFunction("g_logger", "setLogFile", &Logger::setLogFile, &g_logger);
g_lua.bindSingletonFunction("g_logger", "setOnLog", &Logger::setOnLog, &g_logger);
g_lua.bindSingletonFunction("g_logger", "debug", &Logger::debug, &g_logger);
g_lua.bindSingletonFunction("g_logger", "info", &Logger::info, &g_logger);
g_lua.bindSingletonFunction("g_logger", "warning", &Logger::warning, &g_logger);
g_lua.bindSingletonFunction("g_logger", "error", &Logger::error, &g_logger);
g_lua.bindSingletonFunction("g_logger", "fatal", &Logger::fatal, &g_logger);


// ModuleManager
g_lua.registerSingletonClass("g_modules");
g_lua.bindSingletonFunction("g_modules", "discoverModules", &ModuleManager::discoverModules, &g_modules);
g_lua.bindSingletonFunction("g_modules", "autoLoadModules", &ModuleManager::autoLoadModules, &g_modules);
g_lua.bindSingletonFunction("g_modules", "discoverModule", &ModuleManager::discoverModule, &g_modules);
g_lua.bindSingletonFunction("g_modules", "ensureModuleLoaded", &ModuleManager::ensureModuleLoaded, &g_modules);
g_lua.bindSingletonFunction("g_modules", "unloadModules", &ModuleManager::unloadModules, &g_modules);
g_lua.bindSingletonFunction("g_modules", "reloadModules", &ModuleManager::reloadModules, &g_modules);
g_lua.bindSingletonFunction("g_modules", "getModule", &ModuleManager::getModule, &g_modules);
g_lua.bindSingletonFunction("g_modules", "getModules", &ModuleManager::getModules, &g_modules);


// EventDispatcher
g_lua.registerSingletonClass("g_dispatcher");
g_lua.bindSingletonFunction("g_dispatcher", "addEvent", &EventDispatcher::addEvent, &g_dispatcher);
g_lua.bindSingletonFunction("g_dispatcher", "scheduleEvent", &EventDispatcher::scheduleEvent, &g_dispatcher);
g_lua.bindSingletonFunction("g_dispatcher", "cycleEvent", &EventDispatcher::cycleEvent, &g_dispatcher);


// ResourceManager
g_lua.registerSingletonClass("g_resources");
g_lua.bindSingletonFunction("g_resources", "addSearchPath", &ResourceManager::addSearchPath, &g_resources);
g_lua.bindSingletonFunction("g_resources", "setupUserWriteDir", &ResourceManager::setupUserWriteDir, &g_resources);
g_lua.bindSingletonFunction("g_resources", "setWriteDir", &ResourceManager::setWriteDir, &g_resources);
g_lua.bindSingletonFunction("g_resources", "searchAndAddPackages", &ResourceManager::searchAndAddPackages, &g_resources);
g_lua.bindSingletonFunction("g_resources", "removeSearchPath", &ResourceManager::removeSearchPath, &g_resources);
g_lua.bindSingletonFunction("g_resources", "fileExists", &ResourceManager::fileExists, &g_resources);
g_lua.bindSingletonFunction("g_resources", "directoryExists", &ResourceManager::directoryExists, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getRealDir", &ResourceManager::getRealDir, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getWorkDir", &ResourceManager::getWorkDir, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getSearchPaths", &ResourceManager::getSearchPaths, &g_resources);
g_lua.bindSingletonFunction("g_resources", "listDirectoryFiles", &ResourceManager::listDirectoryFiles, &g_resources);
g_lua.bindSingletonFunction("g_resources", "readFileContents", &ResourceManager::readFileContents, &g_resources);
g_lua.bindSingletonFunction("g_resources", "guessFilePath", &ResourceManager::guessFilePath, &g_resources);
g_lua.bindSingletonFunction("g_resources", "isFileType", &ResourceManager::isFileType, &g_resources);
g_lua.bindSingletonFunction("g_resources", "getFileTime", &ResourceManager::getFileTime, &g_resources);


// Module
g_lua.registerClass<Module>();
g_lua.bindClassMemberFunction<Module>("load", &Module::load);
g_lua.bindClassMemberFunction<Module>("unload", &Module::unload);
g_lua.bindClassMemberFunction<Module>("reload", &Module::reload);
g_lua.bindClassMemberFunction<Module>("canReload", &Module::canReload);
g_lua.bindClassMemberFunction<Module>("canUnload", &Module::canUnload);
g_lua.bindClassMemberFunction<Module>("isLoaded", &Module::isLoaded);
g_lua.bindClassMemberFunction<Module>("isReloadble ", &Module::isReloadable);
g_lua.bindClassMemberFunction<Module>("isSandboxed ", &Module::isSandboxed);
g_lua.bindClassMemberFunction<Module>("getDescript ion", &Module::getDescription);
g_lua.bindClassMemberFunction<Module>("getName", &Module::getName);
g_lua.bindClassMemberFunction<Module>("getAuthor", &Module::getAuthor);
g_lua.bindClassMemberFunction<Module>("getWebsite" , &Module::getWebsite);
g_lua.bindClassMemberFunction<Module>("getVersion" , &Module::getVersion);
g_lua.bindClassMemberFunction<Module>("getSandbox" , &Module::getSandbox);
g_lua.bindClassMemberFunction<Module>("isAutoLoad" , &Module::isAutoLoad);
g_lua.bindClassMemberFunction<Module>("getAutoLoad Priority", &Module::getAutoLoadPriority);


// Event
g_lua.registerClass<Event>();
g_lua.bindClassMemberFunction<Event>("cancel", &Event::cancel);
g_lua.bindClassMemberFunction<Event>("execute", &Event::execute);
g_lua.bindClassMemberFunction<Event>("isCanceled", &Event::isCanceled);
g_lua.bindClassMemberFunction<Event>("isExecuted", &Event::isExecuted);


// ScheduledEvent
g_lua.registerClass<ScheduledEvent, Event>();
g_lua.bindClassMemberFunction<ScheduledEvent>("nex tCycle", &ScheduledEvent::nextCycle);
g_lua.bindClassMemberFunction<ScheduledEvent>("tic ks", &ScheduledEvent::ticks);
g_lua.bindClassMemberFunction<ScheduledEvent>("rem ainingTicks", &ScheduledEvent::remainingTicks);
g_lua.bindClassMemberFunction<ScheduledEvent>("del ay", &ScheduledEvent::delay);
g_lua.bindClassMemberFunction<ScheduledEvent>("cyc lesExecuted", &ScheduledEvent::cyclesExecuted);
g_lua.bindClassMemberFunction<ScheduledEvent>("max Cycles", &ScheduledEvent::maxCycles);


#ifdef FW_GRAPHICS
// GraphicalApplication
g_lua.bindSingletonFunction("g_app", "setForegroundPaneMaxFps", &GraphicalApplication::setForegroundPaneMaxFps, &g_app);
g_lua.bindSingletonFunction("g_app", "setBackgroundPaneMaxFps", &GraphicalApplication::setBackgroundPaneMaxFps, &g_app);
g_lua.bindSingletonFunction("g_app", "isOnInputEvent", &GraphicalApplication::isOnInputEvent, &g_app);
g_lua.bindSingletonFunction("g_app", "getForegroundPaneFps", &GraphicalApplication::getForegroundPaneFps, &g_app);
g_lua.bindSingletonFunction("g_app", "getBackgroundPaneFps", &GraphicalApplication::getBackgroundPaneFps, &g_app);
g_lua.bindSingletonFunction("g_app", "getForegroundPaneMaxFps", &GraphicalApplication::getForegroundPaneMaxFps, &g_app);
g_lua.bindSingletonFunction("g_app", "getBackgroundPaneMaxFps", &GraphicalApplication::getBackgroundPaneMaxFps, &g_app);


// PlatformWindow
g_lua.registerSingletonClass("g_window");
g_lua.bindSingletonFunction("g_window", "move", &PlatformWindow::move, &g_window);
g_lua.bindSingletonFunction("g_window", "resize", &PlatformWindow::resize, &g_window);
g_lua.bindSingletonFunction("g_window", "show", &PlatformWindow::show, &g_window);
g_lua.bindSingletonFunction("g_window", "hide", &PlatformWindow::hide, &g_window);
g_lua.bindSingletonFunction("g_window", "poll", &PlatformWindow::poll, &g_window);
g_lua.bindSingletonFunction("g_window", "maximize", &PlatformWindow::maximize, &g_window);
g_lua.bindSingletonFunction("g_window", "restoreMouseCursor", &PlatformWindow::restoreMouseCursor, &g_window);
g_lua.bindSingletonFunction("g_window", "showMouse", &PlatformWindow::showMouse, &g_window);
g_lua.bindSingletonFunction("g_window", "hideMouse", &PlatformWindow::hideMouse, &g_window);
g_lua.bindSingletonFunction("g_window", "setTitle", &PlatformWindow::setTitle, &g_window);
g_lua.bindSingletonFunction("g_window", "setMouseCursor", &PlatformWindow::setMouseCursor, &g_window);
g_lua.bindSingletonFunction("g_window", "setMinimumSize", &PlatformWindow::setMinimumSize, &g_window);
g_lua.bindSingletonFunction("g_window", "setFullscreen", &PlatformWindow::setFullscreen, &g_window);
g_lua.bindSingletonFunction("g_window", "setVerticalSync", &PlatformWindow::setVerticalSync, &g_window);
g_lua.bindSingletonFunction("g_window", "setIcon", &PlatformWindow::setIcon, &g_window);
g_lua.bindSingletonFunction("g_window", "setClipboardText", &PlatformWindow::setClipboardText, &g_window);
g_lua.bindSingletonFunction("g_window", "getDisplaySize", &PlatformWindow::getDisplaySize, &g_window);
g_lua.bindSingletonFunction("g_window", "getClipboardText", &PlatformWindow::getClipboardText, &g_window);
g_lua.bindSingletonFunction("g_window", "getPlatformType", &PlatformWindow::getPlatformType, &g_window);
g_lua.bindSingletonFunction("g_window", "getDisplayWidth", &PlatformWindow::getDisplayWidth, &g_window);
g_lua.bindSingletonFunction("g_window", "getDisplayHeight", &PlatformWindow::getDisplayHeight, &g_window);
g_lua.bindSingletonFunction("g_window", "getUnmaximizedSize", &PlatformWindow::getUnmaximizedSize, &g_window);
g_lua.bindSingletonFunction("g_window", "getSize", &PlatformWindow::getSize, &g_window);
g_lua.bindSingletonFunction("g_window", "getWidth", &PlatformWindow::getWidth, &g_window);
g_lua.bindSingletonFunction("g_window", "getHeight", &PlatformWindow::getHeight, &g_window);
g_lua.bindSingletonFunction("g_window", "getUnmaximizedPos", &PlatformWindow::getUnmaximizedPos, &g_window);
g_lua.bindSingletonFunction("g_window", "getPosition", &PlatformWindow::getPosition, &g_window);
g_lua.bindSingletonFunction("g_window", "getX", &PlatformWindow::getX, &g_window);
g_lua.bindSingletonFunction("g_window", "getY", &PlatformWindow::getY, &g_window);
g_lua.bindSingletonFunction("g_window", "getMousePosition", &PlatformWindow::getMousePosition, &g_window);
g_lua.bindSingletonFunction("g_window", "getKeyboardModifiers", &PlatformWindow::getKeyboardModifiers, &g_window);
g_lua.bindSingletonFunction("g_window", "isKeyPressed", &PlatformWindow::isKeyPressed, &g_window);
g_lua.bindSingletonFunction("g_window", "isMouseButtonPressed", &PlatformWindow::isMouseButtonPressed, &g_window);
g_lua.bindSingletonFunction("g_window", "isVisible", &PlatformWindow::isVisible, &g_window);
g_lua.bindSingletonFunction("g_window", "isFullscreen", &PlatformWindow::isFullscreen, &g_window);
g_lua.bindSingletonFunction("g_window", "isMaximized", &PlatformWindow::isMaximized, &g_window);
g_lua.bindSingletonFunction("g_window", "hasFocus", &PlatformWindow::hasFocus, &g_window);


// Input
g_lua.registerSingletonClass("g_mouse");
g_lua.bindSingletonFunction("g_mouse", "loadCursors", &Mouse::loadCursors, &g_mouse);
g_lua.bindSingletonFunction("g_mouse", "addCursor", &Mouse::addCursor, &g_mouse);
g_lua.bindSingletonFunction("g_mouse", "pushCursor", &Mouse::pushCursor, &g_mouse);
g_lua.bindSingletonFunction("g_mouse", "popCursor", &Mouse::popCursor, &g_mouse);
g_lua.bindSingletonFunction("g_mouse", "isCursorChanged", &Mouse::isCursorChanged, &g_mouse);
g_lua.bindSingletonFunction("g_mouse", "isPressed", &Mouse::isPressed, &g_mouse);


// Graphics
g_lua.registerSingletonClass("g_graphics");
g_lua.bindSingletonFunction("g_graphics", "isPainterEngineAvailable", &Graphics::isPainterEngineAvailable, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "selectPainterEngine", &Graphics::selectPainterEngine, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "canCacheBackbuffer", &Graphics::canCacheBackbuffer, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "canUseShaders", &Graphics::canUseShaders, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "shouldUseShaders", &Graphics::shouldUseShaders, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "setShouldUseShaders", &Graphics::setShouldUseShaders, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "getPainterEngine", &Graphics::getPainterEngine, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "getViewportSize", &Graphics::getViewportSize, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "getVendor", &Graphics::getVendor, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "getRenderer", &Graphics::getRenderer, &g_graphics);
g_lua.bindSingletonFunction("g_graphics", "getVersion", &Graphics::getVersion, &g_graphics);


// Textures
g_lua.registerSingletonClass("g_textures");
g_lua.bindSingletonFunction("g_textures", "preload", &TextureManager::preload, &g_textures);
g_lua.bindSingletonFunction("g_textures", "clearCache", &TextureManager::clearCache, &g_textures);
g_lua.bindSingletonFunction("g_textures", "liveReload", &TextureManager::liveReload, &g_textures);


// UI
g_lua.registerSingletonClass("g_ui");
g_lua.bindSingletonFunction("g_ui", "clearStyles", &UIManager::clearStyles, &g_ui);
g_lua.bindSingletonFunction("g_ui", "importStyle", &UIManager::importStyle, &g_ui);
g_lua.bindSingletonFunction("g_ui", "getStyle", &UIManager::getStyle, &g_ui);
g_lua.bindSingletonFunction("g_ui", "getStyleClass", &UIManager::getStyleClass, &g_ui);
g_lua.bindSingletonFunction("g_ui", "loadUI", &UIManager::loadUI, &g_ui);
g_lua.bindSingletonFunction("g_ui", "displayUI", &UIManager::displayUI, &g_ui);
g_lua.bindSingletonFunction("g_ui", "createWidget", &UIManager::createWidget, &g_ui);
g_lua.bindSingletonFunction("g_ui", "createWidgetFromOTML", &UIManager::createWidgetFromOTML, &g_ui);
g_lua.bindSingletonFunction("g_ui", "getRootWidget", &UIManager::getRootWidget, &g_ui);
g_lua.bindSingletonFunction("g_ui", "getDraggingWidget", &UIManager::getDraggingWidget, &g_ui);
g_lua.bindSingletonFunction("g_ui", "getPressedWidget", &UIManager::getPressedWidget, &g_ui);
g_lua.bindSingletonFunction("g_ui", "setDebugBoxesDrawing", &UIManager::setDebugBoxesDrawing, &g_ui);
g_lua.bindSingletonFunction("g_ui", "isDrawingDebugBoxes", &UIManager::isDrawingDebugBoxes, &g_ui);
g_lua.bindSingletonFunction("g_ui", "isMouseGrabbed", &UIManager::isMouseGrabbed, &g_ui);
g_lua.bindSingletonFunction("g_ui", "isKeyboardGrabbed", &UIManager::isKeyboardGrabbed, &g_ui);


// FontManager
g_lua.registerSingletonClass("g_fonts");
g_lua.bindSingletonFunction("g_fonts", "clearFonts", &FontManager::clearFonts, &g_fonts);
g_lua.bindSingletonFunction("g_fonts", "importFont", &FontManager::importFont, &g_fonts);
g_lua.bindSingletonFunction("g_fonts", "fontExists", &FontManager::fontExists, &g_fonts);
g_lua.bindSingletonFunction("g_fonts", "setDefaultFont", &FontManager::setDefaultFont, &g_fonts);


// ParticleManager
g_lua.registerSingletonClass("g_particles");
g_lua.bindSingletonFunction("g_particles", "importParticle", &ParticleManager::importParticle, &g_particles);
g_lua.bindSingletonFunction("g_particles", "getEffectsTypes", &ParticleManager::getEffectsTypes, &g_particles);


// UIWidget
g_lua.registerClass<UIWidget>();
g_lua.bindClassStaticFunction<UIWidget>("create", []{ return UIWidgetPtr(new UIWidget); });
g_lua.bindClassMemberFunction<UIWidget>("addChild" , &UIWidget::addChild);
g_lua.bindClassMemberFunction<UIWidget>("insertChi ld", &UIWidget::insertChild);
g_lua.bindClassMemberFunction<UIWidget>("removeChi ld", &UIWidget::removeChild);
g_lua.bindClassMemberFunction<UIWidget>("focusChil d", &UIWidget::focusChild);
g_lua.bindClassMemberFunction<UIWidget>("focusNext Child", &UIWidget::focusNextChild);
g_lua.bindClassMemberFunction<UIWidget>("focusPrev iousChild", &UIWidget::focusPreviousChild);
g_lua.bindClassMemberFunction<UIWidget>("lowerChil d", &UIWidget::lowerChild);
g_lua.bindClassMemberFunction<UIWidget>("raiseChil d", &UIWidget::raiseChild);
g_lua.bindClassMemberFunction<UIWidget>("moveChild ToIndex", &UIWidget::moveChildToIndex);
g_lua.bindClassMemberFunction<UIWidget>("lockChild ", &UIWidget::lockChild);
g_lua.bindClassMemberFunction<UIWidget>("unlockChi ld", &UIWidget::unlockChild);
g_lua.bindClassMemberFunction<UIWidget>("mergeStyl e", &UIWidget::mergeStyle);
g_lua.bindClassMemberFunction<UIWidget>("applyStyl e", &UIWidget::applyStyle);
g_lua.bindClassMemberFunction<UIWidget>("addAnchor ", &UIWidget::addAnchor);
g_lua.bindClassMemberFunction<UIWidget>("removeAnc hor", &UIWidget::removeAnchor);
g_lua.bindClassMemberFunction<UIWidget>("fill", &UIWidget::fill);
g_lua.bindClassMemberFunction<UIWidget>("centerIn" , &UIWidget::centerIn);
g_lua.bindClassMemberFunction<UIWidget>("breakAnch ors", &UIWidget::breakAnchors);
g_lua.bindClassMemberFunction<UIWidget>("updatePar entLayout", &UIWidget::updateParentLayout);
g_lua.bindClassMemberFunction<UIWidget>("updateLay out", &UIWidget::updateLayout);
g_lua.bindClassMemberFunction<UIWidget>("lock", &UIWidget::lock);
g_lua.bindClassMemberFunction<UIWidget>("unlock", &UIWidget::unlock);
g_lua.bindClassMemberFunction<UIWidget>("focus", &UIWidget::focus);
g_lua.bindClassMemberFunction<UIWidget>("lower", &UIWidget::lower);
g_lua.bindClassMemberFunction<UIWidget>("raise", &UIWidget::raise);
g_lua.bindClassMemberFunction<UIWidget>("grabMouse ", &UIWidget::grabMouse);
g_lua.bindClassMemberFunction<UIWidget>("ungrabMou se", &UIWidget::ungrabMouse);
g_lua.bindClassMemberFunction<UIWidget>("grabKeybo ard", &UIWidget::grabKeyboard);
g_lua.bindClassMemberFunction<UIWidget>("ungrabKey board", &UIWidget::ungrabKeyboard);
g_lua.bindClassMemberFunction<UIWidget>("bindRectT oParent", &UIWidget::bindRectToParent);
g_lua.bindClassMemberFunction<UIWidget>("destroy", &UIWidget::destroy);
g_lua.bindClassMemberFunction<UIWidget>("destroyCh ildren", &UIWidget::destroyChildren);
g_lua.bindClassMemberFunction<UIWidget>("setId", &UIWidget::setId);
g_lua.bindClassMemberFunction<UIWidget>("setParent ", &UIWidget::setParent);
g_lua.bindClassMemberFunction<UIWidget>("setLayout ", &UIWidget::setLayout);
g_lua.bindClassMemberFunction<UIWidget>("setRect", &UIWidget::setRect);
g_lua.bindClassMemberFunction<UIWidget>("setStyle" , &UIWidget::setStyle);
g_lua.bindClassMemberFunction<UIWidget>("setStyleF romNode", &UIWidget::setStyleFromNode);
g_lua.bindClassMemberFunction<UIWidget>("setEnable d", &UIWidget::setEnabled);
g_lua.bindClassMemberFunction<UIWidget>("setVisibl e", &UIWidget::setVisible);
g_lua.bindClassMemberFunction<UIWidget>("setOn", &UIWidget::setOn);
g_lua.bindClassMemberFunction<UIWidget>("setChecke d", &UIWidget::setChecked);
g_lua.bindClassMemberFunction<UIWidget>("setFocusa ble", &UIWidget::setFocusable);
g_lua.bindClassMemberFunction<UIWidget>("setPhanto m", &UIWidget::setPhantom);
g_lua.bindClassMemberFunction<UIWidget>("setDragga ble", &UIWidget::setDraggable);
g_lua.bindClassMemberFunction<UIWidget>("setFixedS ize", &UIWidget::setFixedSize);
g_lua.bindClassMemberFunction<UIWidget>("setClippi ng", &UIWidget::setClipping);
g_lua.bindClassMemberFunction<UIWidget>("setLastFo cusReason", &UIWidget::setLastFocusReason);
g_lua.bindClassMemberFunction<UIWidget>("setAutoFo cusPolicy", &UIWidget::setAutoFocusPolicy);
g_lua.bindClassMemberFunction<UIWidget>("setAutoRe peatDelay", &UIWidget::setAutoRepeatDelay);
g_lua.bindClassMemberFunction<UIWidget>("setVirtua lOffset", &UIWidget::setVirtualOffset);
g_lua.bindClassMemberFunction<UIWidget>("isVisible ", &UIWidget::isVisible);
g_lua.bindClassMemberFunction<UIWidget>("isChildLo cked", &UIWidget::isChildLocked);
g_lua.bindClassMemberFunction<UIWidget>("hasChild" , &UIWidget::hasChild);
g_lua.bindClassMemberFunction<UIWidget>("getChildI ndex", &UIWidget::getChildIndex);
g_lua.bindClassMemberFunction<UIWidget>("getMargin Rect", &UIWidget::getMarginRect);
g_lua.bindClassMemberFunction<UIWidget>("getPaddin gRect", &UIWidget::getPaddingRect);
g_lua.bindClassMemberFunction<UIWidget>("getChildr enRect", &UIWidget::getChildrenRect);
g_lua.bindClassMemberFunction<UIWidget>("getAnchor edLayout", &UIWidget::getAnchoredLayout);
g_lua.bindClassMemberFunction<UIWidget>("getRootPa rent", &UIWidget::getRootParent);
g_lua.bindClassMemberFunction<UIWidget>("getChildA fter", &UIWidget::getChildAfter);
g_lua.bindClassMemberFunction<UIWidget>("getChildB efore", &UIWidget::getChildBefore);
g_lua.bindClassMemberFunction<UIWidget>("getChildB yId", &UIWidget::getChildById);
g_lua.bindClassMemberFunction<UIWidget>("getChildB yPos", &UIWidget::getChildByPos);
g_lua.bindClassMemberFunction<UIWidget>("getChildB yIndex", &UIWidget::getChildByIndex);
g_lua.bindClassMemberFunction<UIWidget>("recursive GetChildById", &UIWidget::recursiveGetChildById);
g_lua.bindClassMemberFunction<UIWidget>("recursive GetChildByPos", &UIWidget::recursiveGetChildByPos);
g_lua.bindClassMemberFunction<UIWidget>("recursive GetChildren", &UIWidget::recursiveGetChildren);
g_lua.bindClassMemberFunction<UIWidget>("recursive GetChildrenByPos", &UIWidget::recursiveGetChildrenByPos);
g_lua.bindClassMemberFunction<UIWidget>("recursive GetChildrenByMarginPos", &UIWidget::recursiveGetChildrenByMarginPos);
g_lua.bindClassMemberFunction<UIWidget>("backwards GetWidgetById", &UIWidget::backwardsGetWidgetById);
g_lua.bindClassMemberFunction<UIWidget>("resize", &UIWidget::resize);
g_lua.bindClassMemberFunction<UIWidget>("move", &UIWidget::move);
g_lua.bindClassMemberFunction<UIWidget>("rotate", &UIWidget::rotate);
g_lua.bindClassMemberFunction<UIWidget>("hide", &UIWidget::hide);
g_lua.bindClassMemberFunction<UIWidget>("show", &UIWidget::show);
g_lua.bindClassMemberFunction<UIWidget>("disable", &UIWidget::disable);
g_lua.bindClassMemberFunction<UIWidget>("enable", &UIWidget::enable);
g_lua.bindClassMemberFunction<UIWidget>("isActive" , &UIWidget::isActive);
g_lua.bindClassMemberFunction<UIWidget>("isEnabled ", &UIWidget::isEnabled);
g_lua.bindClassMemberFunction<UIWidget>("isDisable d", &UIWidget::isDisabled);
g_lua.bindClassMemberFunction<UIWidget>("isFocused ", &UIWidget::isFocused);
g_lua.bindClassMemberFunction<UIWidget>("isHovered ", &UIWidget::isHovered);
g_lua.bindClassMemberFunction<UIWidget>("isPressed ", &UIWidget::isPressed);
g_lua.bindClassMemberFunction<UIWidget>("isFirst", &UIWidget::isFirst);
g_lua.bindClassMemberFunction<UIWidget>("isMiddle" , &UIWidget::isMiddle);
g_lua.bindClassMemberFunction<UIWidget>("isLast", &UIWidget::isLast);
g_lua.bindClassMemberFunction<UIWidget>("isAlterna te", &UIWidget::isAlternate);
g_lua.bindClassMemberFunction<UIWidget>("isChecked ", &UIWidget::isChecked);
g_lua.bindClassMemberFunction<UIWidget>("isOn", &UIWidget::isOn);
g_lua.bindClassMemberFunction<UIWidget>("isDraggin g", &UIWidget::isDragging);
g_lua.bindClassMemberFunction<UIWidget>("isHidden" , &UIWidget::isHidden);
g_lua.bindClassMemberFunction<UIWidget>("isExplici tlyEnabled", &UIWidget::isExplicitlyEnabled);
g_lua.bindClassMemberFunction<UIWidget>("isExplici tlyVisible", &UIWidget::isExplicitlyVisible);
g_lua.bindClassMemberFunction<UIWidget>("isFocusab le", &UIWidget::isFocusable);
g_lua.bindClassMemberFunction<UIWidget>("isPhantom ", &UIWidget::isPhantom);
g_lua.bindClassMemberFunction<UIWidget>("isDraggab le", &UIWidget::isDraggable);
g_lua.bindClassMemberFunction<UIWidget>("isFixedSi ze", &UIWidget::isFixedSize);
g_lua.bindClassMemberFunction<UIWidget>("isClippin g", &UIWidget::isClipping);
g_lua.bindClassMemberFunction<UIWidget>("isDestroy ed", &UIWidget::isDestroyed);
g_lua.bindClassMemberFunction<UIWidget>("hasChildr en", &UIWidget::hasChildren);
g_lua.bindClassMemberFunction<UIWidget>("containsM arginPoint", &UIWidget::containsMarginPoint);
g_lua.bindClassMemberFunction<UIWidget>("containsP addingPoint", &UIWidget::containsPaddingPoint);
g_lua.bindClassMemberFunction<UIWidget>("containsP oint", &UIWidget::containsPoint);
g_lua.bindClassMemberFunction<UIWidget>("getId", &UIWidget::getId);
g_lua.bindClassMemberFunction<UIWidget>("getParent ", &UIWidget::getParent);
g_lua.bindClassMemberFunction<UIWidget>("getFocuse dChild", &UIWidget::getFocusedChild);
g_lua.bindClassMemberFunction<UIWidget>("getChildr en", &UIWidget::getChildren);
g_lua.bindClassMemberFunction<UIWidget>("getFirstC hild", &UIWidget::getFirstChild);
g_lua.bindClassMemberFunction<UIWidget>("getLastCh ild", &UIWidget::getLastChild);
g_lua.bindClassMemberFunction<UIWidget>("getLayout ", &UIWidget::getLayout);
g_lua.bindClassMemberFunction<UIWidget>("getStyle" , &UIWidget::getStyle);
g_lua.bindClassMemberFunction<UIWidget>("getChildC ount", &UIWidget::getChildCount);
g_lua.bindClassMemberFunction<UIWidget>("getLastFo cusReason", &UIWidget::getLastFocusReason);
g_lua.bindClassMemberFunction<UIWidget>("getAutoFo cusPolicy", &UIWidget::getAutoFocusPolicy);
g_lua.bindClassMemberFunction<UIWidget>("getAutoRe peatDelay", &UIWidget::getAutoRepeatDelay);
g_lua.bindClassMemberFunction<UIWidget>("getVirtua lOffset", &UIWidget::getVirtualOffset);
g_lua.bindClassMemberFunction<UIWidget>("getStyleN ame", &UIWidget::getStyleName);
g_lua.bindClassMemberFunction<UIWidget>("getLastCl ickPosition", &UIWidget::getLastClickPosition);
g_lua.bindClassMemberFunction<UIWidget>("setX", &UIWidget::setX);
g_lua.bindClassMemberFunction<UIWidget>("setY", &UIWidget::setY);
g_lua.bindClassMemberFunction<UIWidget>("setWidth" , &UIWidget::setWidth);
g_lua.bindClassMemberFunction<UIWidget>("setHeight ", &UIWidget::setHeight);
g_lua.bindClassMemberFunction<UIWidget>("setSize", &UIWidget::setSize);
g_lua.bindClassMemberFunction<UIWidget>("setPositi on", &UIWidget::setPosition);
g_lua.bindClassMemberFunction<UIWidget>("setColor" , &UIWidget::setColor);
g_lua.bindClassMemberFunction<UIWidget>("setBackgr oundColor", &UIWidget::setBackgroundColor);
g_lua.bindClassMemberFunction<UIWidget>("setBackgr oundOffsetX", &UIWidget::setBackgroundOffsetX);
g_lua.bindClassMemberFunction<UIWidget>("setBackgr oundOffsetY", &UIWidget::setBackgroundOffsetY);
g_lua.bindClassMemberFunction<UIWidget>("setBackgr oundOffset", &UIWidget::setBackgroundOffset);
g_lua.bindClassMemberFunction<UIWidget>("setBackgr oundWidth", &UIWidget::setBackgroundWidth);
g_lua.bindClassMemberFunction<UIWidget>("setBackgr oundHeight", &UIWidget::setBackgroundHeight);
g_lua.bindClassMemberFunction<UIWidget>("setBackgr oundSize", &UIWidget::setBackgroundSize);
g_lua.bindClassMemberFunction<UIWidget>("setBackgr oundRect", &UIWidget::setBackgroundRect);
g_lua.bindClassMemberFunction<UIWidget>("setIcon", &UIWidget::setIcon);
g_lua.bindClassMemberFunction<UIWidget>("setIconCo lor", &UIWidget::setIconColor);
g_lua.bindClassMemberFunction<UIWidget>("setIconOf fsetX", &UIWidget::setIconOffsetX);
g_lua.bindClassMemberFunction<UIWidget>("setIconOf fsetY", &UIWidget::setIconOffsetY);
g_lua.bindClassMemberFunction<UIWidget>("setIconOf fset", &UIWidget::setIconOffset);
g_lua.bindClassMemberFunction<UIWidget>("setIconWi dth", &UIWidget::setIconWidth);
g_lua.bindClassMemberFunction<UIWidget>("setIconHe ight", &UIWidget::setIconHeight);
g_lua.bindClassMemberFunction<UIWidget>("setIconSi ze", &UIWidget::setIconSize);
g_lua.bindClassMemberFunction<UIWidget>("setIconRe ct", &UIWidget::setIconRect);
g_lua.bindClassMemberFunction<UIWidget>("setIconCl ip", &UIWidget::setIconClip);
g_lua.bindClassMemberFunction<UIWidget>("setIconAl ign", &UIWidget::setIconAlign);
g_lua.bindClassMemberFunction<UIWidget>("setBorder Width", &UIWidget::setBorderWidth);
g_lua.bindClassMemberFunction<UIWidget>("setBorder WidthTop", &UIWidget::setBorderWidthTop);
g_lua.bindClassMemberFunction<UIWidget>("setBorder WidthRight", &UIWidget::setBorderWidthRight);
g_lua.bindClassMemberFunction<UIWidget>("setBorder WidthBottom", &UIWidget::setBorderWidthBottom);
g_lua.bindClassMemberFunction<UIWidget>("setBorder WidthLeft", &UIWidget::setBorderWidthLeft);
g_lua.bindClassMemberFunction<UIWidget>("setBorder Color", &UIWidget::setBorderColor);
g_lua.bindClassMemberFunction<UIWidget>("setBorder ColorTop", &UIWidget::setBorderColorTop);
g_lua.bindClassMemberFunction<UIWidget>("setBorder ColorRight", &UIWidget::setBorderColorRight);
g_lua.bindClassMemberFunction<UIWidget>("setBorder ColorBottom", &UIWidget::setBorderColorBottom);
g_lua.bindClassMemberFunction<UIWidget>("setBorder ColorLeft", &UIWidget::setBorderColorLeft);
g_lua.bindClassMemberFunction<UIWidget>("setMargin ", &UIWidget::setMargin);
g_lua.bindClassMemberFunction<UIWidget>("setMargin Horizontal", &UIWidget::setMarginHorizontal);
g_lua.bindClassMemberFunction<UIWidget>("setMargin Vertical", &UIWidget::setMarginVertical);
g_lua.bindClassMemberFunction<UIWidget>("setMargin Top", &UIWidget::setMarginTop);
g_lua.bindClassMemberFunction<UIWidget>("setMargin Right", &UIWidget::setMarginRight);
g_lua.bindClassMemberFunction<UIWidget>("setMargin Bottom", &UIWidget::setMarginBottom);
g_lua.bindClassMemberFunction<UIWidget>("setMargin Left", &UIWidget::setMarginLeft);
g_lua.bindClassMemberFunction<UIWidget>("setPaddin g", &UIWidget::setPadding);
g_lua.bindClassMemberFunction<UIWidget>("setPaddin gHorizontal", &UIWidget::setPaddingHorizontal);
g_lua.bindClassMemberFunction<UIWidget>("setPaddin gVertical", &UIWidget::setPaddingVertical);
g_lua.bindClassMemberFunction<UIWidget>("setPaddin gTop", &UIWidget::setPaddingTop);
g_lua.bindClassMemberFunction<UIWidget>("setPaddin gRight", &UIWidget::setPaddingRight);
g_lua.bindClassMemberFunction<UIWidget>("setPaddin gBottom", &UIWidget::setPaddingBottom);
g_lua.bindClassMemberFunction<UIWidget>("setPaddin gLeft", &UIWidget::setPaddingLeft);
g_lua.bindClassMemberFunction<UIWidget>("setOpacit y", &UIWidget::setOpacity);
g_lua.bindClassMemberFunction<UIWidget>("setRotati on", &UIWidget::setRotation);
g_lua.bindClassMemberFunction<UIWidget>("getX", &UIWidget::getX);
g_lua.bindClassMemberFunction<UIWidget>("getY", &UIWidget::getY);
g_lua.bindClassMemberFunction<UIWidget>("getPositi on", &UIWidget::getPosition);
g_lua.bindClassMemberFunction<UIWidget>("getWidth" , &UIWidget::getWidth);
g_lua.bindClassMemberFunction<UIWidget>("getHeight ", &UIWidget::getHeight);
g_lua.bindClassMemberFunction<UIWidget>("getSize", &UIWidget::getSize);
g_lua.bindClassMemberFunction<UIWidget>("getRect", &UIWidget::getRect);
g_lua.bindClassMemberFunction<UIWidget>("getColor" , &UIWidget::getColor);
g_lua.bindClassMemberFunction<UIWidget>("getBackgr oundColor", &UIWidget::getBackgroundColor);
g_lua.bindClassMemberFunction<UIWidget>("getBackgr oundOffsetX", &UIWidget::getBackgroundOffsetX);
g_lua.bindClassMemberFunction<UIWidget>("getBackgr oundOffsetY", &UIWidget::getBackgroundOffsetY);
g_lua.bindClassMemberFunction<UIWidget>("getBackgr oundOffset", &UIWidget::getBackgroundOffset);
g_lua.bindClassMemberFunction<UIWidget>("getBackgr oundWidth", &UIWidget::getBackgroundWidth);
g_lua.bindClassMemberFunction<UIWidget>("getBackgr oundHeight", &UIWidget::getBackgroundHeight);
g_lua.bindClassMemberFunction<UIWidget>("getBackgr oundSize", &UIWidget::getBackgroundSize);
g_lua.bindClassMemberFunction<UIWidget>("getBackgr oundRect", &UIWidget::getBackgroundRect);
g_lua.bindClassMemberFunction<UIWidget>("getIconCo lor", &UIWidget::getIconColor);
g_lua.bindClassMemberFunction<UIWidget>("getIconOf fsetX", &UIWidget::getIconOffsetX);
g_lua.bindClassMemberFunction<UIWidget>("getIconOf fsetY", &UIWidget::getIconOffsetY);
g_lua.bindClassMemberFunction<UIWidget>("getIconOf fset", &UIWidget::getIconOffset);
g_lua.bindClassMemberFunction<UIWidget>("getIconWi dth", &UIWidget::getIconWidth);
g_lua.bindClassMemberFunction<UIWidget>("getIconHe ight", &UIWidget::getIconHeight);
g_lua.bindClassMemberFunction<UIWidget>("getIconSi ze", &UIWidget::getIconSize);
g_lua.bindClassMemberFunction<UIWidget>("getIconRe ct", &UIWidget::getIconRect);
g_lua.bindClassMemberFunction<UIWidget>("getIconCl ip", &UIWidget::getIconClip);
g_lua.bindClassMemberFunction<UIWidget>("getIconAl ign", &UIWidget::getIconAlign);
g_lua.bindClassMemberFunction<UIWidget>("getBorder TopColor", &UIWidget::getBorderTopColor);
g_lua.bindClassMemberFunction<UIWidget>("getBorder RightColor", &UIWidget::getBorderRightColor);
g_lua.bindClassMemberFunction<UIWidget>("getBorder BottomColor", &UIWidget::getBorderBottomColor);
g_lua.bindClassMemberFunction<UIWidget>("getBorder LeftColor", &UIWidget::getBorderLeftColor);
g_lua.bindClassMemberFunction<UIWidget>("getBorder TopWidth", &UIWidget::getBorderTopWidth);
g_lua.bindClassMemberFunction<UIWidget>("getBorder RightWidth", &UIWidget::getBorderRightWidth);
g_lua.bindClassMemberFunction<UIWidget>("getBorder BottomWidth", &UIWidget::getBorderBottomWidth);
g_lua.bindClassMemberFunction<UIWidget>("getBorder LeftWidth", &UIWidget::getBorderLeftWidth);
g_lua.bindClassMemberFunction<UIWidget>("getMargin Top", &UIWidget::getMarginTop);
g_lua.bindClassMemberFunction<UIWidget>("getMargin Right", &UIWidget::getMarginRight);
g_lua.bindClassMemberFunction<UIWidget>("getMargin Bottom", &UIWidget::getMarginBottom);
g_lua.bindClassMemberFunction<UIWidget>("getMargin Left", &UIWidget::getMarginLeft);
g_lua.bindClassMemberFunction<UIWidget>("getPaddin gTop", &UIWidget::getPaddingTop);
g_lua.bindClassMemberFunction<UIWidget>("getPaddin gRight", &UIWidget::getPaddingRight);
g_lua.bindClassMemberFunction<UIWidget>("getPaddin gBottom", &UIWidget::getPaddingBottom);
g_lua.bindClassMemberFunction<UIWidget>("getPaddin gLeft", &UIWidget::getPaddingLeft);
g_lua.bindClassMemberFunction<UIWidget>("getOpacit y", &UIWidget::getOpacity);
g_lua.bindClassMemberFunction<UIWidget>("getRotati on", &UIWidget::getRotation);
g_lua.bindClassMemberFunction<UIWidget>("setImageS ource", &UIWidget::setImageSource);
g_lua.bindClassMemberFunction<UIWidget>("setImageC lip", &UIWidget::setImageClip);
g_lua.bindClassMemberFunction<UIWidget>("setImageO ffsetX", &UIWidget::setImageOffsetX);
g_lua.bindClassMemberFunction<UIWidget>("setImageO ffsetY", &UIWidget::setImageOffsetY);
g_lua.bindClassMemberFunction<UIWidget>("setImageO ffset", &UIWidget::setImageOffset);
g_lua.bindClassMemberFunction<UIWidget>("setImageW idth", &UIWidget::setImageWidth);
g_lua.bindClassMemberFunction<UIWidget>("setImageH eight", &UIWidget::setImageHeight);
g_lua.bindClassMemberFunction<UIWidget>("setImageS ize", &UIWidget::setImageSize);
g_lua.bindClassMemberFunction<UIWidget>("setImageR ect", &UIWidget::setImageRect);
g_lua.bindClassMemberFunction<UIWidget>("setImageC olor", &UIWidget::setImageColor);
g_lua.bindClassMemberFunction<UIWidget>("setImageF ixedRatio", &UIWidget::setImageFixedRatio);
g_lua.bindClassMemberFunction<UIWidget>("setImageR epeated", &UIWidget::setImageRepeated);
g_lua.bindClassMemberFunction<UIWidget>("setImageS mooth", &UIWidget::setImageSmooth);
g_lua.bindClassMemberFunction<UIWidget>("setImageB orderTop", &UIWidget::setImageBorderTop);
g_lua.bindClassMemberFunction<UIWidget>("setImageB orderRight", &UIWidget::setImageBorderRight);
g_lua.bindClassMemberFunction<UIWidget>("setImageB orderBottom", &UIWidget::setImageBorderBottom);
g_lua.bindClassMemberFunction<UIWidget>("setImageB orderLeft", &UIWidget::setImageBorderLeft);
g_lua.bindClassMemberFunction<UIWidget>("setImageB order", &UIWidget::setImageBorder);
g_lua.bindClassMemberFunction<UIWidget>("getImageC lip", &UIWidget::getImageClip);
g_lua.bindClassMemberFunction<UIWidget>("getImageO ffsetX", &UIWidget::getImageOffsetX);
g_lua.bindClassMemberFunction<UIWidget>("getImageO ffsetY", &UIWidget::getImageOffsetY);
g_lua.bindClassMemberFunction<UIWidget>("getImageO ffset", &UIWidget::getImageOffset);
g_lua.bindClassMemberFunction<UIWidget>("getImageW idth", &UIWidget::getImageWidth);
g_lua.bindClassMemberFunction<UIWidget>("getImageH eight", &UIWidget::getImageHeight);
g_lua.bindClassMemberFunction<UIWidget>("getImageS ize", &UIWidget::getImageSize);
g_lua.bindClassMemberFunction<UIWidget>("getImageR ect", &UIWidget::getImageRect);
g_lua.bindClassMemberFunction<UIWidget>("getImageC olor", &UIWidget::getImageColor);
g_lua.bindClassMemberFunction<UIWidget>("isImageFi xedRatio", &UIWidget::isImageFixedRatio);
g_lua.bindClassMemberFunction<UIWidget>("isImageSm ooth", &UIWidget::isImageSmooth);
g_lua.bindClassMemberFunction<UIWidget>("getImageB orderTop", &UIWidget::getImageBorderTop);
g_lua.bindClassMemberFunction<UIWidget>("getImageB orderRight", &UIWidget::getImageBorderRight);
g_lua.bindClassMemberFunction<UIWidget>("getImageB orderBottom", &UIWidget::getImageBorderBottom);
g_lua.bindClassMemberFunction<UIWidget>("getImageB orderLeft", &UIWidget::getImageBorderLeft);
g_lua.bindClassMemberFunction<UIWidget>("getImageT extureWidth", &UIWidget::getImageTextureWidth);
g_lua.bindClassMemberFunction<UIWidget>("getImageT extureHeight", &UIWidget::getImageTextureHeight);
g_lua.bindClassMemberFunction<UIWidget>("resizeToT ext", &UIWidget::resizeToText);
g_lua.bindClassMemberFunction<UIWidget>("clearText ", &UIWidget::clearText);
g_lua.bindClassMemberFunction<UIWidget>("setText", &UIWidget::setText);
g_lua.bindClassMemberFunction<UIWidget>("setTextAl ign", &UIWidget::setTextAlign);
g_lua.bindClassMemberFunction<UIWidget>("setTextOf fset", &UIWidget::setTextOffset);
g_lua.bindClassMemberFunction<UIWidget>("setTextWr ap", &UIWidget::setTextWrap);
g_lua.bindClassMemberFunction<UIWidget>("setTextAu toResize", &UIWidget::setTextAutoResize);
g_lua.bindClassMemberFunction<UIWidget>("setTextVe rticalAutoResize", &UIWidget::setTextVerticalAutoResize);
g_lua.bindClassMemberFunction<UIWidget>("setTextHo rizontalAutoResize", &UIWidget::setTextHorizontalAutoResize);
g_lua.bindClassMemberFunction<UIWidget>("setFont", &UIWidget::setFont);
g_lua.bindClassMemberFunction<UIWidget>("getText", &UIWidget::getText);
g_lua.bindClassMemberFunction<UIWidget>("getDrawTe xt", &UIWidget::getDrawText);
g_lua.bindClassMemberFunction<UIWidget>("getTextAl ign", &UIWidget::getTextAlign);
g_lua.bindClassMemberFunction<UIWidget>("getTextOf fset", &UIWidget::getTextOffset);
g_lua.bindClassMemberFunction<UIWidget>("getTextWr ap", &UIWidget::getTextWrap);
g_lua.bindClassMemberFunction<UIWidget>("getFont", &UIWidget::getFont);
g_lua.bindClassMemberFunction<UIWidget>("getTextSi ze", &UIWidget::getTextSize);


// UILayout
g_lua.registerClass<UILayout>();
g_lua.bindClassMemberFunction<UILayout>("update", &UILayout::update);
g_lua.bindClassMemberFunction<UILayout>("updateLat er", &UILayout::updateLater);
g_lua.bindClassMemberFunction<UILayout>("applyStyl e", &UILayout::applyStyle);
g_lua.bindClassMemberFunction<UILayout>("addWidget ", &UILayout::addWidget);
g_lua.bindClassMemberFunction<UILayout>("removeWid get", &UILayout::removeWidget);
g_lua.bindClassMemberFunction<UILayout>("disableUp dates", &UILayout::disableUpdates);
g_lua.bindClassMemberFunction<UILayout>("enableUpd ates", &UILayout::enableUpdates);
g_lua.bindClassMemberFunction<UILayout>("setParent ", &UILayout::setParent);
g_lua.bindClassMemberFunction<UILayout>("getParent Widget", &UILayout::getParentWidget);
g_lua.bindClassMemberFunction<UILayout>("isUpdateD isabled", &UILayout::isUpdateDisabled);
g_lua.bindClassMemberFunction<UILayout>("isUpdatin g", &UILayout::isUpdating);
g_lua.bindClassMemberFunction<UILayout>("isUIAncho rLayout", &UILayout::isUIAnchorLayout);
g_lua.bindClassMemberFunction<UILayout>("isUIBoxLa yout", &UILayout::isUIBoxLayout);
g_lua.bindClassMemberFunction<UILayout>("isUIHoriz ontalLayout", &UILayout::isUIHorizontalLayout);
g_lua.bindClassMemberFunction<UILayout>("isUIVerti calLayout", &UILayout::isUIVerticalLayout);
g_lua.bindClassMemberFunction<UILayout>("isUIGridL ayout", &UILayout::isUIGridLayout);


// UIBoxLayout
g_lua.registerClass<UIBoxLayout, UILayout>();
g_lua.bindClassMemberFunction<UIBoxLayout>("setSpa cing", &UIBoxLayout::setSpacing);
g_lua.bindClassMemberFunction<UIBoxLayout>("setFit Children", &UIBoxLayout::setFitChildren);


// UIVerticalLayout
g_lua.registerClass<UIVerticalLayout, UIBoxLayout>();
g_lua.bindClassStaticFunction<UIVerticalLayout>("c reate", [](UIWidgetPtr parent){ return UIVerticalLayoutPtr(new UIVerticalLayout(parent)); } );
g_lua.bindClassMemberFunction<UIVerticalLayout>("s etAlignBottom", &UIVerticalLayout::setAlignBottom);
g_lua.bindClassMemberFunction<UIVerticalLayout>("i sAlignBottom", &UIVerticalLayout::isAlignBottom);


// UIHorizontalLayout
g_lua.registerClass<UIHorizontalLayout, UIBoxLayout>();
g_lua.bindClassStaticFunction<UIHorizontalLayout>( "create", [](UIWidgetPtr parent){ return UIHorizontalLayoutPtr(new UIHorizontalLayout(parent)); } );
g_lua.bindClassMemberFunction<UIHorizontalLayout>( "setAlignRight", &UIHorizontalLayout::setAlignRight);


// UIGridLayout
g_lua.registerClass<UIGridLayout, UILayout>();
g_lua.bindClassStaticFunction<UIGridLayout>("creat e", [](UIWidgetPtr parent){ return UIGridLayoutPtr(new UIGridLayout(parent)); });
g_lua.bindClassMemberFunction<UIGridLayout>("setCe llSize", &UIGridLayout::setCellSize);
g_lua.bindClassMemberFunction<UIGridLayout>("setCe llWidth", &UIGridLayout::setCellWidth);
g_lua.bindClassMemberFunction<UIGridLayout>("setCe llHeight", &UIGridLayout::setCellHeight);
g_lua.bindClassMemberFunction<UIGridLayout>("setCe llSpacing", &UIGridLayout::setCellSpacing);
g_lua.bindClassMemberFunction<UIGridLayout>("setFl ow", &UIGridLayout::setFlow);
g_lua.bindClassMemberFunction<UIGridLayout>("setNu mColumns", &UIGridLayout::setNumColumns);
g_lua.bindClassMemberFunction<UIGridLayout>("setNu mLines", &UIGridLayout::setNumLines);
g_lua.bindClassMemberFunction<UIGridLayout>("getNu mColumns", &UIGridLayout::getNumColumns);
g_lua.bindClassMemberFunction<UIGridLayout>("getNu mLines", &UIGridLayout::getNumLines);
g_lua.bindClassMemberFunction<UIGridLayout>("getCe llSize", &UIGridLayout::getCellSize);
g_lua.bindClassMemberFunction<UIGridLayout>("getCe llSpacing", &UIGridLayout::getCellSpacing);
g_lua.bindClassMemberFunction<UIGridLayout>("isUIG ridLayout", &UIGridLayout::isUIGridLayout);


// UIAnchorLayout
g_lua.registerClass<UIAnchorLayout, UILayout>();
g_lua.bindClassStaticFunction<UIAnchorLayout>("cre ate", [](UIWidgetPtr parent){ return UIAnchorLayoutPtr(new UIAnchorLayout(parent)); } );
g_lua.bindClassMemberFunction<UIAnchorLayout>("rem oveAnchors", &UIAnchorLayout::removeAnchors);
g_lua.bindClassMemberFunction<UIAnchorLayout>("cen terIn", &UIAnchorLayout::centerIn);
g_lua.bindClassMemberFunction<UIAnchorLayout>("fil l", &UIAnchorLayout::fill);


// UITextEdit
g_lua.registerClass<UITextEdit, UIWidget>();
g_lua.bindClassStaticFunction<UITextEdit>("create" , []{ return UITextEditPtr(new UITextEdit); } );
g_lua.bindClassMemberFunction<UITextEdit>("setCurs orPos", &UITextEdit::setCursorPos);
g_lua.bindClassMemberFunction<UITextEdit>("setSele ction", &UITextEdit::setSelection);
g_lua.bindClassMemberFunction<UITextEdit>("setCurs orVisible", &UITextEdit::setCursorVisible);
g_lua.bindClassMemberFunction<UITextEdit>("setChan geCursorImage", &UITextEdit::setChangeCursorImage);
g_lua.bindClassMemberFunction<UITextEdit>("setText Hidden", &UITextEdit::setTextHidden);
g_lua.bindClassMemberFunction<UITextEdit>("setVali dCharacters", &UITextEdit::setValidCharacters);
g_lua.bindClassMemberFunction<UITextEdit>("setShif tNavigation", &UITextEdit::setShiftNavigation);
g_lua.bindClassMemberFunction<UITextEdit>("setMult iline", &UITextEdit::setMultiline);
g_lua.bindClassMemberFunction<UITextEdit>("setEdit able", &UITextEdit::setEditable);
g_lua.bindClassMemberFunction<UITextEdit>("setSele ctable", &UITextEdit::setSelectable);
g_lua.bindClassMemberFunction<UITextEdit>("setSele ctionColor", &UITextEdit::setSelectionColor);
g_lua.bindClassMemberFunction<UITextEdit>("setSele ctionBackgroundColor", &UITextEdit::setSelectionBackgroundColor);
g_lua.bindClassMemberFunction<UITextEdit>("setMaxL ength", &UITextEdit::setMaxLength);
g_lua.bindClassMemberFunction<UITextEdit>("setText VirtualOffset", &UITextEdit::setTextVirtualOffset);
g_lua.bindClassMemberFunction<UITextEdit>("getText VirtualOffset", &UITextEdit::getTextVirtualOffset);
g_lua.bindClassMemberFunction<UITextEdit>("getText VirtualSize", &UITextEdit::getTextVirtualSize);
g_lua.bindClassMemberFunction<UITextEdit>("getText TotalSize", &UITextEdit::getTextTotalSize);
g_lua.bindClassMemberFunction<UITextEdit>("moveCur sorHorizontally", &UITextEdit::moveCursorHorizontally);
g_lua.bindClassMemberFunction<UITextEdit>("moveCur sorVertically", &UITextEdit::moveCursorVertically);
g_lua.bindClassMemberFunction<UITextEdit>("appendT ext", &UITextEdit::appendText);
g_lua.bindClassMemberFunction<UITextEdit>("wrapTex t", &UITextEdit::wrapText);
g_lua.bindClassMemberFunction<UITextEdit>("removeC haracter", &UITextEdit::removeCharacter);
g_lua.bindClassMemberFunction<UITextEdit>("blinkCu rsor", &UITextEdit::blinkCursor);
g_lua.bindClassMemberFunction<UITextEdit>("del", &UITextEdit::del);
g_lua.bindClassMemberFunction<UITextEdit>("paste", &UITextEdit::paste);
g_lua.bindClassMemberFunction<UITextEdit>("copy", &UITextEdit::copy);
g_lua.bindClassMemberFunction<UITextEdit>("cut", &UITextEdit::cut);
g_lua.bindClassMemberFunction<UITextEdit>("selectA ll", &UITextEdit::selectAll);
g_lua.bindClassMemberFunction<UITextEdit>("clearSe lection", &UITextEdit::clearSelection);
g_lua.bindClassMemberFunction<UITextEdit>("getDisp layedText", &UITextEdit::getDisplayedText);
g_lua.bindClassMemberFunction<UITextEdit>("getSele ction", &UITextEdit::getSelection);
g_lua.bindClassMemberFunction<UITextEdit>("getText Pos", &UITextEdit::getTextPos);
g_lua.bindClassMemberFunction<UITextEdit>("getCurs orPos", &UITextEdit::getCursorPos);
g_lua.bindClassMemberFunction<UITextEdit>("getMaxL ength", &UITextEdit::getMaxLength);
g_lua.bindClassMemberFunction<UITextEdit>("getSele ctionStart", &UITextEdit::getSelectionStart);
g_lua.bindClassMemberFunction<UITextEdit>("getSele ctionEnd", &UITextEdit::getSelectionEnd);
g_lua.bindClassMemberFunction<UITextEdit>("getSele ctionColor", &UITextEdit::getSelectionColor);
g_lua.bindClassMemberFunction<UITextEdit>("getSele ctionBackgroundColor", &UITextEdit::getSelectionBackgroundColor);
g_lua.bindClassMemberFunction<UITextEdit>("hasSele ction", &UITextEdit::hasSelection);
g_lua.bindClassMemberFunction<UITextEdit>("isEdita ble", &UITextEdit::isEditable);
g_lua.bindClassMemberFunction<UITextEdit>("isSelec table", &UITextEdit::isSelectable);
g_lua.bindClassMemberFunction<UITextEdit>("isCurso rVisible", &UITextEdit::isCursorVisible);
g_lua.bindClassMemberFunction<UITextEdit>("isChang ingCursorImage", &UITextEdit::isChangingCursorImage);
g_lua.bindClassMemberFunction<UITextEdit>("isTextH idden", &UITextEdit::isTextHidden);
g_lua.bindClassMemberFunction<UITextEdit>("isShift Navigation", &UITextEdit::isShiftNavigation);
g_lua.bindClassMemberFunction<UITextEdit>("isMulti line", &UITextEdit::isMultiline);


g_lua.registerClass<ShaderProgram>();
g_lua.registerClass<PainterShaderProgram>();
g_lua.bindClassMemberFunction<PainterShaderProgram >("addMultiTexture", &PainterShaderProgram::addMultiTexture);


// ParticleEffect
g_lua.registerClass<ParticleEffectType>();
g_lua.bindClassStaticFunction<ParticleEffectType>( "create", []{ return ParticleEffectTypePtr(new ParticleEffectType); });
g_lua.bindClassMemberFunction<ParticleEffectType>( "getName", &ParticleEffectType::getName);
g_lua.bindClassMemberFunction<ParticleEffectType>( "getDescription", &ParticleEffectType::getDescription);


// UIParticles
g_lua.registerClass<UIParticles, UIWidget>();
g_lua.bindClassStaticFunction<UIParticles>("create ", []{ return UIParticlesPtr(new UIParticles); } );
g_lua.bindClassMemberFunction<UIParticles>("addEff ect", &UIParticles::addEffect);
#endif


#ifdef FW_NET
// Server
g_lua.registerClass<Server>();
g_lua.bindClassStaticFunction<Server>("create", &Server::create);
g_lua.bindClassMemberFunction<Server>("close", &Server::close);
g_lua.bindClassMemberFunction<Server>("isOpen", &Server::isOpen);
g_lua.bindClassMemberFunction<Server>("acceptNext" , &Server::acceptNext);


// Connection
g_lua.registerClass<Connection>();
g_lua.bindClassMemberFunction<Connection>("getIp", &Connection::getIp);


// Protocol
g_lua.registerClass<Protocol>();
g_lua.bindClassStaticFunction<Protocol>("create", []{ return ProtocolPtr(new Protocol); });
g_lua.bindClassMemberFunction<Protocol>("connect", &Protocol::connect);
g_lua.bindClassMemberFunction<Protocol>("disconnec t", &Protocol::disconnect);
g_lua.bindClassMemberFunction<Protocol>("isConnect ed", &Protocol::isConnected);
g_lua.bindClassMemberFunction<Protocol>("isConnect ing", &Protocol::isConnecting);
g_lua.bindClassMemberFunction<Protocol>("getConnec tion", &Protocol::getConnection);
g_lua.bindClassMemberFunction<Protocol>("setConnec tion", &Protocol::setConnection);
g_lua.bindClassMemberFunction<Protocol>("send", &Protocol::send);
g_lua.bindClassMemberFunction<Protocol>("recv", &Protocol::recv);
g_lua.bindClassMemberFunction<Protocol>("setXteaKe y", &Protocol::setXteaKey);
g_lua.bindClassMemberFunction<Protocol>("getXteaKe y", &Protocol::getXteaKey);
g_lua.bindClassMemberFunction<Protocol>("generateX teaKey", &Protocol::generateXteaKey);
g_lua.bindClassMemberFunction<Protocol>("enableXte aEncryption", &Protocol::enableXteaEncryption);
g_lua.bindClassMemberFunction<Protocol>("enableChe cksum", &Protocol::enableChecksum);


// ProtocolHttp
g_lua.registerClass<ProtocolHttp>();
g_lua.bindClassStaticFunction<ProtocolHttp>("creat e", []{ return ProtocolHttpPtr(new ProtocolHttp); });
g_lua.bindClassMemberFunction<ProtocolHttp>("conne ct", &ProtocolHttp::connect);
g_lua.bindClassMemberFunction<ProtocolHttp>("disco nnect", &ProtocolHttp::disconnect);
g_lua.bindClassMemberFunction<ProtocolHttp>("send" , &ProtocolHttp::send);
g_lua.bindClassMemberFunction<ProtocolHttp>("recv" , &ProtocolHttp::recv);


// InputMessage
g_lua.registerClass<InputMessage>();
g_lua.bindClassStaticFunction<InputMessage>("creat e", []{ return InputMessagePtr(new InputMessage); });
g_lua.bindClassMemberFunction<InputMessage>("setBu ffer", &InputMessage::setBuffer);
g_lua.bindClassMemberFunction<InputMessage>("skipB ytes", &InputMessage::skipBytes);
g_lua.bindClassMemberFunction<InputMessage>("getU8 ", &InputMessage::getU8);
g_lua.bindClassMemberFunction<InputMessage>("getU1 6", &InputMessage::getU16);
g_lua.bindClassMemberFunction<InputMessage>("getU3 2", &InputMessage::getU32);
g_lua.bindClassMemberFunction<InputMessage>("getU6 4", &InputMessage::getU64);
g_lua.bindClassMemberFunction<InputMessage>("getSt ring", &InputMessage::getString);
g_lua.bindClassMemberFunction<InputMessage>("peekU 8", &InputMessage::peekU8);
g_lua.bindClassMemberFunction<InputMessage>("peekU 16", &InputMessage::peekU16);
g_lua.bindClassMemberFunction<InputMessage>("peekU 32", &InputMessage::peekU32);
g_lua.bindClassMemberFunction<InputMessage>("peekU 64", &InputMessage::peekU64);
g_lua.bindClassMemberFunction<InputMessage>("decry ptRsa", &InputMessage::decryptRsa);
g_lua.bindClassMemberFunction<InputMessage>("getRe adSize", &InputMessage::getReadSize);
g_lua.bindClassMemberFunction<InputMessage>("getUn readSize", &InputMessage::getUnreadSize);
g_lua.bindClassMemberFunction<InputMessage>("getMe ssageSize", &InputMessage::getMessageSize);
g_lua.bindClassMemberFunction<InputMessage>("eof", &InputMessage::eof);


// OutputMessage
g_lua.registerClass<OutputMessage>();
g_lua.bindClassStaticFunction<OutputMessage>("crea te", []{ return OutputMessagePtr(new OutputMessage); });
g_lua.bindClassMemberFunction<OutputMessage>("getB uffer", &OutputMessage::getBuffer);
g_lua.bindClassMemberFunction<OutputMessage>("rese t", &OutputMessage::reset);
g_lua.bindClassMemberFunction<OutputMessage>("addU 8", &OutputMessage::addU8);
g_lua.bindClassMemberFunction<OutputMessage>("addU 16", &OutputMessage::addU16);
g_lua.bindClassMemberFunction<OutputMessage>("addU 32", &OutputMessage::addU32);
g_lua.bindClassMemberFunction<OutputMessage>("addU 64", &OutputMessage::addU64);
g_lua.bindClassMemberFunction<OutputMessage>("addS tring", &OutputMessage::addString);
g_lua.bindClassMemberFunction<OutputMessage>("addP addingBytes", &OutputMessage::addPaddingBytes);
g_lua.bindClassMemberFunction<OutputMessage>("encr yptRsa", &OutputMessage::encryptRsa);
g_lua.bindClassMemberFunction<OutputMessage>("getM essageSize", &OutputMessage::getMessageSize);
g_lua.bindClassMemberFunction<OutputMessage>("setM essageSize", &OutputMessage::setMessageSize);
g_lua.bindClassMemberFunction<OutputMessage>("getW ritePos", &OutputMessage::getWritePos);
g_lua.bindClassMemberFunction<OutputMessage>("setW ritePos", &OutputMessage::setWritePos);
#endif


#ifdef FW_SOUND
// SoundManager
g_lua.registerSingletonClass("g_sounds");
g_lua.bindSingletonFunction("g_sounds", "preload", &SoundManager::preload, &g_sounds);
g_lua.bindSingletonFunction("g_sounds", "play", &SoundManager::play, &g_sounds);
g_lua.bindSingletonFunction("g_sounds", "getChannel", &SoundManager::getChannel, &g_sounds);
g_lua.bindSingletonFunction("g_sounds", "stopAll", &SoundManager::stopAll, &g_sounds);
g_lua.bindSingletonFunction("g_sounds", "enableAudio", &SoundManager::enableAudio, &g_sounds);
g_lua.bindSingletonFunction("g_sounds", "disableAudio", &SoundManager::disableAudio, &g_sounds);
g_lua.bindSingletonFunction("g_sounds", "setAudioEnabled", &SoundManager::setAudioEnabled, &g_sounds);
g_lua.bindSingletonFunction("g_sounds", "isAudioEnabled", &SoundManager::isAudioEnabled, &g_sounds);


g_lua.registerClass<SoundSource>();
g_lua.registerClass<CombinedSoundSource, SoundSource>();
g_lua.registerClass<StreamSoundSource, SoundSource>();


g_lua.registerClass<SoundChannel>();
g_lua.bindClassMemberFunction<SoundChannel>("play" , &SoundChannel::play);
g_lua.bindClassMemberFunction<SoundChannel>("stop" , &SoundChannel::stop);
g_lua.bindClassMemberFunction<SoundChannel>("enque ue", &SoundChannel::enqueue);
g_lua.bindClassMemberFunction<SoundChannel>("enabl e", &SoundChannel::enable);
g_lua.bindClassMemberFunction<SoundChannel>("disab le", &SoundChannel::disable);
g_lua.bindClassMemberFunction<SoundChannel>("setGa in", &SoundChannel::setGain);
g_lua.bindClassMemberFunction<SoundChannel>("getGa in", &SoundChannel::getGain);
g_lua.bindClassMemberFunction<SoundChannel>("setEn abled", &SoundChannel::setEnabled);
g_lua.bindClassMemberFunction<SoundChannel>("isEna bled", &SoundChannel::isEnabled);
g_lua.bindClassMemberFunction<SoundChannel>("getId ", &SoundChannel::getId);
#endif


#ifdef FW_SQL
// Database
g_lua.registerClass<Database>();
g_lua.bindClassMemberFunction<Database>("getDataba seEngine", &Database::getDatabaseEngine);
g_lua.bindClassMemberFunction<Database>("isConnect ed", &Database::isConnected);
g_lua.bindClassMemberFunction<Database>("getString Comparer", &Database::getStringComparer);
g_lua.bindClassMemberFunction<Database>("getUpdate Limiter", &Database::getUpdateLimiter);
g_lua.bindClassMemberFunction<Database>("getLastIn sertedRowID", &Database::getLastInsertedRowID);
g_lua.bindClassMemberFunction<Database>("escapeStr ing", &Database::escapeString);
//g_lua.bindClassMemberFunction<Database>("escapeBlo b", &Database::escapeBlob); // need to write a cast for this type to work (if needed)


// DBQuery
/* (not sure if this class will work as a luafunction)
g_lua.registerClass<DBQuery>();
g_lua.bindClassStaticFunction<DBQuery>("create", []{ return DBQuery(); });
g_lua.bindClassMemberFunction<DBQuery>("append", &DBQuery::append);
g_lua.bindClassMemberFunction<DBQuery>("set", &DBQuery::set);
*/


// DBResult
g_lua.registerClass<DBResult>();
g_lua.bindClassMemberFunction<DBResult>("getDataIn t", &DBResult::getDataInt);
g_lua.bindClassMemberFunction<DBResult>("getDataLo ng", &DBResult::getDataLong);
g_lua.bindClassMemberFunction<DBResult>("getDataSt ring", &DBResult::getDataString);
//g_lua.bindClassMemberFunction<DBResult>("getDataSt ream", &DBResult::getDataStream); // need to write a cast for this type to work (if needed)
g_lua.bindClassMemberFunction<DBResult>("getRowCou nt", &DBResult::getRowCount);
g_lua.bindClassMemberFunction<DBResult>("free", &DBResult::free);
g_lua.bindClassMemberFunction<DBResult>("next", &DBResult::next);


// MySQL
g_lua.registerClass<DatabaseMySQL, Database>();
g_lua.bindClassStaticFunction<DatabaseMySQL>("crea te", []{ return DatabaseMySQLPtr(new DatabaseMySQL); });
g_lua.bindClassMemberFunction<DatabaseMySQL>("conn ect", &DatabaseMySQL::connect);
g_lua.bindClassMemberFunction<DatabaseMySQL>("begi nTransaction", &DatabaseMySQL::beginTransaction);
g_lua.bindClassMemberFunction<DatabaseMySQL>("roll back", &DatabaseMySQL::rollback);
g_lua.bindClassMemberFunction<DatabaseMySQL>("comm it", &DatabaseMySQL::commit);
g_lua.bindClassMemberFunction<DatabaseMySQL>("exec uteQuery", &DatabaseMySQL::executeQuery);
g_lua.bindClassMemberFunction<DatabaseMySQL>("stor eQuery", &DatabaseMySQL::storeQuery);


// MySQLResult
g_lua.registerClass<MySQLResult>();
g_lua.bindClassMemberFunction<MySQLResult>("getDat aInt", &MySQLResult::getDataInt);
g_lua.bindClassMemberFunction<MySQLResult>("getDat aLong", &MySQLResult::getDataLong);
g_lua.bindClassMemberFunction<MySQLResult>("getDat aString", &MySQLResult::getDataString);
//g_lua.bindClassMemberFunction<MySQLResult>("getDat aStream", &MySQLResult::getDataStream); // need to write a cast for this type to work (if needed)
g_lua.bindClassMemberFunction<MySQLResult>("getRow Count", &MySQLResult::getRowCount);
g_lua.bindClassMemberFunction<MySQLResult>("free", &MySQLResult::free);
g_lua.bindClassMemberFunction<MySQLResult>("next", &MySQLResult::next);

 

Link para o comentário
https://xtibia.com/forum/topic/217643-fun%C3%A7%C3%B5es-otc/
Compartilhar em outros sites

kkkk, eu tbm to mexendo a pouco tempo e to com duvida de pegar os valores das skills pra fazer um mod de skill, tipo um mod de atributo, ai ta foda :[

Mais cedo depois de um tempo consegui criar 1 mod que troca 1 label por uma função tipo, botei pra qde der use no botão, uma label trocar pro nome do player... agora vou dar uma mexida a mais e jaja consigo isso :s

Link para o comentário
https://xtibia.com/forum/topic/217643-fun%C3%A7%C3%B5es-otc/#findComment-1540245
Compartilhar em outros sites

ô briga kkkkkkk, o meu problema eh que eu nao sei colocar o valor na janela, tipo como uma label....

 

tipo colocar o valor do getplayerskill pra aparecer em uma janela, soh falta isso

 

alguem poderia me explicar ou da um exemplo?

 

 

vlw

Link para o comentário
https://xtibia.com/forum/topic/217643-fun%C3%A7%C3%B5es-otc/#findComment-1540266
Compartilhar em outros sites

Ah ta, entendi... rola de vc tirar umas duvidas minha, Slicer?

 

/\ eh por isso q tu deveria coloca code E spoiler...

[.spoiler][.CODE] ... [./CODE][./spoiler]

 

sem os '.' clr...

 

Mano, eu esqueci como faz, tinha feito mais cedo cara kkk, vou te passar pm, aí vc fala cmg lá pra não floodar aqui, blz?

 

ô briga kkkkkkk, o meu problema eh que eu nao sei colocar o valor na janela, tipo como uma label....

 

tipo colocar o valor do getplayerskill pra aparecer em uma janela, soh falta isso

 

alguem poderia me explicar ou da um exemplo?

 

 

vlw

Link para o comentário
https://xtibia.com/forum/topic/217643-fun%C3%A7%C3%B5es-otc/#findComment-1540282
Compartilhar em outros sites

×
×
  • Criar Novo...