mohaa-spearhead-sdk/docs/MOH GUI Documentation.html
2003-02-06 00:00:00 +00:00

131 lines
No EOL
4.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head>
<title>MOHAA - SDK</title>
</head>
<body>
<b><u><font size=+2>GUI Documentation</font></u></b>
<br>
<br>
<p>
DlgEdit This is the editor that allows you to create GUIs for the game. Right click the on the window to bring up the Menu Properties dialog. Heres a description of the fields:
</p>
<ul>
<li>Menu Name: The name of the menu that you will reference it by in the game.
<li>Motion Direction: This is the direction that the menu will appear from when toggled in the game. Choices are NONE (Default), FROM_TOP, FROM_BOTTOM, FROM_LEFT, and FROM_RIGHT.
<li>Time: This is the amount of time the menu takes to appear or disappear when toggled.
<li>General Commands: You can add any of the appropriate layout commands mentioned below.
</ul>
<p><center>
<img src="MOH GUI Documentation/1-1.jpg">
</center></p>
<p>
To create a widget, just click the LMB anywhere in the background and drag out a region. This will define the frame of the widget. Double click in the frame of that widget to bring up the Widget Properties Dialog. Heres a description of the fields:
</p>
<Table cellspacing="3" cellpadding="3" border=0 align=center width=100%>
<tr>
<td>
<img src="MOH GUI Documentation/1-2.jpg">
</td>
<td>
<ul>
<li>Name - Internal name of the widget. This really isnt used much in the game and was added (just in case we need it).
<li>Class - Defines the class of the widget (Button, Label, List, etc…).
<li>Title Title to be displayed for labels, buttons, etc..
<li>Cmd Stuff command to be put into the command buffer when the widget is activated (i.e. button is pressed).
<li>Cvar Name of the cvar to link this widget with. If the value of the widget changes, then this cvar will be updated with the appropriate value.
<li>Border Style of the border of the widget.
<li>BGColor Background color of the widget.
<li>BGAlpha Background alpha of the widget.
<li>FGColor Foreground color of the widget.
<li>FGAlpha Foreground alpha of the widget.
<li>Position Position of the widget ( x,y,width,height).
<li>Class specific attributes Extra information that applies to the widget. See the list of layout commands below.
</ul>
</td>
</tr>
</table>
<br>
<br>
<Table cellspacing="3" cellpadding="3" border=1>
<tr>
<td>align &lt;left&gt; &lt;right&gt; &lt;top&gt; &lt;bottom&gt;
<td>Aligns the widget to the specified directions (resolution independent)
</tr>
<tr>
<td>shader &lt;shadername&gt;
<td>Sets the shader of the widget. This will be drawn stretched in the widget
</tr>
<tr>
<td>tileshader &lt;shadername&gt;
<td>Sets the shader of the widget. This will be drawn tiled in the widget
</tr>
<tr>
<td>hovershader &lt;shadername&gt;
<td>Sets the shader that will be drawn when the mouse is hovering over the widget
</tr>
<tr>
<td>additem &lt;item&gt;
<td>Adds the specified item to a list or listbox widget
</tr>
<tr>
<td>setrange &lt;min&gt; &lt;max&gt;
<td>Sets the range of the slider from min to max
</tr>
<tr>
<td>direction &lt;from_left | from_right | from_top | from_bottom&gt;
<td>Sets the direction of the shader when it appears on the screen. It will scroll in from that direction over time
</tr>
<tr>
<td>slidertype &lt;integer | float&gt;
<td>Sets the type of the slider to either integral or floating value
</tr>
<tr>
<td>fadein &lt;time&gt;
<td>Makes the widget fade in over the specified time
</tr>
<tr>
<td>stopsound &lt;soundname&gt;
<td>Plays the sound specified when the widget stops moving
</tr>
<tr>
<td>clicksound &lt;soundname&gt;
<td>Plays the sound specified when the widget is clicked
</tr>
<tr>
<td>stretch &lt; horizontal | vertical &gt;
<td>Stretch the widget horizontally or vertically across the whole screen (resolution independent )
</tr>
<tr>
<td>initdata &lt;data&gt;
<td>Initializes the widget to data (used for sliders)
</tr>
<tr>
<td>sliderstep &lt;stepsize&gt;
<td>Sets the stepsize for the slider
</tr>
</table>
</body>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</p>
<pre>
<i><font color=blue>
</font>
</i>
</pre>