NGUI(3.0.6) - sprite

在NGUI 中 sprite分为四种类型:simple、sliced、tiled、filled。

  • simple 类型:使用simple类型时,sprite的显示和你做好的atlas 中的 sprite是一样的,不会有什么改变。
  • sliced 类型: sliced 意思是 切片的意思,就是说它只是原图的一个部分。在sprite的创建如下:

    

sliced 使用的部分就是 中间的那部分。这中间的部分的设置由 Border 属性设置。

  • tiled 类型:tiled指的是块的意思。当我们使用sprite的时候,最开始sprite在视图中显示的是sprite的原始大小,即这个时候widget的大小是刚好对齐(snap)的。但往往这个大小不是我们需要的,我们需要放大。我们就会修改widget下的,改变大小。

注意了,这个时候,区别就出来了。当widget的dimensions的大小大于 sprite的原始大小时,simple、sliced和 tiled 就会表现出不同了。

simple、sliced:拉伸自己,填充满widget的空间。

tiled:不拉伸自己,而是复制多个本身大小的sprite来填充widget空间

  • filled 类型:
    • filled 设置 选项如下: 
    • 我们可以选择从不同的方向对sprite做出改变,改变的大小有Fill Amount决定。 invert Fill 会镜像翻转。
3.0.6 - NEW: NGUI now has new written documentation. - NEW: NGUI now has an abundance of context-sensitive help. Just right click on an NGUI component and choose the Help option. - NEW: NGUI now has robust context menus letting you add, create and modify widgets by right-clicking on stuff in the Scene View. - NEW: You can now find an assortment of ready-made controls ready to be drag & dropped into your scenes (search for "Wooden"). - NEW: You can now drag & drop GUI prefabs from your Project Folder right into the Scene View. No need to create the UI beforehand. - NEW: You can now copy/paste label styles by right-clicking the UILabel script in Inspector. - NEW: Redesigned the draggable panel class a bit, and renamed it to UIScrollView. UIDragPanelContents is now UIDragScrollView. - NEW: Labels can now have gradients. - NEW: Clipped panels now have handles you can drag around instead of adjusting clipping in inspector. - NEW: Added a new widget type capable of drawing Unity 4.3 sprites. - NEW: Added UIToggle.GetActiveToggle. - NEW: You can now specify a material on dynamic font-using UILabels. - NEW: You can now specify character spacing on labels, and it works with both bitmap and dynamic fonts. - NEW: Labels set to maintain their crispness will now take UIRoot's size into account, resulting in crisp labels with fixed size UIs. - NEW: Added a simple script that makes it possible to center a scrollable panel on a child when clicked on. - NEW: Redesigned the scroll bar and the slider components. They now also derive from a new common class (Progress Bar). - NEW: UIButtonKeyBinding has been replaced with UIKeyBinding and its functionality has been enhanced. - FIX: Panels will now add rigidbodies to themselves since Unity 4.3 mentions it should improve performance. - FIX: UIScrollView's movement restriction now makes sense (no more weird 'scale') - FIX: Draggable panels should no longer move on Play. - FIX: Improved performance by reducing GC allocations and mesh assignments. - FIX: Typewriter and text list scripts can now be used with dynamic fonts. - FIX: Reference atlas references should no longer get broken when modifying sprites. - FIX: Popup list now offers a way to change the font's size even for fixed size fonts. - FIX: Popup list was not enveloping the content correctly. - FIX: Atlas and font selector will now show all existing assets, not just recently used ones. - FIX: Atlas maker should no longer throw an exception when trying to edit old atlases (SciFi etc). - FIX: Enabling and disabling widgets will no longer cause the draw call list to be rebuilt unless it's necessary. - FIX: Improving the process of NGUI remembering the last used values. - FIX: Drag handles will now hide if there is not enough space to draw them. - FIX: Anchors and stretch scripts set to "run only once" will still respond to screen size changes. - FIX: Switching panel to clipped mode then back should refresh the shader correctly. - FIX: Moving widgets around no longer causes their buffers to get rebuilt. Just re-transformed. - FIX: Added extra code to ensure that draw calls won't get orphaned. - FIX: Panel alpha is now cumulative (parents affect children). - FIX: Got rid of old double-buffering code that was causing issues. - FIX: More Win8 tweaks. - DEL: UIPopupList no longer has a 'textLabel' option. Instead use label's SetCurrentSelection for OnValueChanged. - DEL: UIGrid and UITable no longer have 'repositionNow' member variable. Right-click it to execute it instead.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值