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

Method Initialize

Source/Editor/Options/InputBinding.cs:401–425  ·  view source on GitHub ↗

(LayoutElementsContainer layout)

Source from the content-addressed store, hash-verified

399
400 /// <inheritdoc />
401 public override void Initialize(LayoutElementsContainer layout)
402 {
403 var grid = layout.CustomContainer<GridPanel>();
404 var gridControl = grid.CustomControl;
405 gridControl.ClipChildren = false;
406 gridControl.Height = TextBox.DefaultHeight;
407 gridControl.RowFill = new[]
408 {
409 1.0f,
410 };
411 gridControl.ColumnFill = new[]
412 {
413 0.9f,
414 0.1f
415 };
416
417 _element = grid.Custom<InputBindingBox>();
418 SetText();
419 _element.CustomControl.WatermarkText = "Type a binding";
420 _element.CustomControl.EditEnd += OnValueChanged;
421
422 var button = grid.Button("X");
423 button.Button.TooltipText = "Remove binding";
424 button.Button.Clicked += OnXButtonClicked;
425 }
426
427 private void OnXButtonClicked()
428 {

Callers

nothing calls this directly

Calls 2

SetTextFunction · 0.85
ButtonMethod · 0.45

Tested by

no test coverage detected