fluid-dialogue
fluid-dialogue copied to clipboard
Dark mode muted colors
Dark mode colors are muted because the nodes are inheriting from the GUI box skin. Instead the code should look something like this where it doesn't inherit the pre-existing colors.
public GUIStyle Style { get; }
public NodeBoxStyle (Color32 border, Color background) {
var texture = CreateTexture(19, 19, border);
texture.SetPixels(1, 1, 17, 17,
Enumerable.Repeat(background, 17 * 17).ToArray());
texture.Apply();
Style = new GUIStyle {
border = new RectOffset(1, 1, 1, 1),
normal = {
background = texture,
textColor = Color.white,
},
alignment = TextAnchor.MiddleCenter,
fontSize = 12,
padding = new RectOffset(5, 5, 5, 5),
};
}