Template fix
This commit is contained in:
@@ -10,8 +10,7 @@ class ElectronSetup
|
||||
electron.main.App.commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
|
||||
|
||||
var windows:Array<OpenFLWindow> = [
|
||||
::foreach
|
||||
windows::
|
||||
::foreach windows::
|
||||
{
|
||||
allowHighDPI: ::allowHighDPI::,
|
||||
alwaysOnTop: ::alwaysOnTop::,
|
||||
@@ -35,9 +34,7 @@ class ElectronSetup
|
||||
width: ::width::,
|
||||
x: ::x::,
|
||||
y: ::y::
|
||||
},
|
||||
::
|
||||
end::
|
||||
},::end::
|
||||
];
|
||||
|
||||
for (i in 0...windows.length)
|
||||
@@ -67,7 +64,10 @@ class ElectronSetup
|
||||
|
||||
ElectronSetup.window.on(closed, function()
|
||||
{
|
||||
if (js.Node.process.platform != 'darwin') electron.main.App.quit();
|
||||
if (js.Node.process.platform != 'darwin')
|
||||
{
|
||||
electron.main.App.quit();
|
||||
}
|
||||
});
|
||||
|
||||
ElectronSetup.window.loadURL('file://' + js.Node.__dirname + '/index.html');
|
||||
|
||||
@@ -4,6 +4,7 @@ import::APP_MAIN::;
|
||||
|
||||
@:access(lime.app.Application)
|
||||
@:access(lime.system.System)
|
||||
|
||||
@:dox(hide) class ApplicationMain
|
||||
{
|
||||
public static function main()
|
||||
@@ -29,7 +30,8 @@ import::APP_MAIN::;
|
||||
app.meta.set("version", "::meta.version::");
|
||||
|
||||
#if !flash
|
||||
::foreach windows::var attributes:lime.ui.WindowAttributes =
|
||||
::foreach windows::
|
||||
var attributes:lime.ui.WindowAttributes =
|
||||
{
|
||||
allowHighDPI: ::allowHighDPI::,
|
||||
alwaysOnTop: ::alwaysOnTop::,
|
||||
@@ -37,9 +39,7 @@ import::APP_MAIN::;
|
||||
// display: ::display::,
|
||||
element: null,
|
||||
frameRate: ::fps::,
|
||||
#if !web
|
||||
fullscreen:::fullscreen::,
|
||||
#end
|
||||
#if !web fullscreen: ::fullscreen::, #end
|
||||
height: ::height::,
|
||||
hidden: #if munit true #else ::hidden:: #end,
|
||||
maximized: ::maximized::,
|
||||
@@ -89,8 +89,10 @@ import::APP_MAIN::;
|
||||
app.createWindow(attributes);
|
||||
::end::
|
||||
#elseif !air
|
||||
|
||||
app.window.context.attributes.background = ::WIN_BACKGROUND::;
|
||||
app.window.frameRate = ::WIN_FPS::;
|
||||
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -116,13 +118,17 @@ import::APP_MAIN::;
|
||||
public static function start(app:lime.app.Application = null):Void
|
||||
{
|
||||
#if !munit
|
||||
|
||||
var result = app.exec();
|
||||
|
||||
#if (sys && !ios && !nodejs && !emscripten)
|
||||
lime.system.System.exit(result);
|
||||
#end
|
||||
|
||||
#else
|
||||
|
||||
new ::APP_MAIN::();
|
||||
|
||||
#end
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user