Skip to content

Commit

Permalink
Merge pull request #55 from JasonMa0012/2.x
Browse files Browse the repository at this point in the history
Fix Ramp Property Drawer
  • Loading branch information
JasonMa0012 authored Jul 31, 2024
2 parents 31cb0b2 + ee53e11 commit cd7dcf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static class LwguiGradientEditorHelper
private static readonly int s_LwguiGradientHash = "s_LwguiGradientHash".GetHashCode();
private static int s_LwguiGradientID;

// GradientEditor.DrawGradientWithBackground()
public static void DrawGradientWithBackground(Rect position, LwguiGradient gradient, ColorSpace colorSpace, LwguiGradient.ChannelMask viewChannelMask)
{
Texture2D gradientTexture = gradient.GetPreviewRampTexture(256, 1, colorSpace, viewChannelMask);
Expand All @@ -23,8 +24,9 @@ public static void DrawGradientWithBackground(Rect position, LwguiGradient gradi
GUI.DrawTextureWithTexCoords(r2, backgroundTexture, texCoordsRect, false);

// Outline for Gradinet Texture, used to be Frame over texture.
GUI.Box(position, GUIContent.none);

// LWGUI: GUI.Box() will cause subsequent attributes to be unable to be selected
// GUI.Box(position, GUIContent.none);

// Gradient texture
Color oldColor = GUI.color;
GUI.color = Color.white; //Dont want the Playmode tint to be applied to gradient textures.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.jasonma.lwgui",
"version": "1.18.1",
"version": "1.18.2",
"displayName": "LWGUI",
"description": "A Lightweight, Flexible, Powerful Shader GUI System for Unity.",
"keywords": [
Expand Down

0 comments on commit cd7dcf0

Please sign in to comment.