MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Initialize

Method Initialize

Source/Editor/Windows/GameCookerWindow.cs:555–637  ·  view source on GitHub ↗
(LayoutElementsContainer layout)

Source from the content-addressed store, hash-verified

553 private Button _buildButton;
554
555 public override void Initialize(LayoutElementsContainer layout)
556 {
557 var proxy = (BuildTabProxy)Values[0];
558 _platform = proxy.Selector.Selected;
559 var platformObj = proxy.PerPlatformOptions[_platform];
560
561 if (!platformObj.IsSupported)
562 {
563 layout.Label("This platform is not supported on this system.", TextAlignment.Center);
564 }
565 else if (platformObj.IsAvailable)
566 {
567 string name;
568 switch (_platform)
569 {
570 case PlatformType.Windows:
571 name = "Windows";
572 break;
573 case PlatformType.XboxOne:
574 name = "Xbox One";
575 break;
576 case PlatformType.UWP:
577 name = "Windows Store";
578 layout.Label("UWP (Windows Store) platform has been deprecated and is no longer supported", TextAlignment.Center).Label.TextColor = Color.Red;
579 break;
580 case PlatformType.Linux:
581 name = "Linux";
582 break;
583 case PlatformType.PS4:
584 name = "PlayStation 4";
585 break;
586 case PlatformType.XboxScarlett:
587 name = "Xbox Scarlett";
588 break;
589 case PlatformType.Android:
590 name = "Android";
591 break;
592 case PlatformType.Switch:
593 name = "Switch";
594 break;
595 case PlatformType.PS5:
596 name = "PlayStation 5";
597 break;
598 case PlatformType.Mac:
599 name = "Mac";
600 break;
601 case PlatformType.iOS:
602 name = "iOS";
603 break;
604 case PlatformType.Web:
605 name = "Web";
606 layout.Label("Web platform is experimental and some features are not finished yet (eg. C# scripting)", TextAlignment.Center).Label.TextColor = Color.Yellow;
607 break;
608 default:
609 name = Utilities.Utils.GetPropertyNameUI(_platform.ToString());
610 break;
611 }
612 var group = layout.Group(name);

Callers

nothing calls this directly

Calls 13

GetPropertyNameUIMethod · 0.80
SpaceMethod · 0.80
OnCustomToolsLayoutMethod · 0.80
LabelMethod · 0.45
ToStringMethod · 0.45
GroupMethod · 0.45
ObjectMethod · 0.45
ButtonMethod · 0.45
NormalizePathMethod · 0.45
ExistsMethod · 0.45
ShowFileExplorerMethod · 0.45

Tested by

no test coverage detected