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.


Topics - ankit khetrapal

Pages: [1]
1
NGUI 3 Support / Make Links in string clickable
« on: January 27, 2014, 02:24:14 AM »
Hi NGUI Team,

Is there any way i can make links in a particular string(applied on a UILabel as text) clickable(basically when the user clicks on that area of the label we open that particular link in a new tab).

I can easily strip the links using RegEx and then apply different color codes to them but the issue is my label has multiple lines and i cannot split the normal texts and links in different labels as it would lead to inappropriate collider position triggering the action.

Eg Here is the label

i am using ngui http://www.tasharen.com/?page_id=140 try
this great tool. here is the
forum http://www.tasharen.com/forum/index.php

Now can i have colliders on the specific areas where there is a link and then trigger the event to open that link in a new tab from there.

2
NGUI 3 Support / PopUP List and Dynamic Font issue.
« on: December 02, 2013, 07:57:33 AM »
The image attached("ActualLayout") is my default layout.

No when i open the contents of the PopUp list the labels below that are coming above the background of the PopUpList which can be observed in image attached("issue")

How can this be resolved.


3
NGUI 3 Support / Scroll Bar with Thumb
« on: September 30, 2013, 07:45:04 AM »
How Can one create a scroll bar with thumb using NGUI(something like we use for UI Slider).

Please check the screenshot for what i exactly want


4
NGUI 3 Support / Missing NGUI scripts when exporting projects
« on: September 17, 2013, 01:25:07 PM »
Hi NGUI Team,

I have two different projects compiled with same version of NGUI(2.6.1)now i am thinking of merging those projects so i am exporting all the content from lets say project1, but when exporting the package i am not selecting the NGUI script files as they will already be available in the other project, lets say project 2.

But when doing so i am getting missing scripts exception in the project2 on the content exported from project1.

i did some research and reached to this link:

http://www.tasharen.com/forum/index.php?topic=1301.0

which says me to enable meta data but even that didn't help.

Other possible solution which could be suggested is to include NGUI script files when exporting content from Project1 and the overwriting those when importing this in project2, i know that is feasible but that won't help my cause as i have made a lot of custom edits to NGUI scripts in the project2 and in future i am also planning to add a lot of projects to the current one.

So what is the exact solution to handle this.

5
NGUI 3 Support / How to create Nested UIDraggablePanel
« on: July 30, 2013, 02:42:49 AM »
Hi NGUI Team,

How can i create Nested UIDraggablePanel, basically i want to have a draggable panel inside other draggable panel.

I know setting this up isn't hard, the tough part which i am stuck at is to make the elements of nested panel clamp inside the bounds of the head panel.

i will try and explain this more precisely, i want that when i drag the head panel contents, the nested panel elements should also move with them which is happening but i want them to stay visible only within the heap panel clipped area but they are even visible outside it.


Please check attached image for more refference

6
Hi NGUI Team,

I am planning to implement a Facebook application in which the user can see his wall posts,the snapshot for the Post Prefab is attached, now the problem which i am facing is that i want to add a ShowMore button(as shown in the image) which will appear in case the message for the post(UILabel) is more then lets say 4 lines(which has a fixed Max width of lets say 200 pixels).

Now on pressing the Show more button i want the complete post message to appear, to do that i will have to increase the background sprite of the prefab to certain pixels(depending on total number of lines for a post) plus i will even have to shift down the elements(like comment button , share button and like button)which are placed lower than the message to same number of pixels.But i am not able to understand how can i get the total line count for the UILabel when it is showing the complete messages.if i can have the line count i can easily convert it to pixels and do my stuff.



Now here are the things which i have already tried,

i tried creating a custom method which could help me get total number of lines, here is the code for that

   public static int GetTotalLines(UILabel label)
   {
      Vector2 result = label.font.CalculatePrintedSize(label.text,false,UIFont.SymbolStyle.None);
      int totalLInes = Mathf.RoundToInt((result.x * label.transform.localScale.x)/label.lineWidth);
      return totalLInes;
   }

now the issue with this functionality is that the font.CalculatePrintedSize doesn't calculate pixel space for the white spaces in the message, so if a message has lot of white spaces it will lead to wrong result.

i even tried out the relativeSize property of the UILabel as described in this link

http://www.tasharen.com/forum/index.php?topic=4509.0

but even this will not work for me as it returns the position with respect to max line count set, not total size(i.e not size in show more mode)

Is there any other way which you guys could guide me through.

Thanks in Advance.


7
Hi,

i am adding data dynamically on a UIDraggablePanel, now suppose i added 10 widgets and now the user is scrolling down and down to see all the widgets, now how can i determine that the user has reached the end so that i can add more data to the list.

8
Hi All,

I just updated my project from version 2.3 to 2.6.2 and after the upgrade positions for all the widgets in the game, nothing is at it's actual place.

I have followed the instructions given on the forum

1. open new scene
2. Delete NGUI folder
3. Import Latest Update

But still every widget in my game just changed it's position,can someone please help me out with this.

I did keep a back up of the project before updating NGUI and it is working absolutely fine so surely this has something to do with NGUI Update...


Pages: [1]