ImmersionUI
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.
Wiki and documentation by Adam Furman. Find an error or have a suggestion? Send it to furmada (at) gmail dot com.
Documentation
-
Application
class -
ApplicationList
class -
Notification
class-
PermanentNotification
class
-
-
NotificationQueue
class -
DataStore
class -
ImmersionUI
class
-
State
class
-
GUI
class
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
-
-
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