public TileButton(CozyTexture texture, Rectangle SourceRect) { PreferredHeight = 32; PreferredWidth = 32; Margin = new Starbound.UI.Thickness(3, 3, 0, 0); Content = new XNAImageResource(texture.Get()); SourcePosition = new Starbound.UI.Vector2(SourceRect.X, SourceRect.Y); SourceSize = new Starbound.UI.Vector2(SourceRect.Width, SourceRect.Height); }
public SampleButton(double x, double y) { PreferredHeight = 50; PreferredWidth = 150; Margin = new Starbound.UI.Thickness(3, 3, 0, 0); Font = Starbound.UI.Application.ResourceManager.GetResource<Starbound.UI.Resources.IFontResource>("Font"); Background = new Starbound.UI.SBColor(random.NextDouble(), random.NextDouble(), random.NextDouble()); Foreground = new Starbound.UI.SBColor(random.NextDouble(), random.NextDouble(), random.NextDouble()); X = x; Y = y; }
public SampleButton(double x, double y) { PreferredHeight = 50; PreferredWidth = 150; Margin = new Starbound.UI.Thickness(3, 3, 0, 0); Font = Starbound.UI.Application.ResourceManager.GetResource <Starbound.UI.Resources.IFontResource>("Font"); Background = new Starbound.UI.SBColor(random.NextDouble(), random.NextDouble(), random.NextDouble()); Foreground = new Starbound.UI.SBColor(random.NextDouble(), random.NextDouble(), random.NextDouble()); X = x; Y = y; }