Copyright (c) Hyperion Entertainment and contributors.
Difference between revisions of "BOOPSI Popup Menus - Part 3"
Simon Archer (talk | contribs) |
Simon Archer (talk | contribs) |
||
Line 15: | Line 15: | ||
= A Closer Look = |
= A Closer Look = |
||
+ | As an example of this, we shall use the Calculator utility. Calculator has two modes, and each of these has a separate UniqueID, this means that we can actually save the position and size for each mode. |
Revision as of 15:11, 13 October 2013
Contents
Author
Simon Archer
Copyright (c) 2011 Simon Archer
Used by Permission
Introduction
In parts one and two, we took a look at the new "popup" menu feature of window.class and what extra items could be added and how to deal with them. Since then, some extra features have been added which allows Snapshotting and Unsnapshotting of window.class objects. This will require at least version 53.54, and will be subject to a future update. For now, we shall discover how this feature is used in readiness for that update.
Overview
As we saw in part one, there are a number of "default" items we can show in the menu, and we can add items for our own use. We can also enable an automatic way to save window size and position. In order to do this, we need to specify the WINDOW_UniqueID tag. While this tag is not directly connected with the windows popup menu, it does affect the menu and the amount of default items. WINDOW_UniqueID tells window.class that this object has a name, specified by the tag data. This should be a unique name within your application. It is highly possible that your application may open more than one window, and each may have their size and position saved separately by ensuring the string you supply is unique. For example, specifying "MAIN_Window" as the UniqueID for the main window, and "LIST_Window" for another will allow your users to specify different positions and sizes for each window object.
A Closer Look
As an example of this, we shall use the Calculator utility. Calculator has two modes, and each of these has a separate UniqueID, this means that we can actually save the position and size for each mode.