Aimbot-PPO/Aimbot-PPO-MultiScene/Assets/XCharts/Editor/MainComponents/ThemeEditor.cs
Koha9 2d404cfdf2 Aimbot Enviroment very first
Basic environment include Multi scene, Reward Change, Visible chart, etc....
2022-09-05 20:46:08 +09:00

39 lines
958 B
C#

using UnityEditor;
using UnityEngine;
using XCharts.Runtime;
#if dUI_TextMeshPro
using TMPro;
#endif
namespace XCharts.Editor
{
[CustomEditor(typeof(Theme))]
public class ThemeEditor : UnityEditor.Editor
{
static class Styles
{
internal static GUIContent btnReset = new GUIContent("Reset", "Reset to default theme");
internal static GUIContent btnSync = new GUIContent("Sync Font", "Sync main theme font to sub theme font");
}
private Theme m_Theme;
void OnEnable()
{
m_Theme = target as Theme;
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
if (GUILayout.Button(Styles.btnReset))
{
m_Theme.ResetTheme();
}
if (GUILayout.Button(Styles.btnSync))
{
m_Theme.SyncFontToSubComponent();
}
}
}
}