source: OGRE/trunk/ogrenew/Docs/manual/manual_30.html @ 657

Revision 657, 9.3 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1<HTML>
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3<!-- Created on , 12 2006 by texi2html 1.64 -->
4<!--
5Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
6            Karl Berry  <karl@freefriends.org>
7            Olaf Bachmann <obachman@mathematik.uni-kl.de>
8            and many others.
9Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
10Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11 
12-->
13<HEAD>
14<TITLE>OGRE Manual v1.0.7: Standard OverlayElements</TITLE>
15
16<META NAME="description" CONTENT="OGRE Manual v1.0.7: Standard OverlayElements">
17<META NAME="keywords" CONTENT="OGRE Manual v1.0.7: Standard OverlayElements">
18<META NAME="resource-type" CONTENT="document">
19<META NAME="distribution" CONTENT="global">
20<META NAME="Generator" CONTENT="texi2html 1.64">
21<LINK TYPE="text/css" rel="stylesheet" href="../style.css"> 
22</HEAD>
23
24<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
25
26<A NAME="SEC156"></A>
27<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
28<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_29.html#SEC145"> &lt; </A>]</TD>
29<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_28.html#SEC138"> Up </A>]</TD>
30<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_31.html#SEC161"> &gt; </A>]</TD>
31<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
32<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
33<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
34<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
35</TR></TABLE>
36<HR SIZE=1>
37<H3> 3.3.2 Standard OverlayElements </H3>
38<!--docid::SEC156::-->
39<P>
40
41Although OGRE's OverlayElement and OverlayContainer classes are designed to be extended by applications developers, there are a few elements which come as standard with Ogre. These include:
42<UL>
43<LI>
44 <A HREF="manual_30.html#Panel">Panel</A>
45<LI>
46 <A HREF="manual_30.html#BorderPanel">BorderPanel</A>
47<LI>
48 <A HREF="manual_30.html#TextArea">TextArea</A>
49<LI>
50 <A HREF="manual_30.html#TextBox">TextBox</A>
51</UL>
52<BR>
53This section describes how you define their custom attributes in an .overlay script, but you can also change these custom properties in code if you wish. You do this by calling setParameter(paramname, value). You may wish to use the StringConverter class to convert your types to and from strings.
54<P>
55
56<A NAME="Panel"></A>
57<A NAME="SEC157"></A>
58<H3> Panel (container) </H3>
59<!--docid::SEC157::-->
60<P>
61
62This is the most bog-standard container you can use. It is a rectangular area which can contain other elements (or containers) and may or may not have a background, which can be tiled however you like. The background material is determined by the material attribute, but is only displayed if transparency is off.<BR><BR>
63</P><P>
64
65Attributes:
66<DL COMPACT>
67<DT>transparent &#60;true | false&#62;
68<DD>If set to 'true' the panel is transparent and is not rendered itself, it is just used as a grouping level for it's children.
69<DT>tiling &#60;layer&#62; &#60;x_tile&#62; &#60;y_tile&#62;
70<DD>Sets the number of times the texture(s) of the material are tiled across the panel in the x and y direction. &#60;layer&#62; is the texture layer, from 0 to the number of texture layers in the material minus one. By setting tiling per layer you can create some nice multitextured backdrops for your panels, this works especially well when you animate one of the layers.
71</DL>
72<P>
73
74<A NAME="BorderPanel"></A>
75<A NAME="SEC158"></A>
76<H3> BorderPanel (container) </H3>
77<!--docid::SEC158::-->
78<P>
79
80This is a slightly more advanced version of Panel, where instead of just a single flat panel, the panel has a separate border which resizes with the panel. It does this by taking an approach very similar to the use of HTML tables for bordered content: the panel is rendered as 9 square areas, with the center area being rendered with the main material (as with Panel) and the outer 8 areas (the 4 corners and the 4 edges) rendered with a separate border material. The advantage of rendering the corners separately from the edges is that the edge textures can be designed so that they can be stretched without distorting them, meaning the single texture can serve any size panel.<BR><BR>
81</P><P>
82
83Attributes:
84<DL COMPACT>
85<DT>border_size &#60;left&#62; &#60;right&#62; &#60;top&#62; &#60;bottom&#62;
86<DD>The size of the border at each edge, as a proportion of the size of the screen. This lets you have different size borders at each edge if you like, or you can use the same value 4 times to create a constant size border.
87<DT>border_material &#60;name&#62;
88<DD>The name of the material to use for the border. This is normally a different material to the one used for the center area, because the center area is often tiled which means you can't put border areas in there. You must put all the images you need for all the corners and the sides into a single texture.
89<DT>border_topleft_uv &#60;u1&#62; &#60;v1&#62; &#60;u2&#62; &#60;v2&#62;
90<DD>[also border_topright_uv, border_bottomleft_uv, border_bottomright_uv];
91The texture coordinates to be used for the corner areas of the border. 4 coordinates are required, 2 for the top-left corner of the square, 2 for the bottom-right of the square.
92<DT>border_left_uv &#60;u1&#62; &#60;v1&#62; &#60;u2&#62; &#60;v2&#62;
93<DD>[also border_right_uv, border_top_uv, border_bottom_uv];
94The texture coordinates to be used for the edge areas of the border. 4 coordinates are required, 2 for the top-left corner, 2 for the bottom-right. Note that you should design the texture so that the left &#38; right edges can be stretched / squashed vertically and the top and bottom edges can be stretched / squashed horizontally without detrimental effects.
95</DL>
96<P>
97
98<A NAME="TextArea"></A>
99<A NAME="SEC159"></A>
100<H3> TextArea (element) </H3>
101<!--docid::SEC159::-->
102<P>
103
104This is a generic element that you can use to render text. It uses fonts which can be defined in code using the FontManager and Font classes, or which have been predefined in .fontdef files. See the font definitions section for more information.<BR><BR>
105</P><P>
106
107Attributes:
108<DL COMPACT>
109<DT>font_name &#60;name&#62;
110<DD>The name of the font to use. This font must be defined in a .fontdef file to ensure it is available at scripting time.
111<DT>char_height &#60;height&#62;
112<DD>The height of the letters as a proportion of the screen height. Character widths may vary because OGRE supports proportional fonts, but will be based on this constant height.
113<DT>colour &#60;red&#62; &#60;green&#62; &#60;blue&#62;
114<DD>A solid colour to render the text in. Often fonts are defined in monochrome, so this allows you to colour them in nicely and use the same texture for multiple different coloured text areas. The colour elements should all be expressed as values between 0 and 1. If you use predrawn fonts which are already full colour then you don't need this.
115<DT>colour_bottom &#60;red&#62; &#60;green&#62; &#60;blue&#62; / colour_top &#60;red&#62; &#60;green&#62; &#60;blue&#62;
116<DD>As an alternative to a solid colour, you can colour the text differently at the top and bottom to create a gradient colour effect which can be very effective.
117</DL>
118<P>
119
120<A NAME="TextBox"></A>
121<A NAME="SEC160"></A>
122<H3> TextBox (element) </H3>
123<!--docid::SEC160::-->
124<P>
125
126This element is a box that allows text input. It is composed of 2 elements, a TextArea, which defines the size, colour etc of the text to be used when typed, and a back panel which is the box-element on which the text is written.<BR><BR>
127</P><P>
128
129Attributes:
130<DL COMPACT>
131<DT>text_area &#60;template name&#62; [&#60;caption&#62;]
132<DD>The name of the TextArea template to be used as the basis for the TextBox font. The optional caption is the text the textbox is initialised with.
133<DT>back_panel &#60;template name&#62;
134<DD>The name of the back panel template (e.g. a  <A HREF="manual_30.html#BorderPanel">BorderPanel</A>) to be used as the basis for the back panel on which the text is written. This needs to be a container.
135</DL>
136<P>
137
138<A NAME="Font Definition Scripts"></A>
139<HR SIZE=1>
140<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
141<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_29.html#SEC145"> &lt; </A>]</TD>
142<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_28.html#SEC138"> Up </A>]</TD>
143<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_31.html#SEC161"> &gt; </A>]</TD>
144<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
145<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
146<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
147<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
148</TR></TABLE>
149<BR> 
150<FONT SIZE="-1">
151This document was generated
152by <I>Steve Streeting</I> on <I>, 12 2006</I>
153using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
154"><I>texi2html</I></A>
155
156</BODY>
157</HTML>
Note: See TracBrowser for help on using the repository browser.