1
0
forked from 0ad/0ad
0ad/binaries/data/mods/public/gui/session/manual.xml
Ykkrosh f0d9806b3f # Restructured GUI implementation
CGUI now represents a single 'page'. CGUIManager maintains multiple
pages and switches between them.
Split the XML files into pregame, loading, session and messagebox pages.
Added hotloading of GUI pages.
Minor GUI cleanups.
(Merge from hg 81862d33780c)

This was SVN commit r7214.
2009-12-03 20:17:22 +00:00

159 lines
4.1 KiB
XML

<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE objects SYSTEM "../gui.dtd">
<!--
==========================================
- ONLINE MANUAL DEFINITION -
==========================================
-->
<objects>
<object name="mn"
hidden="true"
hotkey="onlinehelp"
>
<action on="Press"><![CDATA[
// Toggle manual if something selected.
if (selection.length > 0)
{
// Ensure manual is refreshed.
refreshManual();
// Open/Close the manual.
guiToggle ("mn");
guiToggle ("sn");
}
]]></action>
<object name="mnBkg"
type="text"
style="wheatWindow"
tooltip_style="snToolTip"
>
<action on="Load"><![CDATA[
// Note: This is an example of addCrd() using the traditional "GUISize" size structure.
// * rleft
// * rtop
// * x1
// * y1
// * x2
// * y2
// * rtop
// * rbottom
// While an unusual syntax, it means you can reference other stored coordinates with getCrd(),
// and combine them with mathematical operations to create dynamic coordinates.
addCrd (this.name, rb,
10,
10,
0,
0,
0,
0,
90,
90);
]]></action>
<object name="mnPortrait"
style="snPortrait"
type="button"
>
<action on="Load"><![CDATA[
// Note: This is an example of addCrd() using a custom structure that saves a lot of extra
// effort when you want to only reference one set of relative coordinates, and know the width
// and height of your control. The function internally takes care of converting this to a
// a "GUISize".
// * rleft
// * rtop
// * x
// * y
// * width
// * height
// While an unusual syntax, it means you can also reference other stored coordinates with
// getCrd(), and combine them with mathematical operations and variables to create dynamic
// coordinates.
addCrd (this.name, rb, 0, 0,
10,
10,
snConst.Portrait.Lrg.Width,
snConst.Portrait.Lrg.Height);
]]></action>
</object>
<!-- Gee needs to implement text clipping, so long text doesn't get clipped to these scroll windows yet. Scroll bars also don't block world input yet. -->
<object name="mnRollover"
type="text"
style="wheatBorderBlack"
font="trebuchet12"
scrollbar="true"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb,
0,
0,
getCrd ("mnPortrait").coord[rb].x+getCrd ("mnPortrait").coord[rb].width+10,
getCrd ("mnPortrait").coord[rb].y,
(getCrd ("mnPortrait").coord[rb].x * -1),
getCrd ("mnPortrait").coord[rb].y+getCrd ("mnPortrait").coord[rb].height,
100,
0);
]]></action>
</object>
<!-- Gee needs to implement text clipping, so long text doesn't get clipped to these scroll windows yet. Scroll bars also don't block world input yet. -->
<object name="mnHistory"
style="wheatBorderBlack"
type="text"
font="trebuchet12"
scrollbar="true"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb,
0,
100,
getCrd ("mnPortrait").coord[rb].x,
(getCrd ("mnRollover").coord[rb].height * -2),
(getCrd ("mnPortrait").coord[rb].x * -1),
(getCrd ("mnPortrait").coord[rb].y * -1),
100,
100);
]]></action>
</object>
<object name="mnText"
style="wheatBorderBlack"
type="text"
scrollbar="true"
>
<action on="Load"><![CDATA[
addCrd (this.name, rb,
0,
0,
getCrd ("mnHistory").coord[rb].x,
getCrd ("mnRollover").coord[rb].y+getCrd ("mnRollover").coord[rb].height+5,
getCrd ("mnHistory").coord[rb].width,
getCrd ("mnHistory").coord[rb].y+getCrd ("mnHistory").coord[rb].height-5,
100,
100);
]]></action>
</object>
<object name="mnExitButton"
style="wheatExit"
type="button"
tooltip="Click this button or hit the hotkey again to close this manual."
>
<action on="Press"><![CDATA[
// Close manual.
guiHide("mn");
guiUnHide("sn");
]]></action>
</object>
</object>
</object>
</objects>