- Sliced sprites are scaled instead of tiling (so they work properly even if the UI element is smaller than the sprite)

- Option to use separate sprites for different states of a GUIComponent (e.g. hovered/pressed button)
- Option to configure "child styles" for the individual elements of a GUIComponent (e.g. the background frame and the handle of a scroll bar)
This commit is contained in:
Regalis
2017-04-08 22:22:53 +03:00
parent 3844dd9dac
commit 34f0ae39b6
18 changed files with 296 additions and 182 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ namespace Barotrauma
if (state == ComponentState.Selected) currColor = selectedColor;
if (state == ComponentState.Hover) currColor = hoverColor;
if (!sprites.Any()) GUI.DrawRectangle(spriteBatch, rect, currColor * (currColor.A/255.0f), true);
if (sprites == null || !sprites.Any()) GUI.DrawRectangle(spriteBatch, rect, currColor * (currColor.A/255.0f), true);
base.Draw(spriteBatch);
if (OutlineColor != Color.Transparent)