Exemplo n.º 1
0
        public static bool ToggleButton(Rect r, pg_ToggleContent content, bool enabled, GUIStyle imageStyle, GUIStyle altStyle)
        {
            content.gc.image = enabled ? content.image_on : content.image_off;
            content.gc.text  = content.gc.image == null ? (enabled ? content.text_on : content.text_off) : "";

            return(GUI.Button(r, content.gc, content.gc.image != null ? imageStyle : altStyle));
        }
Exemplo n.º 2
0
		public static bool ToggleButton(Rect r, pg_ToggleContent content, bool enabled, GUIStyle imageStyle, GUIStyle altStyle)
		{
			content.gc.image = enabled ? content.image_on : content.image_off;
			content.gc.text = content.gc.image == null ? (enabled ? content.text_on : content.text_off) : "";

			return GUI.Button(r, content.gc, content.gc.image != null ? imageStyle : altStyle);
		}