~jadedctrl/gem-xwx-moe

~jadedctrl/gem-xwx-moe/gemujo_ludo/mods.niaj/fasado/subtitles/doc/modules/BaseTextSubtitleDisplay.html
 ..
0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
1 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4 <head>
5 <title>Subtitles API Reference</title>
6 <link rel="stylesheet" href="../ldoc.css" type="text/css" />
7 </head>
8 <body>
9
10 <div id="container">
11
12 <div id="product">
13 <div id="product_logo"></div>
14 <div id="product_name"><big><b></b></big></div>
15 <div id="product_description"></div>
16 </div> <!-- id="product" -->
17
18
19 <div id="main">
20
21
22 <!-- Menu -->
23
24 <div id="navigation">
25 <br/>
26 <h1>ldoc</h1>
27
28 <ul>
29 <li><a href="../index.html">Index</a></li>
30 </ul>
31
32 <h2>Contents</h2>
33 <ul>
34 <li><a href="#Class_BaseTextSubtitleDisplay">Class BaseTextSubtitleDisplay </a></li>
35 <li><a href="#Class_BaseTextSubtitleDisplay_Entry">Class BaseTextSubtitleDisplay.Entry </a></li>
36 </ul>
37
38
39 <h2>Modules</h2>
40 <ul class="nowrap">
41 <li><a href="../modules/Agent.html">Agent</a></li>
42 <li><strong>BaseTextSubtitleDisplay</strong></li>
43 <li><a href="../modules/ChatSubtitleDisplay.html">ChatSubtitleDisplay</a></li>
44 <li><a href="../modules/ClassicSubtitleDisplay.html">ClassicSubtitleDisplay</a></li>
45 <li><a href="../modules/CornerSubtitleDisplay.html">CornerSubtitleDisplay</a></li>
46 <li><a href="../modules/Sound.html">Sound</a></li>
47 <li><a href="../modules/SubtitleDisplay.html">SubtitleDisplay</a></li>
48 <li><a href="../modules/WaypointSubtitleDisplay.html">WaypointSubtitleDisplay</a></li>
49 <li><a href="../modules/api.html">api</a></li>
50 <li><a href="../modules/chatcommands.html">chatcommands</a></li>
51 <li><a href="../modules/descriptions.html">descriptions</a></li>
52 <li><a href="../modules/init.html">init</a></li>
53 <li><a href="../modules/listeners.html">listeners</a></li>
54 <li><a href="../modules/menu.html">menu</a></li>
55 <li><a href="../modules/util.html">util</a></li>
56 </ul>
57
58 </div>
59
60 <div id="content">
61
62 <h1>Module <code>BaseTextSubtitleDisplay</code></h1>
63 <p>Provides the BaseTextSubtitleDisplay class, a base class for subtitle displays using text HUDs.</p>
64 <p></p>
65
66
67 <h2><a href="#Class_BaseTextSubtitleDisplay">Class BaseTextSubtitleDisplay </a></h2>
68 <table class="function_list">
69 <tr>
70 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay:remove_entry">subtitles.BaseTextSubtitleDisplay:remove_entry (entry)</a></td>
71 <td class="summary">Removes a subtitle entry.</td>
72 </tr>
73 <tr>
74 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay:get_free_slot">subtitles.BaseTextSubtitleDisplay:get_free_slot ()</a></td>
75 <td class="summary">Returns the next available slot.</td>
76 </tr>
77 <tr>
78 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay:get_huds">subtitles.BaseTextSubtitleDisplay:get_huds (entry)</a></td>
79 <td class="summary">Generates the HUDs to display a subtitle entry.</td>
80 </tr>
81 <tr>
82 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay:get_hud_defaults">subtitles.BaseTextSubtitleDisplay:get_hud_defaults (entry)</a></td>
83 <td class="summary">Returns the default properties for a HUD for the specified entry.</td>
84 </tr>
85 </table>
86 <h2><a href="#Class_BaseTextSubtitleDisplay_Entry">Class BaseTextSubtitleDisplay.Entry </a></h2>
87 <table class="function_list">
88 <tr>
89 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay.Entry:new">subtitles.BaseTextSubtitleDisplay.Entry:new (display, sound, slot)</a></td>
90 <td class="summary">Constructor.</td>
91 </tr>
92 <tr>
93 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay.Entry:show">subtitles.BaseTextSubtitleDisplay.Entry:show ()</a></td>
94 <td class="summary">Shows or updates the subtitle.</td>
95 </tr>
96 <tr>
97 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay.Entry:hide">subtitles.BaseTextSubtitleDisplay.Entry:hide ()</a></td>
98 <td class="summary">Hides the subtitle.</td>
99 </tr>
100 <tr>
101 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay.Entry:get_offset">subtitles.BaseTextSubtitleDisplay.Entry:get_offset ()</a></td>
102 <td class="summary">Gets the entry's offset based on its slot.</td>
103 </tr>
104 <tr>
105 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay.Entry:get_distance_shade">subtitles.BaseTextSubtitleDisplay.Entry:get_distance_shade ()</a></td>
106 <td class="summary">Returns a shade representing the distance of the sound from the player.</td>
107 </tr>
108 <tr>
109 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay.Entry:get_pan">subtitles.BaseTextSubtitleDisplay.Entry:get_pan ()</a></td>
110 <td class="summary">Calculates which direction the sound is in from the player's perspective, and how far.</td>
111 </tr>
112 <tr>
113 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay.Entry:ref">subtitles.BaseTextSubtitleDisplay.Entry:ref ()</a></td>
114 <td class="summary">Increases the entry's reference count.</td>
115 </tr>
116 <tr>
117 <td class="name" nowrap><a href="#subtitles.BaseTextSubtitleDisplay.Entry:unref">subtitles.BaseTextSubtitleDisplay.Entry:unref ()</a></td>
118 <td class="summary">Decreases the entry's reference count, possibly removing it.</td>
119 </tr>
120 </table>
121
122 <br/>
123 <br/>
124
125
126 <h2 class="section-header has-description"><a name="Class_BaseTextSubtitleDisplay"></a>Class BaseTextSubtitleDisplay </h2>
127
128 <div class="section-description">
129 A base class for subtitle displays using text HUDs.
130 </div>
131 <dl class="function">
132 <dt>
133 <a name = "subtitles.BaseTextSubtitleDisplay:remove_entry"></a>
134 <strong>subtitles.BaseTextSubtitleDisplay:remove_entry (entry)</strong>
135 </dt>
136 <dd>
137 Removes a subtitle entry.
138
139
140 <h3>Parameters:</h3>
141 <ul>
142 <li><span class="parameter">entry</span>
143 The `Entry` object to remove.
144 </li>
145 </ul>
146
147
148
149
150
151 </dd>
152 <dt>
153 <a name = "subtitles.BaseTextSubtitleDisplay:get_free_slot"></a>
154 <strong>subtitles.BaseTextSubtitleDisplay:get_free_slot ()</strong>
155 </dt>
156 <dd>
157 Returns the next available slot.
158
159
160
161 <h3>Returns:</h3>
162 <ol>
163
164 The slot index, starting from 1.
165 </ol>
166
167
168
169
170 </dd>
171 <dt>
172 <a name = "subtitles.BaseTextSubtitleDisplay:get_huds"></a>
173 <strong>subtitles.BaseTextSubtitleDisplay:get_huds (entry)</strong>
174 </dt>
175 <dd>
176 Generates the HUDs to display a subtitle entry.
177
178
179 <h3>Parameters:</h3>
180 <ul>
181 <li><span class="parameter">entry</span>
182 The `Entry` object.
183 </li>
184 </ul>
185
186 <h3>Returns:</h3>
187 <ol>
188
189 A table of {hud_key1 = hud_def1, hud_key2 = hud_def2}.
190 HUD keys can be strings or integers.
191 </ol>
192
193
194
195
196 </dd>
197 <dt>
198 <a name = "subtitles.BaseTextSubtitleDisplay:get_hud_defaults"></a>
199 <strong>subtitles.BaseTextSubtitleDisplay:get_hud_defaults (entry)</strong>
200 </dt>
201 <dd>
202 Returns the default properties for a HUD for the specified entry.
203
204
205 <h3>Parameters:</h3>
206 <ul>
207 <li><span class="parameter">entry</span>
208 An `Entry` object.
209 </li>
210 </ul>
211
212 <h3>Returns:</h3>
213 <ol>
214
215 A partial HUD definition.
216 </ol>
217
218
219
220
221 </dd>
222 </dl>
223 <h2 class="section-header has-description"><a name="Class_BaseTextSubtitleDisplay_Entry"></a>Class BaseTextSubtitleDisplay.Entry </h2>
224
225 <div class="section-description">
226 Represents a single subtitle.
227 </div>
228 <dl class="function">
229 <dt>
230 <a name = "subtitles.BaseTextSubtitleDisplay.Entry:new"></a>
231 <strong>subtitles.BaseTextSubtitleDisplay.Entry:new (display, sound, slot)</strong>
232 </dt>
233 <dd>
234 Constructor.
235
236
237 <h3>Parameters:</h3>
238 <ul>
239 <li><span class="parameter">display</span>
240 The `SubtitleDisplay` object.
241 </li>
242 <li><span class="parameter">sound</span>
243 The `Sound` object.
244 </li>
245 <li><span class="parameter">slot</span>
246 The integer subtitle slot.
247 </li>
248 </ul>
249
250
251
252
253
254 </dd>
255 <dt>
256 <a name = "subtitles.BaseTextSubtitleDisplay.Entry:show"></a>
257 <strong>subtitles.BaseTextSubtitleDisplay.Entry:show ()</strong>
258 </dt>
259 <dd>
260 Shows or updates the subtitle.
261
262
263
264
265
266
267
268 </dd>
269 <dt>
270 <a name = "subtitles.BaseTextSubtitleDisplay.Entry:hide"></a>
271 <strong>subtitles.BaseTextSubtitleDisplay.Entry:hide ()</strong>
272 </dt>
273 <dd>
274 Hides the subtitle.
275
276
277
278
279
280
281
282 </dd>
283 <dt>
284 <a name = "subtitles.BaseTextSubtitleDisplay.Entry:get_offset"></a>
285 <strong>subtitles.BaseTextSubtitleDisplay.Entry:get_offset ()</strong>
286 </dt>
287 <dd>
288 Gets the entry's offset based on its slot.
289
290
291
292 <h3>Returns:</h3>
293 <ol>
294
295 A table of {x: integer, y: integer}.
296 </ol>
297
298
299
300
301 </dd>
302 <dt>
303 <a name = "subtitles.BaseTextSubtitleDisplay.Entry:get_distance_shade"></a>
304 <strong>subtitles.BaseTextSubtitleDisplay.Entry:get_distance_shade ()</strong>
305 </dt>
306 <dd>
307 Returns a shade representing the distance of the sound from the player.
308
309
310
311 <h3>Returns:</h3>
312 <ol>
313
314 A number from 0.0 to 1.0.
315 </ol>
316
317
318
319
320 </dd>
321 <dt>
322 <a name = "subtitles.BaseTextSubtitleDisplay.Entry:get_pan"></a>
323 <strong>subtitles.BaseTextSubtitleDisplay.Entry:get_pan ()</strong>
324 </dt>
325 <dd>
326 Calculates which direction the sound is in from the player's perspective, and how far.
327
328
329
330 <h3>Returns:</h3>
331 <ol>
332
333 A number from -1.0 (far left) to 1.0 (far right).
334 </ol>
335
336
337
338
339 </dd>
340 <dt>
341 <a name = "subtitles.BaseTextSubtitleDisplay.Entry:ref"></a>
342 <strong>subtitles.BaseTextSubtitleDisplay.Entry:ref ()</strong>
343 </dt>
344 <dd>
345 Increases the entry's reference count.
346
347
348
349
350
351
352
353 </dd>
354 <dt>
355 <a name = "subtitles.BaseTextSubtitleDisplay.Entry:unref"></a>
356 <strong>subtitles.BaseTextSubtitleDisplay.Entry:unref ()</strong>
357 </dt>
358 <dd>
359 Decreases the entry's reference count, possibly removing it.
360
361
362
363
364
365
366
367 </dd>
368 </dl>
369
370
371 </div> <!-- id="content" -->
372 </div> <!-- id="main" -->
373 <div id="about">
374 <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
375 <i style="float:right;">Last updated 2023-01-14 06:51:17 </i>
376 </div> <!-- id="about" -->
377 </div> <!-- id="container" -->
378 </body>
379 </html>