|
107 | 107 | <description>
|
108 | 108 | Adds a new item with text [code]label[/code].
|
109 | 109 | An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators.
|
| 110 | + [b]Note:[/b] The provided [code]id[/code] is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the [code]index[/code] arguments in e.g. [method set_item_checked]. |
110 | 111 | </description>
|
111 | 112 | </method>
|
112 | 113 | <method name="add_multistate_item">
|
|
181 | 182 | </method>
|
182 | 183 | <method name="clear_item_opentype_features">
|
183 | 184 | <return type="void" />
|
184 |
| - <argument index="0" name="idx" type="int" /> |
| 185 | + <argument index="0" name="index" type="int" /> |
185 | 186 | <description>
|
186 | 187 | Removes all OpenType features form the item's text.
|
187 | 188 | </description>
|
|
194 | 195 | </method>
|
195 | 196 | <method name="get_item_accelerator" qualifiers="const">
|
196 | 197 | <return type="int" enum="Key" />
|
197 |
| - <argument index="0" name="idx" type="int" /> |
| 198 | + <argument index="0" name="index" type="int" /> |
198 | 199 | <description>
|
199 |
| - Returns the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. |
| 200 | + Returns the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. |
200 | 201 | </description>
|
201 | 202 | </method>
|
202 | 203 | <method name="get_item_icon" qualifiers="const">
|
203 | 204 | <return type="Texture2D" />
|
204 |
| - <argument index="0" name="idx" type="int" /> |
| 205 | + <argument index="0" name="index" type="int" /> |
205 | 206 | <description>
|
206 |
| - Returns the icon of the item at index [code]idx[/code]. |
| 207 | + Returns the icon of the item at the given [code]index[/code]. |
207 | 208 | </description>
|
208 | 209 | </method>
|
209 | 210 | <method name="get_item_id" qualifiers="const">
|
210 | 211 | <return type="int" />
|
211 |
| - <argument index="0" name="idx" type="int" /> |
| 212 | + <argument index="0" name="index" type="int" /> |
212 | 213 | <description>
|
213 |
| - Returns the id of the item at index [code]idx[/code]. [code]id[/code] can be manually assigned, while index can not. |
| 214 | + Returns the id of the item at the given [code]index[/code]. [code]id[/code] can be manually assigned, while index can not. |
214 | 215 | </description>
|
215 | 216 | </method>
|
216 | 217 | <method name="get_item_index" qualifiers="const">
|
217 | 218 | <return type="int" />
|
218 | 219 | <argument index="0" name="id" type="int" />
|
219 | 220 | <description>
|
220 |
| - Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine. Index can not be set manually. |
| 221 | + Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine and can not be set manually. |
221 | 222 | </description>
|
222 | 223 | </method>
|
223 | 224 | <method name="get_item_language" qualifiers="const">
|
224 | 225 | <return type="String" />
|
225 |
| - <argument index="0" name="idx" type="int" /> |
| 226 | + <argument index="0" name="index" type="int" /> |
226 | 227 | <description>
|
227 | 228 | Returns item's text language code.
|
228 | 229 | </description>
|
229 | 230 | </method>
|
230 | 231 | <method name="get_item_metadata" qualifiers="const">
|
231 | 232 | <return type="Variant" />
|
232 |
| - <argument index="0" name="idx" type="int" /> |
| 233 | + <argument index="0" name="index" type="int" /> |
233 | 234 | <description>
|
234 | 235 | Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items.
|
235 | 236 | </description>
|
236 | 237 | </method>
|
237 | 238 | <method name="get_item_opentype_feature" qualifiers="const">
|
238 | 239 | <return type="int" />
|
239 |
| - <argument index="0" name="idx" type="int" /> |
| 240 | + <argument index="0" name="index" type="int" /> |
240 | 241 | <argument index="1" name="tag" type="String" />
|
241 | 242 | <description>
|
242 | 243 | Returns OpenType feature [code]tag[/code] of the item's text.
|
243 | 244 | </description>
|
244 | 245 | </method>
|
245 | 246 | <method name="get_item_shortcut" qualifiers="const">
|
246 | 247 | <return type="Shortcut" />
|
247 |
| - <argument index="0" name="idx" type="int" /> |
| 248 | + <argument index="0" name="index" type="int" /> |
248 | 249 | <description>
|
249 |
| - Returns the [Shortcut] associated with the specified [code]idx[/code] item. |
| 250 | + Returns the [Shortcut] associated with the item at the given [code]index[/code]. |
250 | 251 | </description>
|
251 | 252 | </method>
|
252 | 253 | <method name="get_item_submenu" qualifiers="const">
|
253 | 254 | <return type="String" />
|
254 |
| - <argument index="0" name="idx" type="int" /> |
| 255 | + <argument index="0" name="index" type="int" /> |
255 | 256 | <description>
|
256 |
| - Returns the submenu name of the item at index [code]idx[/code]. See [method add_submenu_item] for more info on how to add a submenu. |
| 257 | + Returns the submenu name of the item at the given [code]index[/code]. See [method add_submenu_item] for more info on how to add a submenu. |
257 | 258 | </description>
|
258 | 259 | </method>
|
259 | 260 | <method name="get_item_text" qualifiers="const">
|
260 | 261 | <return type="String" />
|
261 |
| - <argument index="0" name="idx" type="int" /> |
| 262 | + <argument index="0" name="index" type="int" /> |
262 | 263 | <description>
|
263 |
| - Returns the text of the item at index [code]idx[/code]. |
| 264 | + Returns the text of the item at the given [code]index[/code]. |
264 | 265 | </description>
|
265 | 266 | </method>
|
266 | 267 | <method name="get_item_text_direction" qualifiers="const">
|
267 | 268 | <return type="int" enum="Control.TextDirection" />
|
268 |
| - <argument index="0" name="idx" type="int" /> |
| 269 | + <argument index="0" name="index" type="int" /> |
269 | 270 | <description>
|
270 | 271 | Returns item's text base writing direction.
|
271 | 272 | </description>
|
272 | 273 | </method>
|
273 | 274 | <method name="get_item_tooltip" qualifiers="const">
|
274 | 275 | <return type="String" />
|
275 |
| - <argument index="0" name="idx" type="int" /> |
| 276 | + <argument index="0" name="index" type="int" /> |
276 | 277 | <description>
|
277 |
| - Returns the tooltip associated with the specified index index [code]idx[/code]. |
| 278 | + Returns the tooltip associated with the item at the given [code]index[/code]. |
278 | 279 | </description>
|
279 | 280 | </method>
|
280 | 281 | <method name="is_item_checkable" qualifiers="const">
|
281 | 282 | <return type="bool" />
|
282 |
| - <argument index="0" name="idx" type="int" /> |
| 283 | + <argument index="0" name="index" type="int" /> |
283 | 284 | <description>
|
284 |
| - Returns [code]true[/code] if the item at index [code]idx[/code] is checkable in some way, i.e. if it has a checkbox or radio button. |
| 285 | + Returns [code]true[/code] if the item at the given [code]index[/code] is checkable in some way, i.e. if it has a checkbox or radio button. |
285 | 286 | [b]Note:[/b] Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually.
|
286 | 287 | </description>
|
287 | 288 | </method>
|
288 | 289 | <method name="is_item_checked" qualifiers="const">
|
289 | 290 | <return type="bool" />
|
290 |
| - <argument index="0" name="idx" type="int" /> |
| 291 | + <argument index="0" name="index" type="int" /> |
291 | 292 | <description>
|
292 |
| - Returns [code]true[/code] if the item at index [code]idx[/code] is checked. |
| 293 | + Returns [code]true[/code] if the item at the given [code]index[/code] is checked. |
293 | 294 | </description>
|
294 | 295 | </method>
|
295 | 296 | <method name="is_item_disabled" qualifiers="const">
|
296 | 297 | <return type="bool" />
|
297 |
| - <argument index="0" name="idx" type="int" /> |
| 298 | + <argument index="0" name="index" type="int" /> |
298 | 299 | <description>
|
299 |
| - Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. When it is disabled it can't be selected, or its action invoked. |
| 300 | + Returns [code]true[/code] if the item at the given [code]index[/code] is disabled. When it is disabled it can't be selected, or its action invoked. |
300 | 301 | See [method set_item_disabled] for more info on how to disable an item.
|
301 | 302 | </description>
|
302 | 303 | </method>
|
303 | 304 | <method name="is_item_radio_checkable" qualifiers="const">
|
304 | 305 | <return type="bool" />
|
305 |
| - <argument index="0" name="idx" type="int" /> |
| 306 | + <argument index="0" name="index" type="int" /> |
306 | 307 | <description>
|
307 |
| - Returns [code]true[/code] if the item at index [code]idx[/code] has radio button-style checkability. |
| 308 | + Returns [code]true[/code] if the item at the given [code]index[/code] has radio button-style checkability. |
308 | 309 | [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups.
|
309 | 310 | </description>
|
310 | 311 | </method>
|
311 | 312 | <method name="is_item_separator" qualifiers="const">
|
312 | 313 | <return type="bool" />
|
313 |
| - <argument index="0" name="idx" type="int" /> |
| 314 | + <argument index="0" name="index" type="int" /> |
314 | 315 | <description>
|
315 | 316 | Returns [code]true[/code] if the item is a separator. If it is, it will be displayed as a line. See [method add_separator] for more info on how to add a separator.
|
316 | 317 | </description>
|
317 | 318 | </method>
|
318 | 319 | <method name="is_item_shortcut_disabled" qualifiers="const">
|
319 | 320 | <return type="bool" />
|
320 |
| - <argument index="0" name="idx" type="int" /> |
| 321 | + <argument index="0" name="index" type="int" /> |
321 | 322 | <description>
|
322 | 323 | Returns [code]true[/code] if the specified item's shortcut is disabled.
|
323 | 324 | </description>
|
324 | 325 | </method>
|
325 | 326 | <method name="remove_item">
|
326 | 327 | <return type="void" />
|
327 |
| - <argument index="0" name="idx" type="int" /> |
| 328 | + <argument index="0" name="index" type="int" /> |
328 | 329 | <description>
|
329 |
| - Removes the item at index [code]idx[/code] from the menu. |
| 330 | + Removes the item at the given [code]index[/code] from the menu. |
330 | 331 | [b]Note:[/b] The indices of items after the removed item will be shifted by one.
|
331 | 332 | </description>
|
332 | 333 | </method>
|
333 | 334 | <method name="set_item_accelerator">
|
334 | 335 | <return type="void" />
|
335 |
| - <argument index="0" name="idx" type="int" /> |
| 336 | + <argument index="0" name="index" type="int" /> |
336 | 337 | <argument index="1" name="accel" type="int" enum="Key" />
|
337 | 338 | <description>
|
338 |
| - Sets the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. |
| 339 | + Sets the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. |
339 | 340 | </description>
|
340 | 341 | </method>
|
341 | 342 | <method name="set_item_as_checkable">
|
342 | 343 | <return type="void" />
|
343 |
| - <argument index="0" name="idx" type="int" /> |
| 344 | + <argument index="0" name="index" type="int" /> |
344 | 345 | <argument index="1" name="enable" type="bool" />
|
345 | 346 | <description>
|
346 |
| - Sets whether the item at index [code]idx[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text. |
| 347 | + Sets whether the item at the given [code]index[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text. |
347 | 348 | [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
|
348 | 349 | </description>
|
349 | 350 | </method>
|
350 | 351 | <method name="set_item_as_radio_checkable">
|
351 | 352 | <return type="void" />
|
352 |
| - <argument index="0" name="idx" type="int" /> |
| 353 | + <argument index="0" name="index" type="int" /> |
353 | 354 | <argument index="1" name="enable" type="bool" />
|
354 | 355 | <description>
|
355 |
| - Sets the type of the item at the specified index [code]idx[/code] to radio button. If [code]false[/code], sets the type of the item to plain text. |
| 356 | + Sets the type of the item at the given [code]index[/code] to radio button. If [code]false[/code], sets the type of the item to plain text. |
356 | 357 | </description>
|
357 | 358 | </method>
|
358 | 359 | <method name="set_item_as_separator">
|
359 | 360 | <return type="void" />
|
360 |
| - <argument index="0" name="idx" type="int" /> |
| 361 | + <argument index="0" name="index" type="int" /> |
361 | 362 | <argument index="1" name="enable" type="bool" />
|
362 | 363 | <description>
|
363 |
| - Mark the item at index [code]idx[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text. |
| 364 | + Mark the item at the given [code]index[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text. |
364 | 365 | </description>
|
365 | 366 | </method>
|
366 | 367 | <method name="set_item_checked">
|
367 | 368 | <return type="void" />
|
368 |
| - <argument index="0" name="idx" type="int" /> |
| 369 | + <argument index="0" name="index" type="int" /> |
369 | 370 | <argument index="1" name="checked" type="bool" />
|
370 | 371 | <description>
|
371 |
| - Sets the checkstate status of the item at index [code]idx[/code]. |
| 372 | + Sets the checkstate status of the item at the given [code]index[/code]. |
372 | 373 | </description>
|
373 | 374 | </method>
|
374 | 375 | <method name="set_item_disabled">
|
375 | 376 | <return type="void" />
|
376 |
| - <argument index="0" name="idx" type="int" /> |
| 377 | + <argument index="0" name="index" type="int" /> |
377 | 378 | <argument index="1" name="disabled" type="bool" />
|
378 | 379 | <description>
|
379 |
| - Enables/disables the item at index [code]idx[/code]. When it is disabled, it can't be selected and its action can't be invoked. |
| 380 | + Enables/disables the item at the given [code]index[/code]. When it is disabled, it can't be selected and its action can't be invoked. |
380 | 381 | </description>
|
381 | 382 | </method>
|
382 | 383 | <method name="set_item_icon">
|
383 | 384 | <return type="void" />
|
384 |
| - <argument index="0" name="idx" type="int" /> |
| 385 | + <argument index="0" name="index" type="int" /> |
385 | 386 | <argument index="1" name="icon" type="Texture2D" />
|
386 | 387 | <description>
|
387 |
| - Replaces the [Texture2D] icon of the specified [code]idx[/code]. |
| 388 | + Replaces the [Texture2D] icon of the item at the given [code]index[/code]. |
388 | 389 | </description>
|
389 | 390 | </method>
|
390 | 391 | <method name="set_item_id">
|
391 | 392 | <return type="void" />
|
392 |
| - <argument index="0" name="idx" type="int" /> |
| 393 | + <argument index="0" name="index" type="int" /> |
393 | 394 | <argument index="1" name="id" type="int" />
|
394 | 395 | <description>
|
395 |
| - Sets the [code]id[/code] of the item at index [code]idx[/code]. |
| 396 | + Sets the [code]id[/code] of the item at the given [code]index[/code]. |
| 397 | + The [code]id[/code] is used in [signal id_pressed] and [signal id_focused] signals. |
396 | 398 | </description>
|
397 | 399 | </method>
|
398 | 400 | <method name="set_item_language">
|
399 | 401 | <return type="void" />
|
400 |
| - <argument index="0" name="idx" type="int" /> |
| 402 | + <argument index="0" name="index" type="int" /> |
401 | 403 | <argument index="1" name="language" type="String" />
|
402 | 404 | <description>
|
403 | 405 | Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
|
404 | 406 | </description>
|
405 | 407 | </method>
|
406 | 408 | <method name="set_item_metadata">
|
407 | 409 | <return type="void" />
|
408 |
| - <argument index="0" name="idx" type="int" /> |
| 410 | + <argument index="0" name="index" type="int" /> |
409 | 411 | <argument index="1" name="metadata" type="Variant" />
|
410 | 412 | <description>
|
411 | 413 | Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items.
|
412 | 414 | </description>
|
413 | 415 | </method>
|
414 | 416 | <method name="set_item_multistate">
|
415 | 417 | <return type="void" />
|
416 |
| - <argument index="0" name="idx" type="int" /> |
| 418 | + <argument index="0" name="index" type="int" /> |
417 | 419 | <argument index="1" name="state" type="int" />
|
418 | 420 | <description>
|
419 | 421 | Sets the state of a multistate item. See [method add_multistate_item] for details.
|
420 | 422 | </description>
|
421 | 423 | </method>
|
422 | 424 | <method name="set_item_opentype_feature">
|
423 | 425 | <return type="void" />
|
424 |
| - <argument index="0" name="idx" type="int" /> |
| 426 | + <argument index="0" name="index" type="int" /> |
425 | 427 | <argument index="1" name="tag" type="String" />
|
426 | 428 | <argument index="2" name="value" type="int" />
|
427 | 429 | <description>
|
|
430 | 432 | </method>
|
431 | 433 | <method name="set_item_shortcut">
|
432 | 434 | <return type="void" />
|
433 |
| - <argument index="0" name="idx" type="int" /> |
| 435 | + <argument index="0" name="index" type="int" /> |
434 | 436 | <argument index="1" name="shortcut" type="Shortcut" />
|
435 | 437 | <argument index="2" name="global" type="bool" default="false" />
|
436 | 438 | <description>
|
437 |
| - Sets a [Shortcut] for the specified item [code]idx[/code]. |
| 439 | + Sets a [Shortcut] for the item at the given [code]index[/code]. |
438 | 440 | </description>
|
439 | 441 | </method>
|
440 | 442 | <method name="set_item_shortcut_disabled">
|
441 | 443 | <return type="void" />
|
442 |
| - <argument index="0" name="idx" type="int" /> |
| 444 | + <argument index="0" name="index" type="int" /> |
443 | 445 | <argument index="1" name="disabled" type="bool" />
|
444 | 446 | <description>
|
445 |
| - Disables the [Shortcut] of the specified index [code]idx[/code]. |
| 447 | + Disables the [Shortcut] of the item at the given [code]index[/code]. |
446 | 448 | </description>
|
447 | 449 | </method>
|
448 | 450 | <method name="set_item_submenu">
|
449 | 451 | <return type="void" />
|
450 |
| - <argument index="0" name="idx" type="int" /> |
| 452 | + <argument index="0" name="index" type="int" /> |
451 | 453 | <argument index="1" name="submenu" type="String" />
|
452 | 454 | <description>
|
453 |
| - Sets the submenu of the item at index [code]idx[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked. |
| 455 | + Sets the submenu of the item at the given [code]index[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked. |
454 | 456 | </description>
|
455 | 457 | </method>
|
456 | 458 | <method name="set_item_text">
|
457 | 459 | <return type="void" />
|
458 |
| - <argument index="0" name="idx" type="int" /> |
| 460 | + <argument index="0" name="index" type="int" /> |
459 | 461 | <argument index="1" name="text" type="String" />
|
460 | 462 | <description>
|
461 |
| - Sets the text of the item at index [code]idx[/code]. |
| 463 | + Sets the text of the item at the given [code]index[/code]. |
462 | 464 | </description>
|
463 | 465 | </method>
|
464 | 466 | <method name="set_item_text_direction">
|
465 | 467 | <return type="void" />
|
466 |
| - <argument index="0" name="idx" type="int" /> |
| 468 | + <argument index="0" name="index" type="int" /> |
467 | 469 | <argument index="1" name="direction" type="int" enum="Control.TextDirection" />
|
468 | 470 | <description>
|
469 | 471 | Sets item's text base writing direction.
|
470 | 472 | </description>
|
471 | 473 | </method>
|
472 | 474 | <method name="set_item_tooltip">
|
473 | 475 | <return type="void" />
|
474 |
| - <argument index="0" name="idx" type="int" /> |
| 476 | + <argument index="0" name="index" type="int" /> |
475 | 477 | <argument index="1" name="tooltip" type="String" />
|
476 | 478 | <description>
|
477 |
| - Sets the [String] tooltip of the item at the specified index [code]idx[/code]. |
| 479 | + Sets the [String] tooltip of the item at the given [code]index[/code]. |
478 | 480 | </description>
|
479 | 481 | </method>
|
480 | 482 | <method name="toggle_item_checked">
|
481 | 483 | <return type="void" />
|
482 |
| - <argument index="0" name="idx" type="int" /> |
| 484 | + <argument index="0" name="index" type="int" /> |
483 | 485 | <description>
|
484 |
| - Toggles the check state of the item of the specified index [code]idx[/code]. |
| 486 | + Toggles the check state of the item at the given [code]index[/code]. |
485 | 487 | </description>
|
486 | 488 | </method>
|
487 | 489 | <method name="toggle_item_multistate">
|
488 | 490 | <return type="void" />
|
489 |
| - <argument index="0" name="idx" type="int" /> |
| 491 | + <argument index="0" name="index" type="int" /> |
490 | 492 | <description>
|
491 | 493 | Cycle to the next state of a multistate item. See [method add_multistate_item] for details.
|
492 | 494 | </description>
|
|
0 commit comments