public void Draw(Rect rect) { _inner.Draw(rect); rect.y += 1; rect.height = rect.height - 2; rect.x += rect.width - MaxWidth - RightOffset; rect.width = MaxWidth; GUI.Box(rect, Content.Of(_text), Style.Cached()); }
public void Draw(Rect rect) { _inner.Draw(rect); rect.y += 1; rect.height = rect.height - 2; var width = rect.height; rect.x += rect.width - width - 4; rect.width = width; var content = Content.Of(_text); GUI.Box(rect, content, GUIStyle.none); }
public void Draw(Rect rect) { _inner.Draw(rect); var texture = AssetDatabase.LoadAssetAtPath <Texture>(_path); var aspect = (float)texture.width / texture.height; rect.y += 1; rect.height = rect.height - 2; var width = rect.height * aspect; rect.x += rect.width - width - 4 - Math.Max(0, (15 - width) / 2); rect.width = width; var color = GUI.color; GUI.color = new Color(color.r, color.g, color.b, _alpha); GUI.DrawTexture(rect, texture, ScaleMode.StretchToFill, true, aspect); GUI.color = new Color(color.r, color.g, color.b, 1.0f); }
public void Draw(Rect rect) => _inner.Draw(rect);