private void DrawButton(Texture2D background, OnClickActions actions, GUILayoutOption[] options) { GUIStyle style = new GUIStyle(GUI.skin.button); style.normal.background = background; if (GUILayout.Button(GUIContent.none, style, options)) { actions?.Invoke(); FieldDialog <T> window = GetWindow <FieldDialog <T> >(); window.Close(); } }