public UIImage With9Slice(int marginLeft, int marginRight, int marginTop, int marginBottom) { NineSlice = true; NineSliceMargins = new NineSliceMargins { Left = marginLeft, Right = marginRight, Top = marginTop, Bottom = marginBottom }; NineSliceMargins.CalculateOrigins(m_Texture); return this; }
public UIGameTitle() { Background = new UIImage(GetTexture((ulong)0x000001A700000002)); Background.With9Slice(40, 40, 0, 0); this.AddAt(0, Background); Background.BlockInput(); Label = new UILabel(); Label.CaptionStyle = TextStyle.DefaultLabel.Clone(); Label.CaptionStyle.Size = 11; Label.Alignment = TextAlignment.Middle; this.Add(Label); SetTitle("Not Blazing Falls"); }