XML:WMDD: Difference between revisions

From OniGalore
Jump to navigation Jump to search
m (ignore this)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{XML_File_Header | type=WMDD | prev=WMCL | next=WMM | name=Window Menu Dialog Data }}
{{XML_File_Header | prev=WMCL | type=WMDD | next=WMM | name=WM Dialog Data}}


==General information==
[[Image:Changed_Load_Menu.png|thumb|right]]
* The XML on this page is compatible with OniSplit '''v0.9.61.0'''.
* The "WM" in "WM Dialog Data" stands for "Window Manager", the name of the UI subsystem.
* WMDD files are global (level0_Final.dat).
* A WMDD file contains either a screen with controls (e.g. WMDDdialog_mainmenu) or a dialog with buttons (e.g. WMDDdialog_ChangeRestart).
* Open question: Does WMDDdialog_text_console define the size of "text consoles" as 460x410?
* Oni's out-of-game windows overlay each other. The parent window becomes visible if you remove the background (see image on right).


'''general information'''
==XML structure==
* The xml code on this page is compatible with onisplit '''v0.9.61.0'''
* WMDD file are global (AE/AEInstaller/vanilla/level0_Final.dat)
* A WMDD file contains either a page plus dialogs or a "pop-up" page like "WMDDdialog_ChangeRestart.xml" with dialogs.
* interfering WMDD ? : WMDDdialog_text_console.xml (might define size of "text consoles", there: 460x410)
* Oni's out-of-game windows are [http://wiki.oni2.net/File:Changed_Load_Menu.png overlaying.] The ''parent'' window becomes visible if you remove the background.
 
 
'''XML structure'''
  <?xml version="1.0" encoding="utf-8"?>
  <?xml version="1.0" encoding="utf-8"?>
  <Oni>
  <Oni>
Line 30: Line 30:
'''''[...]''''' means at least one WMDDControl block.
'''''[...]''''' means at least one WMDDControl block.


'''example'''
==Example==
 
<WMDDControl>
            '''<WMDDControl>'''
    <Text>Options</Text>
                <Text>Options</Text>
    <Class>Label</Class>
                <Class>Label</Class>
    <Id>0</Id>
                <Id>0</Id>
    <State>1</State>
                <State>1</State>
    <Style>1114112</Style>
                <Style>1114112</Style>
    <X>5</X>
                <X>5</X>
    <Y>10</Y>
                <Y>10</Y>
    <Width>70</Width>
                <Width>70</Width>
    <Height>20</Height>
                <Height>20</Height>
    <nowiki><Font></nowiki>
                <nowiki><Font></nowiki>
        <Family>TSFFTahoma</Family>
                    <Family>TSFFTahoma</Family>
        <Style>Bold</Style>
                    <Style>Bold</Style>
        <Color>255 127 0</Color>
                    <Color>255 127 0</Color>
        <Size>10</Size>
                    <Size>10</Size>
    <nowiki></Font></nowiki>
                <nowiki></Font></nowiki>
</WMDDControl>
            '''</WMDDControl>'''
 
* TXMB note:
: If you add <WMDDControl> blocks then don't add them under the <WMDDControl> block with TXMB or else your new blocks will be hidden.


* If you have a TXMB in your WMDD, don't put additional <WMDDControl> blocks under the block with the TXMB or your new blocks will be hidden.
* The block is always the same if <Text> contains "outline":
<Text>outline</Text>
<Class>Title</Class>
<Id>0</Id>
<State>5</State>
<Style>65536</Style>


* Always the same if <Text> contains "outline"
===Header===
                <Text>outline</Text>
                <Class>Title</Class>
                <Id>0</Id>
                <State>5</State>
                <Style>65536</Style>
 
 
 
===header===
{|class="wikitable" width="100%"
{|class="wikitable" width="100%"
!width=80px| XML tag
!width=80px| XML tag
!width=60px| type
!width=60px| Type
! flags and descriptions
! Flags and descriptions
|-
|-
| <nowiki><Caption></nowiki>
| <nowiki><Caption></nowiki>
Line 75: Line 69:
|<Id>
|<Id>
| int16
| int16
| page Id; page is looked up by exe
| page ID, looked up by the game application
|-
|-
|valign=top| <State>
|valign=top| <State>
Line 107: Line 101:
| <X>
| <X>
| int16
| int16
| align (in header always 0)
| align (always 0 in the header)
|-
|-
| <Y>
| <Y>
| int16
| int16
| align (in header always 0)
| align (always 0 in the header)
|-
|-
| <Width>
| <Width>
| int16
| int16
| X dimension (in header always 640 ?)
| X dimension (always 640 in the header?)
|-
|-
| <Height>
| <Height>
| int16
| int16
| Y dimension (in header always 480 ?)
| Y dimension (always 480 in the header?)
|}
|}


