summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/PaletteWindow.cs
blob: f0b6960fef2a7e36b2ec1fb68a2ccad67b4dd7a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>

using System.Collections.Generic;
using UnityEngine;

namespace AmplifyShaderEditor
{
	public sealed class PaletteWindow : PaletteParent
	{
		public PaletteWindow( AmplifyShaderEditorWindow parentWindow ) : base( parentWindow, 0, 0, 250, 0, string.Empty, MenuAnchor.TOP_RIGHT, MenuAutoSize.MATCH_VERTICAL )
		{
			m_searchFilterControl += "PALETTEWINDOW";
			m_initialSeparatorAmount = 4;
			SetMinimizedArea( -225, 0, 260, 0 );
		}

		public override void Draw( Rect parentPosition, Vector2 mousePosition, int mouseButtonId, bool hasKeyboadFocus )
		{
			if ( m_isMaximized )
			{
				base.Draw( parentPosition, mousePosition, mouseButtonId, hasKeyboadFocus );
			}
			else
			{
				InitDraw( parentPosition, mousePosition, mouseButtonId );
			}
			PostDraw();
		}
	}
}