diff --git a/S1API/Products/ProductDefinition.cs b/S1API/Products/ProductDefinition.cs
index 7f606424..bcb467a7 100644
--- a/S1API/Products/ProductDefinition.cs
+++ b/S1API/Products/ProductDefinition.cs
@@ -8,6 +8,7 @@
using S1API.Internal.Utils;
using S1API.Items;
+using UnityEngine;
namespace S1API.Products
{
@@ -41,5 +42,14 @@ internal ProductDefinition(S1Product.ProductDefinition productDefinition) : base
/// An instance of the product.
public override ItemInstance CreateInstance(int quantity = 1) =>
new ProductInstance(CrossType.As(S1ProductDefinition.GetDefaultInstance(quantity)));
+
+ ///
+ /// Gets the in-game icon associated with the product.
+ ///
+ public Sprite Icon
+ {
+ get { return S1ProductDefinition.Icon; }
+ }
+
}
}
\ No newline at end of file
diff --git a/S1API/UI/UIFactory.cs b/S1API/UI/UIFactory.cs
index 894b5652..831f68ab 100644
--- a/S1API/UI/UIFactory.cs
+++ b/S1API/UI/UIFactory.cs
@@ -321,15 +321,15 @@ public static GameObject CreateQuestRow(string name, Transform parent, out GameO
/// An optional action to be invoked when the button is clicked. If null, the button will not be created.
/// The text to display on the optional button. Defaults to "Action" if not specified.
/// The created GameObject representing the top bar.
- public static GameObject TopBar(string name, Transform parent, string title,float buttonWidth,float buttonHeight,
+ public static GameObject TopBar(string name, Transform parent, string title,float buttonWidth,float buttonHeight,float topbarSize,int rectleft,int rectright,int recttop,int rectbottom,
Action onRightButtonClick = null,
string rightButtonText = "Action")
{
var topBar = Panel(name, parent, new Color(0.15f, 0.15f, 0.15f),
- new Vector2(0f, 0.85f), new Vector2(1f, 1f));
+ new Vector2(0f, topbarSize), new Vector2(1f, 1f));
var layout = topBar.AddComponent();
- layout.padding = new RectOffset(75, 75, 30, 30);
+ layout.padding = new RectOffset(rectleft,rectright,recttop,rectbottom);;
layout.spacing = 20;
layout.childAlignment = TextAnchor.MiddleCenter;
layout.childForceExpandWidth = false;