Beispiel #1
0
BaseGuiApp::BaseGuiApp(int &argc, char **argv)
    : GuiApp(argc, argv), d(new Instance)
{
    // Override the system locale (affects number/time formatting).
    QLocale::setDefault(QLocale("en_US.UTF-8"));

    d->binder.init(scriptSystem().nativeModule("App"))
            << DENG2_FUNC (App_AddFontMapping, "addFontMapping", "family" << "mappings")
            << DENG2_FUNC (App_LoadFont,       "loadFont", "fileName");
}
Beispiel #2
0
void initMathModule(Binder &binder, Record &mathModule)
{
    binder.init(mathModule)
            << DENG2_FUNC_NOARG(Math_Random, "random")
            << DENG2_FUNC      (Math_RandInt, "randInt", "low" << "high");
}