Use formatter for all Haxe code
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import electron.main.App;
|
||||
import electron.main.BrowserWindow;
|
||||
|
||||
class ElectronSetup {
|
||||
|
||||
class ElectronSetup
|
||||
{
|
||||
public static var window:BrowserWindow;
|
||||
|
||||
static function main()
|
||||
@@ -10,31 +10,34 @@ class ElectronSetup {
|
||||
electron.main.App.commandLine.appendSwitch('ignore-gpu-blacklist', 'true');
|
||||
|
||||
var windows:Array<OpenFLWindow> = [
|
||||
::foreach windows::
|
||||
::foreach
|
||||
windows::
|
||||
{
|
||||
allowHighDPI: ::allowHighDPI::,
|
||||
alwaysOnTop: ::alwaysOnTop::,
|
||||
antialiasing: ::antialiasing::,
|
||||
background: ::background::,
|
||||
borderless: ::borderless::,
|
||||
colorDepth: ::colorDepth::,
|
||||
depthBuffer: ::depthBuffer::,
|
||||
display: ::display::,
|
||||
fullscreen: ::fullscreen::,
|
||||
hardware: ::hardware::,
|
||||
height: ::height::,
|
||||
hidden: #if munit true #else ::hidden:: #end,
|
||||
maximized: ::maximized::,
|
||||
minimized: ::minimized::,
|
||||
parameters: ::parameters::,
|
||||
resizable: ::resizable::,
|
||||
stencilBuffer: ::stencilBuffer::,
|
||||
allowHighDPI:::allowHighDPI::,
|
||||
alwaysOnTop:::alwaysOnTop::,
|
||||
antialiasing:::antialiasing::,
|
||||
background:::background::,
|
||||
borderless:::borderless::,
|
||||
colorDepth:::colorDepth::,
|
||||
depthBuffer:::depthBuffer::,
|
||||
display:::display::,
|
||||
fullscreen:::fullscreen::,
|
||||
hardware:::hardware::,
|
||||
height:::height::,
|
||||
hidden: #if munit true #else::hidden:: #end,
|
||||
maximized:::maximized::,
|
||||
minimized:::minimized::,
|
||||
parameters:::parameters::,
|
||||
resizable:::resizable::,
|
||||
stencilBuffer:::stencilBuffer::,
|
||||
title: "::title::",
|
||||
vsync: ::vsync::,
|
||||
width: ::width::,
|
||||
x: ::x::,
|
||||
y: ::y::
|
||||
},::end::
|
||||
vsync:::vsync::,
|
||||
width:::width::,
|
||||
x:::x::,
|
||||
y:::y::
|
||||
},
|
||||
::
|
||||
end::
|
||||
];
|
||||
|
||||
for (i in 0...windows.length)
|
||||
@@ -46,28 +49,30 @@ class ElectronSetup {
|
||||
if (height == 0) height = 600;
|
||||
var frame:Bool = window.borderless == false;
|
||||
|
||||
electron.main.App.commandLine.appendSwitch('--autoplay-policy','no-user-gesture-required');
|
||||
|
||||
electron.main.App.on( 'ready', function(e) {
|
||||
var config:Dynamic = {
|
||||
fullscreen: window.fullscreen,
|
||||
frame:frame,
|
||||
resizable: window.resizable,
|
||||
alwaysOnTop: window.alwaysOnTop,
|
||||
width:width,
|
||||
height:height,
|
||||
webgl:window.hardware
|
||||
};
|
||||
electron.main.App.commandLine.appendSwitch('--autoplay-policy', 'no-user-gesture-required');
|
||||
|
||||
electron.main.App.on('ready', function(e)
|
||||
{
|
||||
var config:Dynamic =
|
||||
{
|
||||
fullscreen: window.fullscreen,
|
||||
frame: frame,
|
||||
resizable: window.resizable,
|
||||
alwaysOnTop: window.alwaysOnTop,
|
||||
width: width,
|
||||
height: height,
|
||||
webgl: window.hardware
|
||||
};
|
||||
ElectronSetup.window = new BrowserWindow(config);
|
||||
|
||||
ElectronSetup.window.on( closed, function() {
|
||||
if( js.Node.process.platform != 'darwin' )
|
||||
electron.main.App.quit();
|
||||
ElectronSetup.window.on(closed, function()
|
||||
{
|
||||
if (js.Node.process.platform != 'darwin') electron.main.App.quit();
|
||||
});
|
||||
|
||||
ElectronSetup.window.loadURL( 'file://' + js.Node.__dirname + '/index.html' );
|
||||
ElectronSetup.window.loadURL('file://' + js.Node.__dirname + '/index.html');
|
||||
#if (debug && !suppress_devtools)
|
||||
ElectronSetup.window.webContents.openDevTools();
|
||||
ElectronSetup.window.webContents.openDevTools();
|
||||
#end
|
||||
});
|
||||
}
|
||||
@@ -87,7 +92,7 @@ typedef OpenFLWindow =
|
||||
fullscreen:Bool,
|
||||
hardware:Dynamic,
|
||||
height:Int,
|
||||
hidden: Bool,
|
||||
hidden:Bool,
|
||||
maximized:Bool,
|
||||
minimized:Bool,
|
||||
parameters:Dynamic,
|
||||
|
||||
Reference in New Issue
Block a user