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

Pages: [1] 2
1
NGUI 3 Support / UIScrollView and UIScrollBar woes
« on: July 08, 2014, 11:27:24 PM »
I am dynamically resizing items in UIGrid and having problems with these two components. UIScrollbar is not repositioning to accomodate for newly added/deleted elements, the only way I can get it to work is if I change standalone resolution and then change it back original.

edit: I am calling scrlView.UpdateScrollbars(true); after I've repopulated the UIGrid
edit: the problem is the timing issue, items are added after the scroll view is updated. I don't know what is a clean way to resolve this issue... because I have a function that populates UIGrid by creating new items from prefabs and instantly after that calls scrrollView.UpdatePosition but I am guessing the panel doesn't acknowledge new bounds until next frame or something. It's somewhat frustrating that there is no built-in functionality to notify the scrollview that it needs to update (is there?), perhaps something like boundsChanged flag/event would be useful here. Or scrollView directly could keep track whether bounds of its contents were changed every frame.

2
NGUI 3 Support / Re: Resize background to match UIGrid
« on: April 14, 2014, 04:14:03 AM »
Well I was trying to do a fancy pop-up window thingy which would scale based on amount of text in it and also contain a long list of options (inside the UIGrid), here's an early screenshot:

(textboxes can be of variable height)

I was using a widget as a way to calculate center of my object, so that I can correctly position it next to the node selected.

I think I will just write my own script to calculate the size, as number of objects inside that affect it doesn't really change.

Thanks

3
NGUI 3 Support / Re: Resize background to match UIGrid
« on: April 14, 2014, 03:21:01 AM »
sorry about that.

But it looks like it's enveloping everything, including stuff clipped by panels? I have a scrollview in one of the items I am trying to envelop content on, is there anyway to only envelop visible items?

Thanks

4
NGUI 3 Support / Re: Resize background to match UIGrid
« on: April 13, 2014, 05:27:49 PM »
I think there's possibly a bug in SetRect code UIWidget.cs line 623

  1. width = finalWidth;
  2. height = finalHeight;
  3.  

should probably be

  1. this.width = finalWidth;
  2. this.height = finalHeight;
  3.  

since width/height is also a function parameter. It wasn't really working for me until I made that change anyway.

Thanks

5
NGUI 3 Support / Resize background to match UIGrid
« on: April 13, 2014, 02:29:03 AM »
Hi,

Sorry if this was asked many times before, I couldn't find it.

I have a UIGrid which I populate with items at a run-time. UIGrid itself is located inside a frame (UISprite) which needs to be resized to match updated grid's size (as opposed to clipping contents). How can that be done?

Thanks

6
NGUI 3 Support / Re: Perfectly Aligning UISprites..
« on: April 12, 2014, 05:39:28 AM »
sorry small correction, I did not change the scale itself, but I adjusted dimensions of the sprite (sprite.width/sprite.height)

I've noticed this artifact seems to happen only when shrinking not so much with stretching. So I modified my source art to be 1 pixel wide and just stretched it to desired length. It seems to align perfectly now, even in editor I can zoom in and not see any gaps.

Thanks.

7
NGUI 3 Support / Perfectly Aligning UISprites..
« on: April 12, 2014, 04:31:58 AM »
I am trying to draw a equipment tree for my game, and am running into small artifacts when trying to connect separate UISprites to form one solid object. Here's what it looks like:



Now the sprites themselves (parts of the white arrow) were made to perfectly connect together in Photoshop (without anti-aliasing ofc). I've also changed the atlas texture filter mode to Point as opposed to Trilinear. The sprites are not scaled in Unity, it's 1:1 from source art. If you notice it also works everywhere else, only this stripe is visible for some reason..

Is there anything you can recommend to fix this? And yeah I can't use the whole arrow sprite as I am generating the tree at a runtime.

Thanks.

8
NGUI 3 Support / Re: UITexture blocks my UI
« on: January 22, 2014, 12:17:50 AM »
no I am using default NGUI ulit transparent I think? In fact I can just copy the backdrop from Example Quest scene and paste that into my scene and I am having the same problem.

9
NGUI 3 Support / UITexture blocks my UI
« on: January 21, 2014, 05:32:57 PM »
I am trying to use UITexture for backdrop but it covers some of my UI elements. I tried setting the depth to very small number and also tried moving it back but it does not help.

10
NGUI 3 Support / Re: UITable within UITable
« on: January 20, 2014, 07:16:56 PM »
I tried something similar but with UIGrid. I also had to add offset and it first it seemed like working, then I added more elements and it broke. Honestly I think its better to not nest these elements and find easier solution, too many problems in the long run!

11
NGUI 3 Support / Re: 3.0.8 f7 - ScrollBar localPosition is NaN
« on: January 20, 2014, 05:19:27 PM »
thank you that fixed it.

12
NGUI 3 Support / Re: 3.0.8 f7 - ScrollBar localPosition is NaN
« on: January 20, 2014, 04:28:41 AM »
I am having the same issue, I just updated to 3.0.9.f2 and it's still happening.

13
NGUI 3 Support / Re: UIGrid within UITable reposition issues
« on: January 20, 2014, 04:06:38 AM »
thank you that pointed me into the right direction. I removed nested UIGrids for sake of simplicity, now I just have a simple UITable with UISprite elements. I've noticed that I had to change UITable execution order AFTER UIScrollbar, otherwise first reposition call would not place the elements in the correct location.

14
NGUI 3 Support / Re: (!!!) Improving NGUI: Voice your opinion
« on: January 17, 2014, 04:28:48 PM »
I've been using NGUI for some time now. While its great for designing a simple UI, I feel like there is a lot of room for improvement in things like draggable panels and UITable/UIGrid. It's either overly complicated or there are bugs in there. Here are few examples:
  • clicking on a scrollbar when all the contents of UIPanel fit on the same page results in NaN exception.
  • Cannot use draggable panels within draggable panels (cliping issues?)
  • Having to manually call reposition is meh. Sometimes I am not sure if I called it too early or something because items aren't positioned properly
  • Using nested UITable/UIGrid seems to cause further problems (I am not sure if that;s supported)
  • New anchoring system is awesome, but it sometimes also causes NaN exceptions with anchored scrollbars.
These are just few things that come to my mind at the moment. Otherwise its a great gui system.

15
NGUI 3 Support / UIGrid within UITable reposition issues
« on: January 17, 2014, 05:29:33 AM »
I have a UITable that consists of categories which each use a UIGrid to display items (all vertical aligned). I am seeing random offsets when populating the table and calling repositionNow = true later. Am I missing something here or is this not supported?

Thanks.

Pages: [1] 2