Separate component style for item UIs + option to select the style in the item config files, removed a bunch of hard-coded UI element color changes

This commit is contained in:
Regalis
2017-04-10 18:11:23 +03:00
parent 34f0ae39b6
commit dc6ed7daf1
21 changed files with 98 additions and 84 deletions

View File

@@ -254,14 +254,9 @@ namespace Barotrauma
public GUIFrame CreateCharacterFrame(GUIComponent parent, string text, object userData)
{
GUIFrame frame = new GUIFrame(new Rectangle(0, 0, 0, 40), Color.Transparent, null, parent);
GUIFrame frame = new GUIFrame(new Rectangle(0, 0, 0, 40), Color.Transparent, "ListBoxElement", parent);
frame.UserData = userData;
frame.Padding = new Vector4(5.0f, 5.0f, 5.0f, 5.0f);
frame.HoverColor = Color.LightGray * 0.5f;
frame.SelectedColor = Color.Gold * 0.5f;
// string name = character.Info.Name.Replace(' ', '\n');
GUITextBlock textBlock = new GUITextBlock(
new Rectangle(40, 0, 0, 25),
text,