User Interface
Last changed: Eiji - 06/12/2008 - 1:19 PM

.

I will post some pictures soon, however...

=Basics

The user interface is driven by a series of XML files. Other programs that work similarly include EverQuest 1+2, World of Warcraft, Second Life, and others. The XML files bind against a model. The model provides the data.

The basic primitives as it stands right now are:

* Rectangle (plain or labeled)

* Arc

* Circle

* Text Collection (chat window/tab)

* Image or Image Set (animation)

* Scrollable region

* Line

Each UI element has six states:

* Normal

* Active

* Selected

* Disabled

* Active Selected

* Disabled Selected

Elements can be:

* sizeable horizontally

* sizeable vertically

* moveable

* locked

* any combination of the above, excluding moveable and locked (which are obviously mutually exclusive)

* resizable elements require eight border "pieces"

Not all of these states may be valid for each object.

Objects can communicate using channels. For example, when you click on "General Chat," it will communicate on a channel that the chat filter should be set to "general chat." Additionally, it's selection state can be mutually exclusive with other rectangles in the same container. This allows it to enable/disable.

There are four blocks that have to be provided to draw target indicators:

* Single/Prime target indicator

* Secondary target indicator (area effect and multiple-target weapons will use secondary target indicators to indicate additional targets)

* Allied target indicator

* Allied secondary target indicator

Note

UI is loaded from an Open Packaging Convention file; the file is copied to the skins directory. The UI does not need to be unpacked.

Colors are loaded via a color-table, and images/image sets are loaded via an image table. There may be multiple pairs of color and image tables, and these are selectable via the UI. Hence a single UI file may provide multiple color/style themes (it is common that theme providers in other games provide multiple colors, etc. and so I am designing to that).

Note that in general, things are designed such that the server provides the model, and the UI renders against the model. The goal behind that is that changes to the model (adding more slots, skills, etc.) should not require changing the UI file. The two should be adequately isolated that the program "just works" for most theme changes.