示例#1
0
 private void updateSprite()
 {
     if (this.selectedSprite != null)
     {
         UISpriteUtility.SetupHorizontalThreePatch(this.selectedSprite, this.Width, this.Height, (float)this.selectedImageNinePatch.Left, (float)this.selectedImageNinePatch.Right);
     }
 }
示例#2
0
 private void SetupSprite()
 {
     if (this.upperEdgeSprt == null || this.lowerEdgeSprt == null)
     {
         this.upperEdgeSprt = new UISprite(3);
         this.listItemContainer.RootUIElement.AddChildLast(this.upperEdgeSprt);
         this.upperEdgeSprt.Image      = new ImageAsset(SystemImageAsset.ListPanelSeparatorTop);
         this.upperEdgeSprt.ShaderType = ShaderType.Texture;
         this.lowerEdgeSprt            = new UISprite(3);
         this.listItemContainer.RootUIElement.AddChildLast(this.lowerEdgeSprt);
         this.lowerEdgeSprt.Image      = new ImageAsset(SystemImageAsset.ListPanelSeparatorBottom);
         this.lowerEdgeSprt.ShaderType = ShaderType.Texture;
     }
     UISpriteUtility.SetupHorizontalThreePatch(this.upperEdgeSprt, this.listItemContainer.Width, 1f, (float)ListPanelItem.margin.Left, (float)ListPanelItem.margin.Right);
     UISpriteUtility.SetupHorizontalThreePatch(this.lowerEdgeSprt, this.listItemContainer.Width, 1f, (float)ListPanelItem.margin.Left, (float)ListPanelItem.margin.Right);
 }