OBD:WMDD: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(design)
m (changed family)
 
(21 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{OBD_File_Header|align=center|type=WMDD|prev=WMCL|next=WMM_|name=WM (Window Menu) Dialog Data|family=Global}}
{{OBD_File_Header|align=center|type=WMDD|prev=WMCL|next=WMM_|name=WM (WindowManager) Dialog Data|family=Interface}}




Line 5: Line 5:




[[image:wmdd_all.gif]]
[[Image:wmdd_all.gif]]




Line 13: Line 13:
{{OBDtr| 0x000 | res_id  |FF0000| 01 CE 09 00 | 1541 | 01541-dialog_mainmenu.WMDD }}
{{OBDtr| 0x000 | res_id  |FF0000| 01 CE 09 00 | 1541 | 01541-dialog_mainmenu.WMDD }}
{{OBDtr| 0x004 | lev_id  |FFFF00| 01 00 00 00 | 0    | level 0 }}
{{OBDtr| 0x004 | lev_id  |FFFF00| 01 00 00 00 | 0    | level 0 }}
{{OBDtr2| 0x008| char[256]|00FF00| Main Menu          | title of the dialog }}
{{OBDtr2| 0x008| char[256]|00FF00| Main Menu          | title }}
{{OBDtr| 0x108 | int32   |00FFFF| 96 00 00 00 | 150  | dialog ID (looked up by engine) }}
{{OBDtr| 0x108 | int16   |00FFFF| 96 00       | 150  | ID (looked up from code) }}
{{OBDtr| 0x10C | int32   |FF00FF| 01 00 00 00 | 1   | window status flag; the following flags are possible (values in dec):
{{OBDtr| 0x10A | int16   |00FFFF| 00 00       | 0   | not used; always 0 }}
 
{{OBDtr| 0x10C | int32   |FF00FF| 01 00 00 00 | 0x01 | state; the following values are used:
 
:0x'''01''' 00 00 00 - visible
0 - hide the window (if you use that, you'll get a black screen and the orange mouse cursor; that means you can't quit Oni, so you have to reset your computer)
:0x'''02''' 00 00 00 - disabled
 
:0x'''04''' 00 00 00 - unknown
1 - show the window
 
2 - grey title (normaly it's black) + window fixed (you can't move the window)
 
4 - window fixed (you can't move the window)
 
 
}}
{{OBDtr| 0x110 | int16   |FF8000| 00 00       | 0    | window design; it's a bitset; the following designs are possible (values in dec):
 
 
0 - nothing
 
1 - thin light blue border around the window
 
2 -  thick light lila border around the window
 
4 -  light lila title bar
 
8 -  title (title bar required)
 
16 -  "close"-button (title bar required)
 
32 -  "restore"-button (title bar required)
 
64 - "minimize"-button (title bar required)
 
 
}}
}}
{{OBDtr| 0x112 | int16   |FF0080| 01 00       | 1    | window position; the following positions are possible (values in dec):
{{OBDtr| 0x110 | int32   |FF8000| 00 00 01 00 | 0x00010000  | style; the following values are used:
 
:0x'''01''' 00 00 00 - draw default background
 
:0x'''02''' 00 00 00 - resizable window (has a thick border)
0 - the window is located in the upper left corner of the screen
:0x'''04''' 00 00 00 - show title bar
 
:0x'''08''' 00 00 00 - show title (title bar required)
1 - the window is located in the center of the screen
:0x'''10''' 00 00 00 - show close button (title bar required)
 
:0x'''20''' 00 00 00 - show restore button (title bar required)
 
:0x'''40''' 00 00 00 - show minimize button (title bar required)
:0x00 00 '''01''' 00 - center window on screen (x, y coordinates are ignore when this style is used)
}}
}}
{{OBDtr| 0x114 | int32   |804080| 00 00 00 00 | 0    | unknown; always zero }}
{{OBDtr| 0x114 | int16   |804080| 00 00       | 0    | x coordinate of the window }}
{{OBDtr| 0x116 | int16    |804080| 00 00       | 0    | y coordinate of the window }}
{{OBDtr| 0x118 | int16    |804040| 80 02      | 640  | width of the window }}
{{OBDtr| 0x118 | int16    |804040| 80 02      | 640  | width of the window }}
{{OBDtr| 0x11A | int16    |804040| E0 01      | 480  | height of the window }}
{{OBDtr| 0x11A | int16    |804040| E0 01      | 480  | height of the window }}
{{OBDtr| 0x11C | int32    |408080| 06 00 00 00 | 6    | array size }}
{{OBDtr| 0x11C | int32    |408080| 06 00 00 00 | 6    | array size }}
{{OBDtrBK}}
{{OBDtrBK}}
{{OBDtr2| 0x000 | char[256]|FFC8C8| New Game | item text (or TXMB/TXMP name if class is 11) }}
{{OBDtr2| 0x000 | char[256]|FFC8C8| New Game | text or:
{{OBDtr| 0x100 | int16    |FFFFC8| 04 00 | 4 | item type/class; the following types/classes are used (values in dec):
:*TXMB/TXMP/PSpc name if class is picture
:*WMM_ name if class is popup menu
}}
{{OBDtr| 0x100 | int16    |FFFFC8| 04 00 | 4 | class; the following window classes exist in Oni (values in dec):
:1 - desktop (not used in dialogs)
:3 - box (<nowiki>=</nowiki> groupbox) (groups controls together within a border; called Title in OniSplit XML)
:4 - button
:5 - checkbox
:6 - dialog (not used in dialogs)
:7 - edit field
:8 - listbox
:9 - menu bar (not used in dialogs)
:10 - menu (not used in dialogs)
:11 - picture ([[OBD:TXMB|TXMB]], [[OBD:TXMP|TXMP]] or [[OBD:PSpc|PSpc]])
:12 - popup menu (<nowiki>=</nowiki> pulldown menu <nowiki>=</nowiki> drop-down menu) ([[OBD:WMM_|WMM_]])
:13 - progress bar
:14 - radio button
:16 - scrollbar (not used in dialogs)
:17 - slider
:20 - text (simple text string; called Label in OniSplit XML)
}}
{{OBDtr| 0x102 | int16    |C8FFC8| 64 00      | 100              | ID (looked up from code) }}
{{OBDtr| 0x104 | int32    |C8FFFF| 01 00 00 00 | 0x01            | state; the following values are used:
:0x'''01''' 00 00 00 -  visible
:0x'''02''' 00 00 00 -  disabled
:0x'''04''' 00 00 00 -  unknown
}}
{{OBDtr| 0x108 | int32    |FFC800| 00 00 03 00 | 0x030000          | style; the dialog styles above (at 0x110) and the following control specific styles can be used here:
if box:
:0x00 00 '''02''' 00 - draw text background
:0x00 00 '''04''' 00 - draw text


if button:
:0x00 00 '''01''' 00 -  draw button
:0x00 00 '''02''' 00 -  draw button text
:0x00 00 '''08''' 00 -  toggle button (like the ones used "in game" for help, diary etc.)
:0x00 00 '''10''' 00 -  default button (the button that coresponds to the Enter key)


3 - title
if checkbox:
:0x00 00 '''01''' 00 - draw label


4 - button
if radiobutton:
:0x00 00 '''01''' 00 - draw label


5 - checkbox
if edit field:
:0x00 00 '''01''' 00 - number only


7 edit field
if listbox:
:0x00 00 '''01''' 00 draw scrollbar
:0x00 00 '''02''' 00 -  alphabetical order
:0x00 00 '''04''' 00 -  unselectable
:0x00 00 '''08''' 00 -  contains text (without this it contains only "custom" data)
:0x00 00 '''10''' 00 -  owner draw (the owner window will draw the list items)
:0x00 00 '''20''' 00 -  draw file/folder icons


8 - listbox
if picture:
:0x00 00 '''02''' 00 - ignore the picture name; the displayed picture is set at runtime


11 -  background picture ([[OBD:TXMB|TXMB]]) or texture ([[OBD:TXMP|TXMP]])
if popup menu
 
:0x00 00 '''01''' 00 - use menu width; doesn't work
12 -  pull-down menu
:0x00 00 '''02''' 00 - ignore the menu name; the menu is set at runtime
 
13 -  progress bar
 
14 -  radio button
 
17 -  slider
 
20 -  text only
 
 
}}
{{OBDtr| 0x102 | int16    |C8FFC8| 64 00       | 100              | item ID (see below) }}
{{OBDtr| 0x104 | int16    |C8FFFF| 01 00       | 1                | item option; it's a bitset; the following options are used (values in dec):
 
 
0 - nothing
 
1 -  show active item (item is enabled)
 
2 -  show inactive item (needs "show item"; item is disabled)
 
4 -  disable item (needs "show item"; item is disabled)


if text field:
:0x00 00 '''02''' 00 -  horizontal text align <nowiki>=</nowiki> center
:0x00 00 '''04''' 00 -  horizontal text align <nowiki>=</nowiki> right
:0x00 00 '''10''' 00 -  vertical text align <nowiki>=</nowiki> center
:0x00 00 '''80''' 00 -  owner draw (hides text)


}}
}}
{{OBDtr| 0x106 | int16    |FFC8FF| 00 00      | 0                | item style flags (same as above + 0x00020000 : show text) }}
{{OBDtr| 0x10C | int16    |C87C64| 5E 01      | 350              | x coordinate (relative to the top left corner of the window) }}
{{OBDtr| 0x108 | int16    |FFC800| 00 00      | 0                | window design (see above) }}
{{OBDtr| 0x10E | int16    |C87C64| E6 00      | 230              | y coordinate (relative to the top left corner of the window) }}
{{OBDtr| 0x10A | int16    |C800C8| 03 00      | 3                | visible option; it's a bitset; the following options are used (values in dec):
{{OBDtr| 0x110 | int16    |B0C3D4| B4 00      | 180              | width }}
 
{{OBDtr| 0x112 | int16    |B0C3D4| 28 00      | 40              | height }}
 
{{OBDtr| 0x114 | link32  |E7CEA5| 01 02 00 00 | 2                | link to 00002-Tahoma.[[OBD:TSFF|TSFF]]}}
0 -  nothing
 
1 -  show button/scrollbar/checkbox text
 
2 -  show button text
 
4 -  show title
 
8 -  show listbox entries
 
 
notes: needs more investigation; they aren't 100% correct; 16 = show text }}
{{OBDtr| 0x10C | int16    |C87C64| 5E 01      | 350              | x-position of the item (from the upper left corner of the window) }}
{{OBDtr| 0x10E | int16    |C87C64| E6 00      | 230              | y-position of the item (from the upper left corner of the window) }}
{{OBDtr| 0x110 | int16    |B0C3D4| B4 00      | 180              | x-dimension of the item (width) }}
{{OBDtr| 0x112 | int16    |B0C3D4| 28 00      | 40              | x-dimension of the item (height) }}
{{OBDtr| 0x114 | link    |E7CEA5| 01 02 00 00 | 2                | link to 00002-Tahoma.[[OBD:TSFF|TSFF]]}}
{{OBDtr| 0x118 | int32    |FFDDDD| 01 00 00 00 | 1                | font option; the following options are possible:
{{OBDtr| 0x118 | int32    |FFDDDD| 01 00 00 00 | 1                | font option; the following options are possible:
 
:0 - normal font
 
:1 - '''bold''' font
0 - normal font
:2 - ''italic'' font
 
1 - '''bold''' font
 
2 - ''italic'' font
 
 
}}
}}
{{OBDtr| 0x11C | color32   |64AAAA| 00 7F FF FF | 0, 127, 255; 255 | font color (blue, green, red); transparency }}
{{OBDtr| 0x11C | color32   |64AAAA| 00 7F FF FF | 0, 127, 255; 255 | font color (blue, green, red); transparency }}
{{OBDtr| 0x120 | int16    |EBEBEB| 01 00       | 1               | font x-size (unused by Oni?) }}
{{OBDtr| 0x120 | int8      |EBEBEB| 01         | 1                | ignored }}
{{OBDtr| 0x122 | int16   |8C8CCC| 0A 00      | 10              | font y-size (read by DCrText_SetFontInfo) }}
{{OBDtr| 0x121 | int8      |EBEBEB| 00         | 0               | ignored }}
{{OBDtr| 0x122 | int16     |8C8CCC| 0A 00      | 10              | font size (height) }}
|}
|}


Line 146: Line 126:
;Dialog ID
;Dialog ID
:Since Oni looks dialogs up by ID, changing them arbitrarily is not recommended.
:Since Oni looks dialogs up by ID, changing them arbitrarily is not recommended.
;Show/hide flag (0x10C)
;Visible flag (0x10C)
:A hidded/disabled window can't be activated from Oni, so if you hide the main menu, you'll have to shut down Oni from the Task Manager (or make it Blam ^^).
:A hidden/disabled window can't be activated from Oni, so if you hide the main menu, you'll have to shut down Oni from the Task Manager (or make it Blam ^^).
:With "-noswitch", you can switch to other applications whenever the mouse pointer is visible in Oni.
:With "-noswitch", you can switch to other applications whenever the mouse pointer is visible in Oni.
;Item IDs (for this example)
;Item IDs (for this example)
Line 157: Line 137:




{{OBD_File_Footer|align=center|type=WMDD|prev=WMCL|next=WMM_|name=WM (Window Menu) Dialog Data|family=Global}}
{{OBD_File_Footer|align=center|type=WMDD|prev=WMCL|next=WMM_|name=WM (WindowManager) Dialog Data|family=Interface}}
 
{{OBD}}

Latest revision as of 01:48, 7 December 2023

ONI BINARY DATA
WMCL << Other file types >> WMM_
WMDD : WM (WindowManager) Dialog Data
switch to XML:WMDD page
Overview @ Oni Stuff
OBD.png


The image below shows the beginning of the file with the settings of the main window.


Wmdd all.gif


Offset Type Raw Hex Value Description
0x000 res_id 01 CE 09 00 1541 01541-dialog_mainmenu.WMDD
0x004 lev_id 01 00 00 00 0 level 0
0x008 char[256] Main Menu title
0x108 int16 96 00 150 ID (looked up from code)
0x10A int16 00 00 0 not used; always 0
0x10C int32 01 00 00 00 0x01 state; the following values are used:
0x01 00 00 00 - visible
0x02 00 00 00 - disabled
0x04 00 00 00 - unknown
0x110 int32 00 00 01 00 0x00010000 style; the following values are used:
0x01 00 00 00 - draw default background
0x02 00 00 00 - resizable window (has a thick border)
0x04 00 00 00 - show title bar
0x08 00 00 00 - show title (title bar required)
0x10 00 00 00 - show close button (title bar required)
0x20 00 00 00 - show restore button (title bar required)
0x40 00 00 00 - show minimize button (title bar required)
0x00 00 01 00 - center window on screen (x, y coordinates are ignore when this style is used)
0x114 int16 00 00 0 x coordinate of the window
0x116 int16 00 00 0 y coordinate of the window
0x118 int16 80 02 640 width of the window
0x11A int16 E0 01 480 height of the window
0x11C int32 06 00 00 00 6 array size
First element (black outline)
0x000 char[256] New Game text or:
  • TXMB/TXMP/PSpc name if class is picture
  • WMM_ name if class is popup menu
0x100 int16 04 00 4 class; the following window classes exist in Oni (values in dec):
1 - desktop (not used in dialogs)
3 - box (= groupbox) (groups controls together within a border; called Title in OniSplit XML)
4 - button
5 - checkbox
6 - dialog (not used in dialogs)
7 - edit field
8 - listbox
9 - menu bar (not used in dialogs)
10 - menu (not used in dialogs)
11 - picture (TXMB, TXMP or PSpc)
12 - popup menu (= pulldown menu = drop-down menu) (WMM_)
13 - progress bar
14 - radio button
16 - scrollbar (not used in dialogs)
17 - slider
20 - text (simple text string; called Label in OniSplit XML)
0x102 int16 64 00 100 ID (looked up from code)
0x104 int32 01 00 00 00 0x01 state; the following values are used:
0x01 00 00 00 - visible
0x02 00 00 00 - disabled
0x04 00 00 00 - unknown
0x108 int32 00 00 03 00 0x030000 style; the dialog styles above (at 0x110) and the following control specific styles can be used here:

if box:

0x00 00 02 00 - draw text background
0x00 00 04 00 - draw text

if button:

0x00 00 01 00 - draw button
0x00 00 02 00 - draw button text
0x00 00 08 00 - toggle button (like the ones used "in game" for help, diary etc.)
0x00 00 10 00 - default button (the button that coresponds to the Enter key)

if checkbox:

0x00 00 01 00 - draw label

if radiobutton:

0x00 00 01 00 - draw label

if edit field:

0x00 00 01 00 - number only

if listbox:

0x00 00 01 00 - draw scrollbar
0x00 00 02 00 - alphabetical order
0x00 00 04 00 - unselectable
0x00 00 08 00 - contains text (without this it contains only "custom" data)
0x00 00 10 00 - owner draw (the owner window will draw the list items)
0x00 00 20 00 - draw file/folder icons

if picture:

0x00 00 02 00 - ignore the picture name; the displayed picture is set at runtime

if popup menu

0x00 00 01 00 - use menu width; doesn't work
0x00 00 02 00 - ignore the menu name; the menu is set at runtime

if text field:

0x00 00 02 00 - horizontal text align = center
0x00 00 04 00 - horizontal text align = right
0x00 00 10 00 - vertical text align = center
0x00 00 80 00 - owner draw (hides text)


0x10C int16 5E 01 350 x coordinate (relative to the top left corner of the window)
0x10E int16 E6 00 230 y coordinate (relative to the top left corner of the window)
0x110 int16 B4 00 180 width
0x112 int16 28 00 40 height
0x114 link32 01 02 00 00 2 link to 00002-Tahoma.TSFF
0x118 int32 01 00 00 00 1 font option; the following options are possible:
0 - normal font
1 - bold font
2 - italic font
0x11C color32 00 7F FF FF 0, 127, 255; 255 font color (blue, green, red); transparency
0x120 int8 01 1 ignored
0x121 int8 00 0 ignored
0x122 int16 0A 00 10 font size (height)


Dialog ID
Since Oni looks dialogs up by ID, changing them arbitrarily is not recommended.
Visible flag (0x10C)
A hidden/disabled window can't be activated from Oni, so if you hide the main menu, you'll have to shut down Oni from the Task Manager (or make it Blam ^^).
With "-noswitch", you can switch to other applications whenever the mouse pointer is visible in Oni.
Item IDs (for this example)
64 - "new game" window
65 - "load game" window
66 - "options" window
67 - "quit" window
68 - "resume" window


ONI BINARY DATA
WMCL << Other file types >> WMM_
WMDD : WM (WindowManager) Dialog Data
Interface file