===<WMDDControl>===
===<WMDDControl>===
{|class="wikitable" width="100%"
{|class="wikitable" width="100%"
!width=80px| XML tag
!width=80px| XML tag
!width=60px| type
!width=60px| Type
! flags and descriptions
! Flags and descriptions
|-
|-
|valign=top|<Text>
|valign=top|<Text>
|valign=top| char[256]
|valign=top| char[256]
|
|
* can contain text
* Can contain text
* "outline" was always used by bungie for <Class>Title</Class> (it's invisible)
* "outline" was always used by Bungie West for <Class>Title</Class> (it's invisible)
* "WMM_''filename''"
* "WMM_''filename''"
|-
|-
Line 140: Line 133:
|
|
: Desktop (01 00)
: Desktop (01 00)
: Title (03 00)
: Title (03 00) ("groupbox" or "box" that groups elements together visually)
: Button (04 00) (button text like "OK" or "Close")
: Button (04 00) (button text like "OK" or "Close")
: Checkbox (05 00)
: Checkbox (05 00)
Line 148: Line 141:
: MenuBar (09 00)
: MenuBar (09 00)
: Menu (0A 00)
: Menu (0A 00)
: Image (0B 00) (TXMB / TXMP / PSpc)
: Image (0B 00) (a TXMB, TXMP or PSpc)
: Dropdown (0C 00) (WMM_ drop-down menu)
: Dropdown (0C 00) (WMM_ drop-down menu)
: ProgressBar (0D 00)
: ProgressBar (0D 00)
Line 154: Line 147:
: 16 (10 00) (scrollbar; not used in dialogs)
: 16 (10 00) (scrollbar; not used in dialogs)
: Slider (11 00)
: Slider (11 00)
: Label (14 00) (page caption; too low <Width> value forces line break)
: Label (14 00) (a <Width> value smaller than the text forces a linebreak) ("text")
|-
|-
| <Id>
| <Id>
| int16
| int16
| page Id; page is looked up by exe
| page ID, looked up by game application
|-
|-
|valign=top| <State>
|valign=top| <State>
Line 165: Line 158:
:1 (visible)
:1 (visible)
:2 (disabled)
:2 (disabled)
:4 (unknown, propably "change texture on click" (used by checkbox))
:4 (unknown, probably "change texture on click" (used by checkbox))
|-
|-
|valign=top| <Style>
|valign=top| <Style>
Line 179: Line 172:
: Center (00 00 01 00)
: Center (00 00 01 00)


 
====Control specific styles====
control specific styles
Groupbox/box:
 
if box:
: 131072 (00 00 02 00) (draw text background)
: 131072 (00 00 02 00) (draw text background)
: 262144 (00 00 04 00) (draw text)
: 262144 (00 00 04 00) (draw text)


if button:
Button:
: 65536 (00 00 01 00) (draw button)
: 65536 (00 00 01 00) (draw button)
: 131072 (00 00 02 00) (draw button text)
: 131072 (00 00 02 00) (draw button text)
: 524288 (00 00 08 00) (toggle button like the ones used "in game" for help, diary, etc.)
: 524288 (00 00 08 00) (toggle button, like the ones used in-game on the Help screen, Diary screen, etc.)
: 1048576 (00 00 10 00) (default button, it corresponds to the Enter key)
: 1048576 (00 00 10 00) (default button, triggered by the Enter key)


if checkbox:
Checkbox:
: 65536 (00 00 01 00) (draw label)
: 65536 (00 00 01 00) (draw label)


if radiobutton:
Radio button:
: 65536 (00 00 01 00) (draw label)
: 65536 (00 00 01 00) (draw label)


if edit field:
Edit field:
: 65536 (00 00 01 00) (number only)
: 65536 (00 00 01 00) (number only)


if listbox:
Listbox:
: 65536 (00 00 01 00) (draw scrollbar)
: 65536 (00 00 01 00) (draw scrollbar)
: 131072 (00 00 02 00) (alphabetical order)
: 131072 (00 00 02 00) (alphabetize items)
: 262144 (00 00 04 00) (unselecable)
: 262144 (00 00 04 00) (items are not selectable)
: 524288 (00 00 08 00) (contains text, without this it contains only "custom" data)
: 524288 (00 00 08 00) (contains text, without this it contains only "custom" data)
: 1048576 (00 00 10 00) (owner draw, the owner window will draw the list item)
: 1048576 (00 00 10 00) (owner window will draw the list item)
: 2097152 (00 00 20 00) (draw file/folder icons)
: 2097152 (00 00 20 00) (draw file/folder icons)


if picture:
Picture:
: 131072 (00 00 02 00) (ignore the picture name; the displayed picture is set at runtime)
: 131072 (00 00 02 00) (ignore the picture name; the displayed picture is set at runtime)


if popup menu:
Popup menu:
: 65536 (00 00 01 00) (use menu width; doesn't work)
: 65536 (00 00 01 00) (use menu width; doesn't work)
: 131072 (00 00 02 00) (ignore the menu name; the menu is set at runtime)
: 131072 (00 00 02 00) (ignore the menu name; the menu is set at runtime)
 
if text field:
: 131072 (00 00 02 00) (horizontal text align = center)
: 262144 (00 00 04 00) (horizontal text align = right)
: 1048576 (00 00 10 00) (vertical text align = center)
: 8388608 (00 00 80 00) (owner draw (hides text))


if text field:
Text field:
: 131072 (00 00 02 00) (horizontal text align = center)
: 131072 (00 00 02 00) (horizontally-centered text)
: 262144 (00 00 04 00) (horizontal text align = right)
: 262144 (00 00 04 00) (right-aligned text)
: 1048576 (00 00 10 00) (vertical text align = center)
: 1048576 (00 00 10 00) (vertically-centered text)
: 8388608 (00 00 80 00) (owner draw (hides text))
: 8388608 (00 00 80 00) (owner draw (hides text))
----
: 65536 (00 00 01 00)
: 131072 (00 00 02 00)
: 262144 (00 00 04 00)
: 524288 (00 00 08 00)
: 1048576 (00 00 10 00)
: 2097152 (00 00 20 00)
: 4194304 (00 00 40 00)
: 8388608 (00 00 80 00)
|-
|-
| <X>
| <X>
Line 248: Line 223:
| <Width>
| <Width>
| int16
| int16
| X dimention
| X dimension
|-
|-
| <Height>
| <Height>
| int16
| int16
| Y dimention
| Y dimension
|-
|-
| <Family>
| <Family>
Line 267: Line 242:
| <Color>
| <Color>
| color32
| color32
| R G B range, e.g. 255 127 0 (for orange)
| RGB range, e.g. 255 127 0 (for orange)
|-
|-
| <Size>
| <Size>

Latest revision as of 15:56, 9 October 2023

WMDD : WM Dialog Data
XML modding tips
  • See HERE to start learning about XML modding.
  • See HERE if you are searching for information on how to handle object coordinates.
  • See HERE for some typical modding errors and their causes.
XML.png
XML

WMCL << Other file types >> WMM

switch to OBD page

General information

Changed Load Menu.png
  • The XML on this page is compatible with OniSplit v0.9.61.0.
  • The "WM" in "WM Dialog Data" stands for "Window Manager", the name of the UI subsystem.
  • WMDD files are global (level0_Final.dat).
  • A WMDD file contains either a screen with controls (e.g. WMDDdialog_mainmenu) or a dialog with buttons (e.g. WMDDdialog_ChangeRestart).
  • Open question: Does WMDDdialog_text_console define the size of "text consoles" as 460x410?
  • Oni's out-of-game windows overlay each other. The parent window becomes visible if you remove the background (see image on right).

XML structure

<?xml version="1.0" encoding="utf-8"?>
<Oni>
   <WMDD id="0">
       <Caption>Options</Caption>
       <Id>152</Id>
       <State>Visible</State>
       <Style>Center</Style>
       <X>0</X>
       <Y>0</Y>
       <Width>640</Width>
       <Height>480</Height>
       <Controls>
           [...]
       </Controls>
   </Instance>
</Oni>

[...] means at least one WMDDControl block.

Example

<WMDDControl>
   <Text>Options</Text>
   <Class>Label</Class>
   <Id>0</Id>
   <State>1</State>
   <Style>1114112</Style>
   <X>5</X>
   <Y>10</Y>
   <Width>70</Width>
   <Height>20</Height>
   <Font>
       <Family>TSFFTahoma</Family>
       <Style>Bold</Style>
       <Color>255 127 0</Color>
       <Size>10</Size>
   </Font>
</WMDDControl>
  • If you have a TXMB in your WMDD, don't put additional <WMDDControl> blocks under the block with the TXMB or your new blocks will be hidden.
  • The block is always the same if <Text> contains "outline":
<Text>outline</Text>
<Class>Title</Class>
<Id>0</Id>
<State>5</State>
<Style>65536</Style>

Header

XML tag Type Flags and descriptions
<Caption> char[256] page name/title
<Id> int16 page ID, looked up by the game application
<State> flag
Visible
Disabled
State04
<Style> flag/int32
ThinBorder (01 00 00 00)
ThickBorder (02 00 00 00)
TitleBar (04 00 00 00)
Title (08 00 00 00)
CloseButton (10 00 00 00)
RestoreButton (20 00 00 00)
MinimizeButton (40 00 00 00)
Center (00 00 01 00)

65536 (00 00 01 00)
131072 (00 00 02 00)
262144 (00 00 04 00)
524288 (00 00 08 00)
1048576 (00 00 10 00)
2097152 (00 00 20 00)
4194304 (00 00 40 00)
8388608 (00 00 80 00)
<X> int16 align (always 0 in the header)
<Y> int16 align (always 0 in the header)
<Width> int16 X dimension (always 640 in the header?)
<Height> int16 Y dimension (always 480 in the header?)

<WMDDControl>

XML tag Type Flags and descriptions
<Text> char[256]
  • Can contain text
  • "outline" was always used by Bungie West for <Class>Title</Class> (it's invisible)
  • "WMM_filename"
<Class> flag
Desktop (01 00)
Title (03 00) ("groupbox" or "box" that groups elements together visually)
Button (04 00) (button text like "OK" or "Close")
Checkbox (05 00)
Dialog (06 00)
Textbox (07 00)
Listbox (08 00)
MenuBar (09 00)
Menu (0A 00)
Image (0B 00) (a TXMB, TXMP or PSpc)
Dropdown (0C 00) (WMM_ drop-down menu)
ProgressBar (0D 00)
RadioButton (0E 00)
16 (10 00) (scrollbar; not used in dialogs)
Slider (11 00)
Label (14 00) (a <Width> value smaller than the text forces a linebreak) ("text")
<Id> int16 page ID, looked up by game application
<State> flag
1 (visible)
2 (disabled)
4 (unknown, probably "change texture on click" (used by checkbox))
<Style> flag
ThinBorder (01 00 00 00)
ThickBorder (02 00 00 00)
TitleBar (04 00 00 00)
Title (08 00 00 00)
CloseButton (10 00 00 00)
RestoreButton (20 00 00 00)
MinimizeButton (40 00 00 00)
Center (00 00 01 00)

Control specific styles

Groupbox/box:

131072 (00 00 02 00) (draw text background)
262144 (00 00 04 00) (draw text)

Button:

65536 (00 00 01 00) (draw button)
131072 (00 00 02 00) (draw button text)
524288 (00 00 08 00) (toggle button, like the ones used in-game on the Help screen, Diary screen, etc.)
1048576 (00 00 10 00) (default button, triggered by the Enter key)

Checkbox:

65536 (00 00 01 00) (draw label)

Radio button:

65536 (00 00 01 00) (draw label)

Edit field:

65536 (00 00 01 00) (number only)

Listbox:

65536 (00 00 01 00) (draw scrollbar)
131072 (00 00 02 00) (alphabetize items)
262144 (00 00 04 00) (items are not selectable)
524288 (00 00 08 00) (contains text, without this it contains only "custom" data)
1048576 (00 00 10 00) (owner window will draw the list item)
2097152 (00 00 20 00) (draw file/folder icons)

Picture:

131072 (00 00 02 00) (ignore the picture name; the displayed picture is set at runtime)

Popup menu:

65536 (00 00 01 00) (use menu width; doesn't work)
131072 (00 00 02 00) (ignore the menu name; the menu is set at runtime)

Text field:

131072 (00 00 02 00) (horizontally-centered text)
262144 (00 00 04 00) (right-aligned text)
1048576 (00 00 10 00) (vertically-centered text)
8388608 (00 00 80 00) (owner draw (hides text))
<X> int16 align (relative to the top left corner of the window)
<Y> int16 align (relative to the top left corner of the window)
<Width> int16 X dimension
<Height> int16 Y dimension
<Family> link32 link to TSFF, usually "TSFFTahoma"
<Style> flag
Normal (00 00 00 00)
Bold (01 00 00 00)
Italic (02 00 00 00)
<Color> color32 RGB range, e.g. 255 127 0 (for orange)
<Size> int16 font size is usually 10; 7 for "<Text>outline</Text>"