static public void DrawRect(Rect rect, Color color) { GUIExtensions.PushPopColor(color, delegate() { GUI.DrawTexture( rect, GetWhitePixelTexture() ); }); }
static public bool SpriteButton(Rect rect, Sprite sprite) { Rect inner_rect = rect.GetShrunk(1.0f); DrawRect(rect, Color.gray.GetBrightened(0.9f)); DrawRect(inner_rect, Color.gray); GUIExtensions.DrawSprite(inner_rect, sprite); return(ClickZone(rect)); }