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 - Yukichu

Pages: 1 [2] 3 4 ... 7
16
Why not set the alpha to 0?

17
NGUI 3 Support / Re: Make UISprite black-and-white
« on: July 22, 2014, 08:51:13 AM »
A lot of times I make my sprites black and white and add a tint via the widget to make them different colors as needed.

18
NGUI 3 Support / Re: Trying to re-create the inventory example...
« on: July 15, 2014, 01:01:48 PM »
Sorry, I'm not representative of the forum as a whole, just an individual.

Glad you figured it out.

19
NGUI 3 Support / Re: UITooltip and incorrect text size
« on: July 15, 2014, 08:45:02 AM »
Thanks, that explains it perfectly. 

I'll just write my own for the functionality I need.  Thanks!

20
NGUI 3 Support / Re: Trying to re-create the inventory example...
« on: July 15, 2014, 08:43:17 AM »
Snippy aren't we?  You get the free version so you can test drive the product.  This is software, not a car.  When I get a 90 day trial of Windows Server 2008 or whatever, I don't think I can call Microsoft to open a support ticket for a trial product?  Maybe if I pay them a lot of money.

This is a forum for support from the vendor.  Other people can chime, in sure, but when the vendor/owner says he doesn't support the free product, don't be a douche about it, because that's how it is - that's the agreement for using the free product.  You can't get it to work?  Pay for it then.  It's relatively cheap for a very powerful product.

Why should the owner spend his time, which could be time spent resolving paid customers' issues, creating new features, fixing bugs, whatever... on someone who has a free version?  Easy, he shouldn't.

