//contructor public AnimationWindow() { SetupGUIStyles(); //properties window Properties = new AnimationPropertiesWindow(); OnGUI += DrawProperties; //get rgb colors from hex colors in Colors class KeyframeColor = Colors.HexToColor(Colors.KeyframeColor); SelectedKeyframeColor = Colors.HexToColor(Colors.SelectedKeyframeColor); WindowRect = new Rect(0f, Screen.height - 300f, 600f, 0f); WindowTitle = "Animation"; ExpandHeight = true; TimeIndicatorIcon = GameDatabase.Instance.GetTexture("KerbalAnimationSuite/Icons/timeline_arrow", false); if (TimeIndicatorIcon == null) { TimeIndicatorIcon = Texture2D.whiteTexture; } KeyframeIcon = GameDatabase.Instance.GetTexture("KerbalAnimationSuite/Icons/keyframe_icon", false); if (KeyframeIcon == null) { KeyframeIcon = Texture2D.whiteTexture; } PlayButtonNormal = GameDatabase.Instance.GetTexture("KerbalAnimationSuite/Icons/play_normal", false); if (PlayButtonNormal == null) { PlayButtonNormal = Texture2D.whiteTexture; } PlayButtonHover = GameDatabase.Instance.GetTexture("KerbalAnimationSuite/Icons/play_hover", false); if (PlayButtonHover == null) { PlayButtonHover = Texture2D.whiteTexture; } PlayButtonActive = GameDatabase.Instance.GetTexture("KerbalAnimationSuite/Icons/play_active", false); if (PlayButtonActive == null) { PlayButtonActive = Texture2D.whiteTexture; } //subscribe to the onNewAnimationClip event Suite.OnNewAnimationClip.Add(OnNewAnimationClip); }
//contructor public AnimationWindow() { SetupGUIStyles (); //properties window Properties = new AnimationPropertiesWindow (); OnGUI += DrawProperties; //get rgb colors from hex colors in Colors class KeyframeColor = Colors.HexToColor (Colors.KeyframeColor); SelectedKeyframeColor = Colors.HexToColor (Colors.SelectedKeyframeColor); WindowRect = new Rect(0f, Screen.height - 300f, 600f, 0f); WindowTitle = "Animation"; ExpandHeight = true; TimeIndicatorIcon = GameDatabase.Instance.GetTexture ("KerbalAnimationSuite/Icons/timeline_arrow", false); if (TimeIndicatorIcon == null) TimeIndicatorIcon = Texture2D.whiteTexture; KeyframeIcon = GameDatabase.Instance.GetTexture ("KerbalAnimationSuite/Icons/keyframe_icon", false); if (KeyframeIcon == null) KeyframeIcon = Texture2D.whiteTexture; PlayButtonNormal = GameDatabase.Instance.GetTexture ("KerbalAnimationSuite/Icons/play_normal", false); if (PlayButtonNormal == null) PlayButtonNormal = Texture2D.whiteTexture; PlayButtonHover = GameDatabase.Instance.GetTexture ("KerbalAnimationSuite/Icons/play_hover", false); if (PlayButtonHover == null) PlayButtonHover = Texture2D.whiteTexture; PlayButtonActive = GameDatabase.Instance.GetTexture ("KerbalAnimationSuite/Icons/play_active", false); if (PlayButtonActive == null) PlayButtonActive = Texture2D.whiteTexture; //subscribe to the onNewAnimationClip event Suite.OnNewAnimationClip.Add (OnNewAnimationClip); }