Changes between Version 2 and Version 3 of Internals
- Timestamp:
- 03/06/09 07:34:05 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internals
v2 v3 1 1 = Internals = 2 3 This page will try to explain how CortUI is implemented. As such, it should be only relevant to those working on CortUI. If you just want to use it for Allegiance, you shouldn't have to read it. 2 4 3 5 == MDL files == 4 6 7 CortUI and the HUDs are a modification of various MDL text files of Allegiance. Therefore, understanding the language used is very essential. [http://cortui.rtsquad.org/download/Ksero's_MDL_Language_Documentation.zip Ksero's MDL documentation] is compulsory reading. The language documentation explains the syntax and the reference is very useful during development, because it lists the parameters to all the functions and what they do. 8 9 The rest of this page assumes you have read and understood the introduction and have the reference ready for lookup. 10 11 It is very important that you understand that MDL is more of a functional/descriptive language. It is quite unlike the imperative programming langauges you might know. It is not possible in MDL to say "do this, then do that". You merely construct a ruleset on how the Allegiance client is supposed to build up the UI. There is no way to actually store data over time and there is no way to tell it how to behave that hasn't been prepared by the developers. 12 5 13 == The dialogs variable == 14 15 The core of the modification can be found in the `dialog.mdl` file. It defines one variable, called `dialogs`, which defines the whole in-game UI. 16 17 It defines a list of pairs. Each pair represents one pane that will appear on the UI at certain times. Each pair consists of the following elements: 18 19 || '''Name''' || '''Type''' || '''Description''' || 20 || image || a variable defined above || the image to display || 21 || side || one of the `Side*` constants || defines to which point the coordinates are given relative to || 22 || off point || an XY-coordinate pair || the coordinates of the pane when it is not shown (used for animation) || 23 || on point || an XY-coordinate pair || the coordinates of the pane when it is shown || 24 || transition time || float || the transition time from off point to on point or the back when the pane is shown/hidden || 25 || console mode || integer / bitfield || the context in which to show the pane || 26 || undetectable || boolean || whether clicks on the pane are detected and handled || 27 28 Some more documentation can be found in the modified `dialog.mdl`. In particular, it contains a list of all the `Side*` constants and the meaning of the bits used in the `console mode` bitfield. 29 30 CortUI consists of a modification of this `dialogs` list and various changes of the pane definitions, which in turn depend on the values set in `cortui_settings.mdl`. 6 31 7 32 == The installer ==
