/// <summary> /// Adds a numeric input for the current GUI. /// </summary> /// <param name="bounds">The bounds of the number input.</param> /// <param name="OnTextChanged">The event fired when the number is changed.</param> /// <param name="font">The font for the numbers.</param> /// <param name="key">The name for this GuiElementNumberInput</param> public static GuiComposer AddNumberInput(this GuiComposer composer, ElementBounds bounds, API.Common.Action <string> OnTextChanged, CairoFont font = null, string key = null) { if (font == null) { font = CairoFont.TextInput(); } if (!composer.composed) { composer.AddInteractiveElement(new GuiElementNumberInput(composer.Api, bounds, OnTextChanged, font), key); } return(composer); }