1 | <HTML> |
---|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
3 | <!-- Created on , 12 2006 by texi2html 1.64 --> |
---|
4 | <!-- |
---|
5 | Written 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. |
---|
9 | Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de> |
---|
10 | Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> |
---|
11 | |
---|
12 | --> |
---|
13 | <HEAD> |
---|
14 | <TITLE>OGRE Manual v1.2.0 ('Dagon'): Standard OverlayElements</TITLE> |
---|
15 | |
---|
16 | <META NAME="description" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Standard OverlayElements"> |
---|
17 | <META NAME="keywords" CONTENT="OGRE Manual v1.2.0 ('Dagon'): 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="SEC217"></A> |
---|
27 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
28 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_34.html#SEC206"> < </A>]</TD> |
---|
29 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_33.html#SEC200"> Up </A>]</TD> |
---|
30 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_36.html#SEC222"> > </A>]</TD> |
---|
31 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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.4.2 Standard OverlayElements </H3> |
---|
38 | <!--docid::SEC217::--> |
---|
39 | <P> |
---|
40 | |
---|
41 | Although 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_35.html#Panel">Panel</A> |
---|
45 | <LI> |
---|
46 | <A HREF="manual_35.html#BorderPanel">BorderPanel</A> |
---|
47 | <LI> |
---|
48 | <A HREF="manual_35.html#TextArea">TextArea</A> |
---|
49 | <LI> |
---|
50 | <A HREF="manual_35.html#TextBox">TextBox</A> |
---|
51 | </UL> |
---|
52 | <BR> |
---|
53 | This 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="SEC218"></A> |
---|
58 | <H3> Panel (container) </H3> |
---|
59 | <!--docid::SEC218::--> |
---|
60 | <P> |
---|
61 | |
---|
62 | This 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 | |
---|
65 | Attributes: |
---|
66 | <DL COMPACT> |
---|
67 | <DT>transparent <true | false> |
---|
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 <layer> <x_tile> <y_tile> |
---|
70 | <DD>Sets the number of times the texture(s) of the material are tiled across the panel in the x and y direction. <layer> 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 | <DT>uv_coords <topleft_u> <topleft_v> <bottomright_u> <bottomright_v> |
---|
72 | <DD>Sets the texture coordinates to use for this panel. |
---|
73 | </DL> |
---|
74 | <P> |
---|
75 | |
---|
76 | <A NAME="BorderPanel"></A> |
---|
77 | <A NAME="SEC219"></A> |
---|
78 | <H3> BorderPanel (container) </H3> |
---|
79 | <!--docid::SEC219::--> |
---|
80 | <P> |
---|
81 | |
---|
82 | This 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> |
---|
83 | </P><P> |
---|
84 | |
---|
85 | Attributes: |
---|
86 | <DL COMPACT> |
---|
87 | <DT>border_size <left> <right> <top> <bottom> |
---|
88 | <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. |
---|
89 | <DT>border_material <name> |
---|
90 | <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. |
---|
91 | <DT>border_topleft_uv <u1> <v1> <u2> <v2> |
---|
92 | <DD>[also border_topright_uv, border_bottomleft_uv, border_bottomright_uv]; |
---|
93 | The 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. |
---|
94 | <DT>border_left_uv <u1> <v1> <u2> <v2> |
---|
95 | <DD>[also border_right_uv, border_top_uv, border_bottom_uv]; |
---|
96 | The 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 & right edges can be stretched / squashed vertically and the top and bottom edges can be stretched / squashed horizontally without detrimental effects. |
---|
97 | </DL> |
---|
98 | <P> |
---|
99 | |
---|
100 | <A NAME="TextArea"></A> |
---|
101 | <A NAME="SEC220"></A> |
---|
102 | <H3> TextArea (element) </H3> |
---|
103 | <!--docid::SEC220::--> |
---|
104 | <P> |
---|
105 | |
---|
106 | This 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> |
---|
107 | </P><P> |
---|
108 | |
---|
109 | Attributes: |
---|
110 | <DL COMPACT> |
---|
111 | <DT>font_name <name> |
---|
112 | <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. |
---|
113 | <DT>char_height <height> |
---|
114 | <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. |
---|
115 | <DT>colour <red> <green> <blue> |
---|
116 | <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. |
---|
117 | <DT>colour_bottom <red> <green> <blue> / colour_top <red> <green> <blue> |
---|
118 | <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. |
---|
119 | </DL> |
---|
120 | <P> |
---|
121 | |
---|
122 | <A NAME="TextBox"></A> |
---|
123 | <A NAME="SEC221"></A> |
---|
124 | <H3> TextBox (element) </H3> |
---|
125 | <!--docid::SEC221::--> |
---|
126 | <P> |
---|
127 | |
---|
128 | This 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> |
---|
129 | </P><P> |
---|
130 | |
---|
131 | Attributes: |
---|
132 | <DL COMPACT> |
---|
133 | <DT>text_area <template name> [<caption>] |
---|
134 | <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. |
---|
135 | <DT>back_panel <template name> |
---|
136 | <DD>The name of the back panel template (e.g. a <A HREF="manual_35.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. |
---|
137 | </DL> |
---|
138 | <P> |
---|
139 | |
---|
140 | <A NAME="Font Definition Scripts"></A> |
---|
141 | <HR SIZE=1> |
---|
142 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
143 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_34.html#SEC206"> < </A>]</TD> |
---|
144 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_33.html#SEC200"> Up </A>]</TD> |
---|
145 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_36.html#SEC222"> > </A>]</TD> |
---|
146 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD> |
---|
147 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD> |
---|
148 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> |
---|
149 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD> |
---|
150 | </TR></TABLE> |
---|
151 | <BR> |
---|
152 | <FONT SIZE="-1"> |
---|
153 | This document was generated |
---|
154 | by <I>Steve Streeting</I> on <I>, 12 2006</I> |
---|
155 | using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html |
---|
156 | "><I>texi2html</I></A> |
---|
157 | |
---|
158 | </BODY> |
---|
159 | </HTML> |
---|