Skip to content

ImmersionUI

Adam Furman edited this page Jul 8, 2016 · 2 revisions

ImmersionUI class

The ImmersionUI class provides a way for graphics-intensive apps such as games to take control of the full screen UI, with their own loop and event control. While an ImmerionUI is active, none of the usual Python OS background services such as Threads and Tasks are updated unless you do it yourself. An ImmersionUI instance is automatically generated for applications that supply an immersive parameter in the more section of their app manifest. The ImmersionUI instance is then accessible via the immersionUI attribute of their app object.

ImmersionUI ( Application app )

Accessible via app.immersionUI if defined in manifest.

An example of an app.json that defines an ImmersionUI is below. Note that game is the name of the app and gameLoop () is the method within the app's code that should be run immersively.

{
  "name": "game",
  "author": "GameCreator",
  "version": 1.0,
  "title": "Game",
  "more": {
    "immersive": "gameLoop",
    "onStart": "appInit"
}

Object Variables

  • Application application The application associated with the IUI.
  • method The method to launch in immersive mode.
  • onExit The method to run after the immersive method exits.

Methods

  • start ( onExit=None ) Start the immersive UI. Brings up a prompt for the user.
  • launch ( resp ) Launches the immersive method after parsing the dialog's response.

Home

Getting Started

Documentation

Threads and Tasks

Applications and Notifications

The State Class and Variable

The GUI, Events, Resources, and Dialogs

The following classes are all under the GUI class, e.g. Font is actually accessed as GUI.Font.

  • Font class
  • Icons class
  • ColorPalette class
  • LongClickEvent class
  • IntermediateUpdateEvent class
  • EventQueue class
  • FunctionBar class
  • Keyboard class
  • Overlay class
  • Dialog class
    • OKDialog dialog
    • ErrorDialog dialog
    • WarningDialog dialog
    • YNDialog dialog
    • OKCancelDialog dialog
    • AskDialog dialog
    • CustomContentDialog dialog
  • NotificationMenu overlay
    • RecentAppSwitcher overlay
    • Selector overlay

GUI Components and Containers

  • Component class

The following classes are all Components, they inherit from that class.

  • Container component
  • AppContainer container
  • Button container
  • KeyboardButton container
  • TextEntryField container
  • PagedContainer container
    • GriddedPagedContainer container
    • ListedPagedContainer container
  • ButtonRow container
  • ScrollableContainer container
    • ListScrollableContainer container
    • TextScrollableContainer container
    • MultiLineTextEntryField container
  • Text component
  • MultiLineText component
  • ExpandingMultiLineText component
  • Image component
  • Slider component
  • Checkbox component
  • Switch component
  • Canvas component
  • ScrollIndicator component
Clone this wiki locally