0.6.0: Added ui layer and canvas picker

This commit is contained in:
Anders Ejlersen 2021-04-12 11:40:04 +02:00
parent 27d7ecb2dd
commit 169d11a2dd
10 changed files with 206 additions and 11 deletions

View file

@ -36,16 +36,17 @@ namespace Game.NavigationTool.Editor
private static void OnGUI()
{
const float Y = 5.0f;
const float SPACING = 8.0f;
const float SPACING = 4.0f;
const float HEIGHT = 22.0f;
const float PLAY_BUTTON_EXTENT = 48.0f;
const float PLAY_BUTTON_EXTENT = 75.0f;
const float PLAY_BUTTON_OFFSET = -23.0f;
if (DRAWERS == null)
return;
styles.Initialize(GUI.skin);
float xLeft = EditorGUIUtility.currentViewWidth * 0.5f - PLAY_BUTTON_EXTENT;
float xRight = EditorGUIUtility.currentViewWidth * 0.5f + PLAY_BUTTON_EXTENT;
float xLeft = EditorGUIUtility.currentViewWidth * 0.5f + PLAY_BUTTON_OFFSET - PLAY_BUTTON_EXTENT;
float xRight = EditorGUIUtility.currentViewWidth * 0.5f + PLAY_BUTTON_OFFSET + PLAY_BUTTON_EXTENT;
for (var i = 0; i < DRAWERS.Length; i++)
{