private void Init() { label.Text = "Search"; input = CreateChild <BasicInput>("input", 1); { input.Anchor = AnchorType.Fill; input.Offset = new Offset(0f, 24f, 0f, 0f); input.Background.Color = new Color(1f, 1f, 1f, 0.25f); input.CreateIconSprite(spriteName: "icon-search", size: 24f); input.OnSubmitted += (value) => { value = value.Trim(); if (!string.IsNullOrEmpty(value) || !value.Equals(Model.Options.SearchTerm.Value)) { Model.Options.SearchTerm.Value = value; } }; } }
private IEnumerator CreateIcon() { input.CreateIconSprite(spriteName: "icon-search"); yield break; }