本文整理汇总了C#中UIToolkit.frameForFilename方法的典型用法代码示例。如果您正苦于以下问题:C# UIToolkit.frameForFilename方法的具体用法?C# UIToolkit.frameForFilename怎么用?C# UIToolkit.frameForFilename使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIToolkit
的用法示例。
在下文中一共展示了UIToolkit.frameForFilename方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UIText
public UIText( UIToolkit manager, string fontFilename, string textureFilename )
{
_manager = manager;
_fontDetails = new UIFontCharInfo[256];
for( int i = 0; i < _fontDetails.Length; i++ )
_fontDetails[i] = new UIFontCharInfo();
loadConfigfile( fontFilename );
// grab the texture offset from the UI
var rect = _manager.frameForFilename( textureFilename );
// Since the font config data adjusts for padding, but TexturePacker trimming removes it,
// We need to sub out the trimmed amount coming back from the manager.
var info = _manager.textureInfoForFilename( textureFilename );
this._textureOffset = new Vector2( rect.x - info.sourceSize.x, rect.y - info.sourceSize.y );
}
示例2: UIText
public UIText( UIToolkit manager, string fontFilename, string textureFilename )
{
_manager = manager;
_fontDetails = new UIFontCharInfo[256];
for( int i = 0; i < _fontDetails.Length; i++ )
_fontDetails[i] = new UIFontCharInfo();
loadConfigfile( fontFilename );
// grab the texture offset from the UI
var rect = _manager.frameForFilename( textureFilename );
this._textureOffset = new Vector2( rect.x, rect.y );
}