Skip to content

destroytoday/destroy-window

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Window

Overview

This library provides your AIR app with the window API that should have been.

Features

  • single-line window instantiation without the need of NativeWindowInitOptions
  • stage is no-scale and top-left align by default
  • window manager for batch operations, like closing all windows

Usage

Window

Instantiating a window. Unless specified, it uses the default NativeWindowInitOptions settings. It is also visible by default.

new Window();

Centering a window on the main screen.

window.center();

Centering a window on a specific rectangle.

window.center(new Rectangle(100.0, 200.0, 800.0, 600.0));

Centering a window on a second screen.

var secondScreen:Screen = Screen.screens[1];

window.center(secondScreen.visibleBounds);

WindowManager

Managing windows.

windowManager.addWindow(new Window());

windowManager.removeWindow(window);

windowManager.removeAllWindows();

Closing all windows (commonly used when quitting the application to ensure process closes)

windowManager.closeAllWindows()

Bring all windows to front.

windowManager.bringAllWindowsToFront();

About

Window library for AIR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published