- 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
+4 -5
View File
@@ -1,7 +1,6 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;
@@ -10,10 +9,10 @@ namespace Barotrauma
[Flags]
public enum Alignment
{
CenterX = 1, Left = 2, Right = 4, CenterY = 8, Top = 16, Bottom = 32 ,
TopRight = (Top | Right), TopLeft = (Top | Left), TopCenter = (CenterX | Top),
Center = (CenterX | CenterY),
BottomRight = (Bottom | Right), BottomLeft = (Bottom | Left), BottomCenter = (CenterX | Bottom)
CenterX = 1, Left = 2, Right = 4, CenterY = 8, Top = 16, Bottom = 32,
TopLeft = (Top | Left), TopCenter = (CenterX | Top), TopRight = (Top | Right),
CenterLeft = (Left | CenterY), Center = (CenterX | CenterY), CenterRight = (Right | CenterY),
BottomLeft = (Bottom | Left), BottomCenter = (CenterX | Bottom), BottomRight = (Bottom | Right),
}
public enum GUISoundType