Translations of this page:

This is an old revision of the document!
—-

12.1. Window Editor

Okay. Before we dive deep into Window Editor, let's say, that there're still a few things which we need to tweak as this tool is very young. One of the things which can seem impractical is the absence of the default blank template when you add new window through Project Manager. This is an easy fix, so download this file: blank.zip and unpack it into your WME dev kit directory to the folder templates\window (so you have there now two folders - question and blank).

Okay. Now when we've done our homework, let's return to our task and add a new window in the project manager to the folder interface. Right click the folder and choose Add Window:

And select template blank plus name the window Test:

Now see, that two files were added to the tree - Test.window and Test.script. It's actually the contents of the template folder, more on that in the templates chapter. Double click on the test.window to launch our new tool - Window Edit.

In the section 1 we can see the tree filled with components of our brand new window. As soon as we select one of the component, our property grid at the section 2 updates and we see the parameters which influence the selected component. Let's hilight now our Test (Blank) item and see what can we do to our window:

1. General

  • Name - is the name of the window for further script referencing.

2. Behavior

  • Scripts - every window can have scripts attached to it (similary to entities) which define window's behavior.
  • ParentNotify - if you click inside the window you can set ParentNotify to true, which makes the parent container to get the input as well. This would be extremely useful for buttons for example, because you can have one script attached to window handling all buttons at one place. More about this later.
  • Transparent - (true) means that window doesn't capture mouse clicks. They got through. Such window is only for decoration purposes (for example health-bar).
  • Menu - (true) defines that the window hides if you click outside of the window.
  • InGame - (true) means that the window is a part of the scene rather then stay on top. By default your inventory and other gui is painted the last which overlaps the scene, but you might need sometimes windows as a part of a scene (puzzles, etc.) and the behavior of them overlapping the inventory box for example is not wanted.
  • PauseMusic - Before I'll explain this, let me tell you, that you can display your windows in three ways - normally, exclusively and system exclusively. Normally means, that the window is just displayed, but the game life goes on. Exclusive means that until the window is closed, it's the only object you can interact with and System Exclusive means that game is paused (all daemons etc.) and until you close the window, game is suspended. PauseMusic (true) means that the music will be also paused in the System Exclusive mode.

3. Layout

  • X - X (horizontal) position on the screen.
  • Y - Y (vertical) position on the screen.
  • Width, Height - dimensions of the window.
  • Title Rectangle - the area meant for displaying window caption (if any).
  • Drag Rectangle - the area where you can drag your window for moving it around if needed.


 
wmebook/ch12_1.1198235673.txt.gz · Last modified: 2007/12/21 12:14 by metamorphium
Recent changes RSS feed Creative Commons License Driven by DokuWiki