static GuiProperty() { InputTextPadding = 5.0f; InputTextCursorWidth = 1.0f; TextLegalInput = new LegalContainer <char>(); }
public GuiInputText( string name, float width, Color <float> background, Color <float> frontground, Font font) { AddComponent(new LogicGuiComponent()); AddComponent(new InputTextGuiComponent(width, background, frontground, font)); LegalInput = GuiProperty.TextLegalInput; var logicComponent = GetComponent <LogicGuiComponent>(); logicComponent.EventParts.Add(GuiComponentSupportEvent.Focus, new GuiComponentFocusEventPart()); logicComponent.EventParts.Add(GuiComponentSupportEvent.Input, new GuiComponentEventPart( (control, eventArg) => { var inputArg = eventArg as GuiComponentInputEvent; })); }