コード例 #1
0
ファイル: TileButton.cs プロジェクト: shangshen/cozy
 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);
 }
コード例 #2
0
ファイル: TileButton.cs プロジェクト: xxy1991/cozy
 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);
 }
コード例 #3
0
ファイル: SampleButton.cs プロジェクト: xxy1991/cozy
 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;
 }
コード例 #4
0
 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;
 }