(...and yes, I know the new server products don't have trials anymore.)

21
NGUI 3 Support / UITooltip and incorrect text size
« on: July 14, 2014, 09:37:31 AM »
So I made a UITooltip and it works wonderfully other than it thinks the text is some weird size compared to what it actually is, causing the background box to be too slim and too tall.  After much brainpower spent, I also realized there were some other on-the-fly type options I wanted for the tooltip, so I ended up adding:

  1.     static public void ShowText(string tooltipText, NGUIText.Alignment align, UILabel.Overflow overflow, Vector4 offset, int width = 0)
  2.     {
  3.         if (mInstance != null)
  4.         {
  5.             mInstance.text.overflowMethod = overflow;
  6.             mInstance.text.alignment = align;
  7.             if (width != 0)
  8.                 mInstance.text.width = width;
  9.             mInstance.SetText(tooltipText, offset);
  10.         }
  11.     }

and I overloaded SetText with

  1.     protected virtual void SetText(string tooltipText)
  2.     {
  3.         SetText(tooltipText, Vector4.zero);
  4.     }
  5.  
  6.     protected virtual void SetText(string tooltipText, Vector4 offsetBorderSize)
  7.         {
  8. ...
  9.                         if (background != null)
  10.                         {
  11.                                 Vector4 border = background.border + offsetBorderSize;
  12.  
  13.  

Granted I'm no code genius, but it lets me set the tooltip's label overflow and alignment to be different as needed, the width of the tooltip when needed, and pad the sides of the background box as needed.

It works great.  I am sure the border thing isn't working 100% as desired, but it works so far.

So the question is, could this be added?  I tried extending the class, but using the static method and mInstance was giving me fits and rather than figure it out I just went with this approach.

Regardless of my lack of knowledge of how to do it properly, having a more customized version of setting the UITooltip text is helpful.

22
NGUI 3 Support / Re: 3.6.6 Broke layout
« on: July 01, 2014, 07:00:33 PM »
Aren was nice enough to post the old UIAnchor to use, which I haven't tried yet.  I guess I'm just going to convert the anchors I have, which will be good in the long term.

http://www.tasharen.com/forum/index.php?topic=10175.msg47801#msg47801 was the post with the UIAnchor.cs file.

23
NGUI 3 Support / Re: 3.6.6 Scene View Strangeness
« on: June 30, 2014, 09:10:11 AM »
Thank you.  I realized the old anchors were deprecated; however, since I was using so many of them and they still 'worked' I left them in.  I remember reading in some various threads during the anchor transition to a new type, there were suggestions to just stick with the old anchors.

Perhaps I'll spend the time to update all the anchors.  Thanks.

24
NGUI 3 Support / Re: 3.6.6 Scene View Strangeness
« on: June 29, 2014, 03:44:02 PM »
Well, I see it is for the 'hidden gamewindow' thing.  I have a laptop, and not one of those newfangled 24" laptops or 19" with pull out second screen.  1600 x 900 laptop, so having the game view and scene view up at the same time is a waste. 

Just wondering if there's a way for me to disable this, or perhaps for a toggle to be added to turn it on/off.

Edit:  It doesn't seem reliable even with the gameview open at the same time.  It occasionally sets my anchors to 1.6902102 etc. or something.

25
NGUI 3 Support / 3.6.6 Scene View Strangeness
« on: June 29, 2014, 02:46:47 PM »
I updated to version 3.6.6 today.

I am using legacy anchors.

Whenever I resize the Scene View window, it adjusted the anchor's position.  Since I work on a laptop without a lot of screen space, I often resize things as needed.  This is driving me batty. 

I change the layout to a different layout, which has different dimensions to that window, and it adjusts the anchor again.  I change it back, anchor position is still wrong.  It's working off of width of the scene view window.  Height does not affect it.  I make it wider, anchor goes bonkers.

I read something about the 'real WYSISWYG' code, and I presume this has something to do with it but... ugh.  Is there an option to turn it off?  Or should I spent a day converting everything to current-anchor code?

26
Thank you for the insight as to setting the popup list value to the 0 index after recreating the list.  Haven't tested it, but I presume it'll work.

In regards to 'right' or 'left' of the mouse, the popup list will always appear either above or above the mouse, depending as to whether it's above/below the middle of the Y height, yes; however, it will always appear to the right of the mouse cursor, regardless if you are at the edge of the screen, at least for me.  My request for either have the ability to make it on the left or right of the mouse click with an option, or perhaps another left/right of the middle of the X axis sort of thing.

Basically, I have an item with a popup list near the far right of the screen and the popup list is going off of the visible screen.  I had to change the code to make it go to the left and was wondering if there could be an option for this.

27
NGUI 3 Support / Re: UITable Insert
« on: June 18, 2014, 11:50:49 AM »
I guess nevermind.

The way I was 'correcting' this was by removing all the children and recreating it each time when you left this menu and then came back later.

So, to do this while still viewing the menu... I'm just doing the same thing now.  I destroy all the children in the grid and recreate it all on the fly in the correct order.

Works for now, but if there is a better way to do this... I've love to know.  I presume it works from some examples I think I remember.  Maybe I ought to go looks at some when I'm bored.

28
Never saw a reply to this, so I thought I'd bring it up again since the last update I did I had to figure out what I changed in UIPopupList.cs and reproduce it again.  This time I saved my changes somewhere to remember so I don't have to worry about it as much; however, these two options might be nice.

First, last, only bump to this.  If it never goes in, well, that's okay.

29
I had issues where if I had two spaces between the end/start of sentences, I'd get the same issue sometimes (not all the time).

Not sure if it's related, but worth a check.  I just remember to use a single space between sentences now.

30
NGUI 3 Support / UITable Insert
« on: June 17, 2014, 08:20:58 PM »
I've tried and tried to do this on my own, but I've failed miserably, so I'm back to the forums feeling like things either don't work right in my brain, or in NGUI. 

I have a UITable.  It gets filled with stuff.  I want to insert a new object into the next-to-last position.  When I do this, the object always shows up in the last position, unless I leave/return to the table which involves disabling/enabling the gameobjects.

  1.         int index = m_tblCharSelectTable.children.Count - 1;
  2.  
  3.         GameObject child = NGUITools.AddChild(m_tblCharSelectTable.gameObject, m_btnCharSelectNew.gameObject);
  4.  
  5.         mTable.children.Insert(index, child.transform);
  6.         mTable.repositionNow = true;
  7.         //NGUITools.MarkParentAsChanged(mTable.gameObject);
  8.  

It doesn't really matter where I try to put the index if I recall, it always adds it at the last object until I disable/enable the panel.  I'll have to investigate that more, but it doesn't matter if I mark parent as changed, repositionNow, reposition(), whatever...    it's always adding it to the last index.

So I must be doing this wrong.  Advice on how to do this correctly please?

Pages: 1 [2] 3 4 ... 7