Difference between revisions of "Widget Manager"
Line 1: | Line 1: | ||
The window manager is a major subsystem in PowerUI. It creates self contained UI's, each called a window, which can be opened via a [[Windows (Web API)|web API]] or via the [[Window Protocol|window:// protocol]]. | The window manager is a major subsystem in PowerUI. It creates self contained UI's, each called a window, which can be opened via a [[Windows (Web API)|web API]] or via the [[Window Protocol|window:// protocol]]. | ||
+ | |||
+ | == Parameters == | ||
+ | |||
+ | You'll find that it's very often useful to pass some extra information to an opening window. For example, maybe you have a window which asks the player to type in a number of items between some given range. It can be done with both the [[Window Protocol|window:// protocol]] and the [[Windows (Web API)|web API]]; both have the same outcome. See their wiki pages for more information on how to do it in each specific case. | ||
+ | |||
+ | The parameters are made available to the template ''and'' to any scripts inside your content as JavaScript variables. | ||
== Scope == | == Scope == |
Revision as of 10:19, 14 January 2017
The window manager is a major subsystem in PowerUI. It creates self contained UI's, each called a window, which can be opened via a web API or via the window:// protocol.
Parameters
You'll find that it's very often useful to pass some extra information to an opening window. For example, maybe you have a window which asks the player to type in a number of items between some given range. It can be done with both the window:// protocol and the web API; both have the same outcome. See their wiki pages for more information on how to do it in each specific case.
The parameters are made available to the template and to any scripts inside your content as JavaScript variables.
Scope
The window manager is used for more than just typical "window" - it's designed to be used to describe any kind of self contained widget or component of a UI. For example, the dialogue system uses it to display speech and every context menu is also a window. Screen fading is also a more abstract use of the window system.
Templates
The visual appearance of a window is described by a window template. PowerUI has a few built in templates for different kinds of window. Ideally these templates can be shared or sold to maximize the value of the window manager.