Skip to content

Commit ccf925e

Browse files
author
Miguel Cartier
committed
feat(editor): add DefaultUiConfigsEditor for out-of-the-box UI configuration
- Introduced DefaultUiConfigsEditor extending UiConfigsEditor with DefaultUiSetId enum for default UI sets. - Provides a ready-to-use editor implementation for UiConfigs, allowing users to easily customize their UI without additional setup.
1 parent 1d5bf0d commit ccf925e

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

Editor/DefaultUiConfigsEditor.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using GameLovers.UiService;
2+
using UnityEditor;
3+
4+
namespace GameLoversEditor.UiService
5+
{
6+
/// <summary>
7+
/// Default UI Set identifiers for out-of-the-box usage.
8+
/// Users can create their own enum and custom editor to override these defaults.
9+
/// </summary>
10+
public enum DefaultUiSetId
11+
{
12+
None = 0,
13+
MainMenu = 1,
14+
Gameplay = 2,
15+
Settings = 3,
16+
Overlay = 4,
17+
Popup = 5
18+
}
19+
20+
/// <summary>
21+
/// Default implementation of the UiConfigs editor.
22+
/// This allows the library to work out-of-the-box without requiring user implementation.
23+
/// Users can override by creating their own CustomEditor implementation for UiConfigs.
24+
/// </summary>
25+
[CustomEditor(typeof(UiConfigs))]
26+
public class DefaultUiConfigsEditor : UiConfigsEditor<DefaultUiSetId>
27+
{
28+
// No additional implementation needed - uses base class functionality
29+
}
30+
}

Editor/DefaultUiConfigsEditor.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)