Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AGB

Pages: [1] 2 3 ... 5
1
NGUI 3 Support / Re: Problem in event Delegate
« on: March 21, 2016, 02:40:48 AM »
Check != is just not always working correctly, if we speak about such kind of objects. Sometimes != returns true, even if the objects are same. And this issue makes this place loop

2
NGUI 3 Support / Problem in event Delegate
« on: March 08, 2016, 11:45:51 AM »
Must write Equals, not !=, because it just continues;

https://gyazo.com/ec2b6fd24b30ae80e14fa1806d565ab1

3
NGUI 3 Support / Re: UI2D Sprite incorrectly displays a texture.
« on: May 13, 2015, 01:48:20 AM »
Getting same problem, but removing mipMaps helps in some cases.

4
It really was like yo said before, you are right. But already a while it works like this. I am not sure, but i think now there is bb tag, that allows to ignore current font color tint.

5
> Use them how? You can use them freely, so not sure what you're asking.

I cannot use them, because they always reset after i update my atlas. I have 50 sprites with those paddings and have to write them again after each update.

> Adding an option to not reset padding -- I can add that.

 Yaaay!  :) :)

6
Hello, mister ArenMook!

Still no chance to use negative padding for buttons, like this one?
http://gyazo.com/99e68755e43314b069f73040f9d59438


If i just want to change button sprite in this screen:
http://gyazo.com/b1f6e38305ead03b79c17aa9cbabb6fb

And just use Borders for that case (without paddings)
http://gyazo.com/408e3682f92cad2fc766b8e52cb0f9c3

It looks like this:
http://gyazo.com/b8da01dd5c20e3c7b9270a78e111d08a

i have to modify the prefab.
But with help of paddings i can get this result:
http://gyazo.com/5d0d33554e2df9bfbe6609b651259ca5

Is it possible to not reset paddings, if i not set "Trim Alpha"?



7
Built in anchors help to bing one object to another.
Like this:


Sprite size now depends on Label text amount. But what is i want to change spritte to another frame:


Negative paddings for this sprite help me to adjust its size. Without those negative padding i would get this result:


But because this new sprite has a big part in the left side - i use negative paddings to "move" this design part, and free space for my text:
So i set them like this:

Here is a small video of changing sprites and always getting text inside a frame, even if sprites had different dimensions and offsets:
http://gyazo.com/cce397128c4bb8d7b5c168c117fa2e01

Here is also a package with atlas and prefab - try it yourself!
https://dl.dropboxusercontent.com/u/8776150/paddings-package.unitypackage

It is soo cool, that using negative padding saves so lot of time, when your sprites are anchores to text like this.

8
NGUI 3 Support / Re: change Color UILabel
« on: November 06, 2014, 03:35:38 PM »
new Color should take floats from 0 to 1:

new Color(0.82f,0.83f,0.8f,1f);

or maybe like this:
new Color(210f/255f,211f/255f,204f/255f,255f/255f); :)

9
But is there a reason then to allow me to modify those paddings? Maybe they should be read-only?
But anyway - i beg to you to check this feature deeper with those "negative paddings":


I can easily anchor an abstract sprite to a label size, and then change sprite like this:


And because of those negative paddings, sprite will always have a nice look! It is verry useful, when you have to switch different styles of atlases for same prefabs!
(just a bad sample, but still)

10
NGUI 3 Support / Re: Setting width to anchored texture problem
« on: November 06, 2014, 02:39:32 AM »
 ;D Thanks, this is exactly what i was looking for!

11
I mean, shen you are using "Remove empty space" function - those paddings are positive and it works very nice. But paddings are extremally useful, when setting them to negative value! nice for custom shadows and offsetting UI Visual design objects, that must not be affetced by width.

12
NGUI 3 Support / Re: Setting width to anchored texture problem
« on: November 05, 2014, 02:44:08 PM »
This code can be a dirty fix:
http://gyazo.com/ca23817b4c307f2f64dcd288a75724bc

  1.                 public void SetHorizontal (Transform parent, float localPos)
  2.                 {
  3.             if (rect == null && parent!=null)
  4.             {
  5.                 rect = parent.GetComponent<UIRect>();
  6.             }
  7.           ....
  8.            

But in reality - why is it happening like this?

13
NGUI 3 Support / Re: Setting width to anchored texture problem
« on: November 05, 2014, 02:40:41 PM »
Problem seems to be here:
UIRect.cs:

public void SetHorizontal (Transform parent, float localPos)


in this function, just after Instatiating, rect is null! But should be anchor target widget.

14
NGUI 3 Support / Re: Setting width to anchored texture problem
« on: November 05, 2014, 02:27:34 PM »
Another sample of broken anchors, in just created prefab and changed its width-height: http://i.imgur.com/Cp1NI4N.jpg

15
Why dont you reset paddings only if the "pixel cut" function is on? im using paddings for big shadows of objects, so when i set width to 100, i never think about how big is the shadow of this sprite - very nice way to use paddings for this case.

Pages: [1] 2 3 ... 5