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 - e-tip

Pages: [1]
1
NGUI 3 Support / Re: UIScrollview scroll offset
« on: May 13, 2015, 05:50:40 AM »
Wow... Thanks

2
NGUI 3 Support / UIScrollview scroll offset
« on: May 06, 2015, 10:53:33 AM »
Hi everyone.
I've got a UIScrollview and in that scrollview i want to implement a pull to refresh function.
i've added the onDragStart and onDragFinish Event to my script but i can't find a way to calculate/obtain the offset when the user ends to drag. Does anyone have any suggestions ?
my goal is to introduce a threshold so reload function is called only when the offset is bigger than threshold
thanks in advance

3
Wow, that's should be part of official NGUI sources thanks

4
NGUI 3 Support / Re: UIPopuplist strange problem
« on: January 08, 2015, 04:00:59 AM »
Ops i mean 3.7.8

5
NGUI 3 Support / Re: UIPopuplist strange problem
« on: January 07, 2015, 10:00:24 AM »
Dear ArenMook, thanks for your reply.
I've just updated to version 3.7.7 and the problem is still there.
i've managed to solve the issue by attaching the popover to another element ( child of the previously element where my popuplist has been attached )
In the screenshot attached the non working element is the red stroked element , i've attached the popuplist to the blue element and now works

6
NGUI 3 Support / UIPopuplist strange problem
« on: December 22, 2014, 10:33:03 AM »
Hi everyone.
i'm designing a window with ngui, before the update to 3.7.7 everything was fine with my window.
Now, as i have some time and i've learnt some new thing of unity/ngui i'm redoing the app with my knowledge, and i've upgraded NGUI to latest version ( 3.7.7 )
and now my popup list does a strange thing ( screenshot attached  Schermata 2014-12-22 alle 16.30.05.png ).
if it can help any of you when i move my field to the left i get the 2.png result.
What can i check to solve this issue ?
Thanks

7
I will be very glad if i could use the scollable list :)

8
NGUI 3 Support / Re: UIScrollview with dynamic content and clip
« on: July 31, 2014, 03:15:22 AM »
Thanks ArenMook.
As previously stated i've found a workaround by setting inactive and after that active my container. Maybe it's not the best thing i can do but it works.
Thanks for your precious suggestions

9
NGUI 3 Support / Re: UIScrollview with dynamic content and clip
« on: July 10, 2014, 02:58:21 AM »
Hi ArenMook, thank you for your reply.
If i would not call onEnable the situation is even worst than what i'm getting now.
The code i use to add prefabs to the grid is the following
  1. BetterList< Transform > childs = subMaterialGrid.GetComponentInChildren<UIGrid> ().GetChildList ();
  2.                         if (childs.size > 0) {
  3.                                 for (int i = 0; i < childs.size; i++) {
  4.                                         DestroyImmediate (childs [i].gameObject);
  5.                                 }
  6.                         }
  7.                         GClasses.MaterialConfig[] availableTextures = book_manager.GetComponent<book_manager> ().getAvailableTexturesForMaterial (sender.GetComponent<MaterialData> ().materialName ());
  8.                         for (int i = 0; i < availableTextures.Length; i++) {
  9.                                         GameObject button = NGUITools.AddChild (subMaterialGrid, subMaterialbuttonPrefab);
  10.                                         button.GetComponentInChildren<MaterialData> ().setMaterialConfig (availableTextures [i]);
  11.                                         button.GetComponentInChildren<UILabel> ().text = availableTextures [i].description;
  12.                                         button.GetComponentInChildren<UILabel> ().gameObject.AddComponent<UIDragScrollView> ();
  13.                                         UIEventListener.Get (button.GetComponentInChildren<UILabel> ().gameObject).onClick += textureSelected;
  14.                                         button.GetComponentInChildren<UITexture> ().mainTexture = Resources.Load ("Textures/Buttons/btn_" + availableTextures [i].texture_name) as Texture;
  15.                                         button.GetComponentInChildren<UITexture> ().depth = 5;
  16.                         }
  17.                         subMaterialGrid.GetComponentInChildren<UIGrid> ().Reposition ();
after that code i call
  1. menuContainer.GetComponentInChildren<TweenPosition>().PlayForward();
menuContainer is the blue bordered widget.
To display the scrollview on the right.
I've found i hope temporary workaround that is call
  1. if (showingSubMaterialMenu) {
  2.                         NGUITools.SetActive (subMaterialScrollView, false);
  3.                         NGUITools.SetActive (subMaterialScrollView, true);
  4.                 } else {
  5.                         NGUITools.SetActive (materialScrollView, false);
  6.                         NGUITools.SetActive (materialScrollView, true);
  7.                 }

10
NGUI 3 Support / UIScrollview with dynamic content and clip
« on: July 09, 2014, 04:18:32 AM »
Hi everyone!
i'm facing some refresh issues with a menu i'm developing
The situation is this

I' have an UIPanel ( red stroke in the image ) that clips an area of 400x1476
as a child of this uipanel i have an UIWidget that i use for tweening.
as child of this UIWidget i have two UIScrollviews that are one on the side of the other.
content of the scrollviews are generated dynamically via code.
when i click on a button on the first scrollview i tween the UIWidget 400 px on the right moving the second scrollview inside the clip area.
The problem here is that in some cases not all my buttons are generated as you can see in this image.

in this case you can see on the left what i get and on the right what should i get.
i've done a function
  1.         public void updatepanels (){
  2.                 materialScrollView.SendMessage ("OnEnable");
  3.                 subMaterialScrollView.SendMessage ("OnEnable");
  4.         }
and call this when i begin my animation seems to solve in part the problem as this resolves the issue only in the editor while in the device is still present
Does anyone have a definitive solution ? 

11
NGUI 3 Support / [SOLVED] two scrollviews position tween problem
« on: July 02, 2014, 08:46:33 AM »
Solved : maybe not the better way but i've created a widget as parent of the two scrollviews and i tween that widget instead of animating the scrollviews
Hi everyone.
I've just bought ngui and i'm in the middle of rebuild the gui of a game i've already made with unity using OnGUI functions.
I'm having a strange issue when tweening Scrollviews.
i've got a uiPanel that contains two scrollviews one on the side of the other.
both scrollviews contains buttons added via code dynamically.

I've added a code that handle the button click that calls this function
  1.        
  2.                 if (!showingSubMaterialMenu) {
  3.                         showingSubMaterialMenu = true;
  4.                         materialScrollView.GetComponentInChildren<TweenPosition>().PlayForward();
  5.                         subMaterialScrollView.GetComponentInChildren<TweenPosition>().PlayForward();
  6.                 } else {
  7.                         showingSubMaterialMenu = false;
  8.                         materialScrollView.GetComponentInChildren<TweenPosition>().PlayReverse();
  9.                         subMaterialScrollView.GetComponentInChildren<TweenPosition>().PlayReverse();
  10.                 }
  11.         }
materialScrollView is the first scrollview and subMaterialScrollView is the second.
if this function is called by the click on the button i get strange scrollview positioning as you can see from this image

For testing purposes i've adedd to OnStart
  1. Invoke("toggleMenuSection",2);Invoke("toggleMenuSection",4);Invoke("toggleMenuSection",6);Invoke("toggleMenuSection",8);

and i can see that the scrollviews moves as i expect.

Does anyone have any suggestions ?

Thank you very much

Edit : after i've investigated a little deeper seems that is something related to the drag of the scroll view and the tween

Pages: [1]