Add 'always on top' window support
This commit is contained in:
@@ -107,6 +107,7 @@ class NativeWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Reflect.hasField (parent.config, "allowHighDPI") && parent.config.allowHighDPI) flags |= cast WindowFlags.WINDOW_FLAG_ALLOW_HIGHDPI;
|
if (Reflect.hasField (parent.config, "allowHighDPI") && parent.config.allowHighDPI) flags |= cast WindowFlags.WINDOW_FLAG_ALLOW_HIGHDPI;
|
||||||
|
if (Reflect.hasField (parent.config, "alwaysOnTop") && parent.config.alwaysOnTop) flags |= cast WindowFlags.WINDOW_FLAG_ALWAYS_ON_TOP;
|
||||||
//if (Reflect.hasField (parent.config, "borderless") && parent.config.borderless) flags |= cast WindowFlags.WINDOW_FLAG_BORDERLESS;
|
//if (Reflect.hasField (parent.config, "borderless") && parent.config.borderless) flags |= cast WindowFlags.WINDOW_FLAG_BORDERLESS;
|
||||||
if (parent.__borderless) flags |= cast WindowFlags.WINDOW_FLAG_BORDERLESS;
|
if (parent.__borderless) flags |= cast WindowFlags.WINDOW_FLAG_BORDERLESS;
|
||||||
if (Reflect.hasField (parent.config, "depthBuffer") && parent.config.depthBuffer) flags |= cast WindowFlags.WINDOW_FLAG_DEPTH_BUFFER;
|
if (Reflect.hasField (parent.config, "depthBuffer") && parent.config.depthBuffer) flags |= cast WindowFlags.WINDOW_FLAG_DEPTH_BUFFER;
|
||||||
@@ -411,5 +412,6 @@ class NativeWindow {
|
|||||||
var WINDOW_FLAG_HIDDEN = 0x00001000;
|
var WINDOW_FLAG_HIDDEN = 0x00001000;
|
||||||
var WINDOW_FLAG_MINIMIZED = 0x00002000;
|
var WINDOW_FLAG_MINIMIZED = 0x00002000;
|
||||||
var WINDOW_FLAG_MAXIMIZED = 0x00004000;
|
var WINDOW_FLAG_MAXIMIZED = 0x00004000;
|
||||||
|
var WINDOW_FLAG_ALWAYS_ON_TOP = 0x00008000;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -23,6 +23,7 @@ typedef Config = {
|
|||||||
typedef WindowConfig = {
|
typedef WindowConfig = {
|
||||||
|
|
||||||
@:optional var allowHighDPI:Bool;
|
@:optional var allowHighDPI:Bool;
|
||||||
|
@:optional var alwaysOnTop:Bool;
|
||||||
@:optional var antialiasing:Int;
|
@:optional var antialiasing:Int;
|
||||||
@:optional var background:Null<Int>;
|
@:optional var background:Null<Int>;
|
||||||
@:optional var borderless:Bool;
|
@:optional var borderless:Bool;
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class HXProject {
|
|||||||
|
|
||||||
defaultMeta = { title: "MyApplication", description: "", packageName: "com.example.myapp", version: "1.0.0", company: "", companyUrl: "", buildNumber: null, companyId: "" }
|
defaultMeta = { title: "MyApplication", description: "", packageName: "com.example.myapp", version: "1.0.0", company: "", companyUrl: "", buildNumber: null, companyId: "" }
|
||||||
defaultApp = { main: "Main", file: "MyApplication", path: "bin", preloader: "", swfVersion: 11.2, url: "", init: null }
|
defaultApp = { main: "Main", file: "MyApplication", path: "bin", preloader: "", swfVersion: 11.2, url: "", init: null }
|
||||||
defaultWindow = { width: 800, height: 600, parameters: "{}", background: 0xFFFFFF, fps: 30, hardware: true, display: 0, resizable: true, borderless: false, orientation: Orientation.AUTO, vsync: false, fullscreen: false, allowHighDPI: true, antialiasing: 0, allowShaders: true, requireShaders: false, depthBuffer: false, stencilBuffer: false }
|
defaultWindow = { width: 800, height: 600, parameters: "{}", background: 0xFFFFFF, fps: 30, hardware: true, display: 0, resizable: true, borderless: false, orientation: Orientation.AUTO, vsync: false, fullscreen: false, allowHighDPI: true, alwaysOnTop: false, antialiasing: 0, allowShaders: true, requireShaders: false, depthBuffer: false, stencilBuffer: false }
|
||||||
|
|
||||||
platformType = PlatformType.DESKTOP;
|
platformType = PlatformType.DESKTOP;
|
||||||
architectures = [];
|
architectures = [];
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ typedef WindowData = {
|
|||||||
@:optional var vsync:Bool;
|
@:optional var vsync:Bool;
|
||||||
@:optional var fullscreen:Bool;
|
@:optional var fullscreen:Bool;
|
||||||
@:optional var allowHighDPI:Bool;
|
@:optional var allowHighDPI:Bool;
|
||||||
|
@:optional var alwaysOnTop:Bool;
|
||||||
@:optional var antialiasing:Int;
|
@:optional var antialiasing:Int;
|
||||||
@:optional var orientation:Orientation;
|
@:optional var orientation:Orientation;
|
||||||
@:optional var allowShaders:Bool;
|
@:optional var allowShaders:Bool;
|
||||||
|
|||||||
@@ -71,7 +71,8 @@ namespace lime {
|
|||||||
WINDOW_FLAG_ALLOW_HIGHDPI = 0x00000800,
|
WINDOW_FLAG_ALLOW_HIGHDPI = 0x00000800,
|
||||||
WINDOW_FLAG_HIDDEN = 0x00001000,
|
WINDOW_FLAG_HIDDEN = 0x00001000,
|
||||||
WINDOW_FLAG_MINIMIZED = 0x00002000,
|
WINDOW_FLAG_MINIMIZED = 0x00002000,
|
||||||
WINDOW_FLAG_MAXIMIZED = 0x00004000
|
WINDOW_FLAG_MAXIMIZED = 0x00004000,
|
||||||
|
WINDOW_FLAG_ALWAYS_ON_TOP = 0x00008000
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Submodule project/lib/sdl updated: 953cc95976...d89f276b10
@@ -27,6 +27,7 @@ namespace lime {
|
|||||||
if (flags & WINDOW_FLAG_HIDDEN) sdlFlags |= SDL_WINDOW_HIDDEN;
|
if (flags & WINDOW_FLAG_HIDDEN) sdlFlags |= SDL_WINDOW_HIDDEN;
|
||||||
if (flags & WINDOW_FLAG_MINIMIZED) sdlFlags |= SDL_WINDOW_MINIMIZED;
|
if (flags & WINDOW_FLAG_MINIMIZED) sdlFlags |= SDL_WINDOW_MINIMIZED;
|
||||||
if (flags & WINDOW_FLAG_MAXIMIZED) sdlFlags |= SDL_WINDOW_MAXIMIZED;
|
if (flags & WINDOW_FLAG_MAXIMIZED) sdlFlags |= SDL_WINDOW_MAXIMIZED;
|
||||||
|
if (flags & WINDOW_FLAG_ALWAYS_ON_TOP) sdlFlags |= SDL_WINDOW_ALWAYS_ON_TOP;
|
||||||
|
|
||||||
#if defined (HX_WINDOWS) && defined (NATIVE_TOOLKIT_SDL_ANGLE)
|
#if defined (HX_WINDOWS) && defined (NATIVE_TOOLKIT_SDL_ANGLE)
|
||||||
OSVERSIONINFOEXW osvi = { sizeof (osvi), 0, 0, 0, 0, {0}, 0, 0 };
|
OSVERSIONINFOEXW osvi = { sizeof (osvi), 0, 0, 0, 0, {0}, 0, 0 };
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ package;
|
|||||||
::foreach windows::
|
::foreach windows::
|
||||||
{
|
{
|
||||||
allowHighDPI: ::allowHighDPI::,
|
allowHighDPI: ::allowHighDPI::,
|
||||||
|
alwaysOnTop: ::alwaysOnTop::,
|
||||||
antialiasing: ::antialiasing::,
|
antialiasing: ::antialiasing::,
|
||||||
background: ::background::,
|
background: ::background::,
|
||||||
borderless: ::borderless::,
|
borderless: ::borderless::,
|
||||||
|
|||||||
Reference in New Issue
Block a user