public RenameableDeletableButton(string name, float width, float height, GameObject parent = null, Action <Button> DeleteEnter = null, Action <Button> DeleteStay = null, Action <Button> DeleteExit = null, Action <Button> DeleteClose = null, int fontSize = 35, Field.ContentMode contentMode = Field.ContentMode.TextAndNumbers, Field.ButtonMode buttonMode = Field.ButtonMode.Right, Field.EditMode editMode = Field.EditMode.SingleClick, Action <Field> StartInput = null, Action <Field> EndInput = null, Action <Button> Enter = null, Action <Button> Stay = null, Action <Button> Exit = null, Action <Button> Close = null, bool hideQuad = false) : base(name, width, height, parent, hideQuad) { _renamableButton = new RenamableButton(name, width - 0.5f, height, container, fontSize, contentMode, buttonMode, editMode, StartInput, EndInput, Enter, Stay, Exit, Close, hideQuad); _renamableButton.SetPosition(_renamableButton.position + (Vector3.left * 0.25f)); _deleteButton = new Button("<b>X</b>", 0.5f, height, container, "DeleteButton", DeleteEnter, DeleteStay, DeleteExit, DeleteClose, hideQuad, fontSize); _deleteButton.SetPosition(_renamableButton.position + Vector3.right * ((width * 0.5f))); _deleteButton.SetTextColor(Color.white); _deleteButton.SetColor(Color.red); }
public RenamableButton(string name, float width, float height, GameObject parent = null, int fontSize = 35, Field.ContentMode contentMode = Field.ContentMode.TextAndNumbers, Field.ButtonMode buttonMode = Field.ButtonMode.Right, Field.EditMode editMode = Field.EditMode.SingleClick, Action <Field> StartInput = null, Action <Field> EndInput = null, Action <Button> Enter = null, Action <Button> Stay = null, Action <Button> Exit = null, Action <Button> Close = null, bool hideQuad = false) : base(name, width, height, parent, false) { _field = new Field(name + "Field", name, width, height, fontSize, container, contentMode, buttonMode, editMode, StartInput, EndInput); _button = new Button(string.Empty, width, height, container, name + "Button", Enter, Stay, Exit, Close, hideQuad); }