MCPcopy
hub / github.com/4ian/GDevelop / LabelTreeViewItemContent

Class LabelTreeViewItemContent

newIDE/app/src/EventsFunctionsList/index.js:394–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394class LabelTreeViewItemContent implements TreeViewItemContent {
395 id: string;
396 label: string | React.Node;
397 buildMenuTemplateFunction: (
398 i18n: I18nType,
399 index: number
400 ) => Array<MenuItemTemplate>;
401 rightButton: ?MenuButton;
402
403 constructor(
404 id: string,
405 label: string | React.Node,
406 rightButton?: MenuButton,
407 menuItems?: Array<MenuItemTemplate>
408 ) {
409 this.id = id;
410 this.label = label;
411 this.buildMenuTemplateFunction = (i18n: I18nType, index: number) =>
412 rightButton
413 ? [
414 {
415 label: rightButton.label,
416 click: rightButton.click,
417 },
418 ...(menuItems ? menuItems : []),
419 ]
420 : [];
421 this.rightButton = rightButton;
422 }
423
424 getName(): string | React.Node {
425 return this.label;
426 }
427
428 getId(): string {
429 return this.id;
430 }
431
432 getRightButton(i18n: I18nType): ?MenuButton {
433 return this.rightButton;
434 }
435
436 getEventsFunctionsContainer(): ?gdEventsFunctionsContainer {
437 return null;
438 }
439
440 getFunctionFolderOrFunction(): gdFunctionFolderOrFunction | null {
441 return null;
442 }
443
444 getEventsFunction(): ?gdEventsFunction {
445 return null;
446 }
447
448 getEventsBasedBehavior(): ?gdEventsBasedBehavior {
449 return null;
450 }
451

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected