GUIStyle improvements & some simple UI graphics, networking bugfixes, separate Random class, some StyleCop cleanup

This commit is contained in:
Regalis
2015-07-02 22:24:50 +03:00
parent b493ed2b39
commit d836a99515
119 changed files with 8842 additions and 1277 deletions
@@ -90,12 +90,9 @@ namespace Subsurface.Items.Components
//frame.SelectedColor = Color.Gold * 0.5f;
GUITextBlock textBlock = new GUITextBlock(
new Rectangle(0, 0, 0, 25),
fi.TargetItem.Name,
new Rectangle(0, 0, 0, 25), fi.TargetItem.Name,
color, Color.Black,
Alignment.Left,
Alignment.Left,
itemList);
Alignment.Left, Alignment.Left, null, itemList);
textBlock.UserData = fi;
textBlock.Padding = new Vector4(5.0f, 5.0f, 5.0f, 5.0f);
@@ -114,7 +111,7 @@ namespace Subsurface.Items.Components
int width = 200, height = 150;
selectedItemFrame = new GUIFrame(new Rectangle(Game1.GraphicsWidth / 2 - width / 2, itemList.Rect.Bottom+20, width, height), Color.Black*0.8f);
selectedItemFrame.Padding = GUI.style.smallPadding;
//selectedItemFrame.Padding = GUI.style.smallPadding;
if (targetItem.TargetItem.sprite != null)
{
@@ -134,10 +131,10 @@ namespace Subsurface.Items.Components
text,
Color.Transparent, Color.White,
Alignment.CenterX | Alignment.CenterY,
Alignment.Left,
Alignment.Left, null,
selectedItemFrame);
GUIButton button = new GUIButton(new Rectangle(0,0,100,20), "Create", Color.White, Alignment.CenterX | Alignment.Bottom, selectedItemFrame);
GUIButton button = new GUIButton(new Rectangle(0,0,100,20), "Create", Color.White, Alignment.CenterX | Alignment.Bottom, GUI.style, selectedItemFrame);
button.OnClicked = StartFabricating;
button.UserData = targetItem;