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

Pages: [1] 2
1
NGUI 3 Support / Re: Typewriter Effect, how to reset it?
« on: April 28, 2017, 12:04:15 PM »
UPDATE: if i add

EventDelegate.Add (main_label_obj.GetComponent<TypewriterEffect> ().onFinished, function_test);

on my void Start on the original typewritereffect component it works, but after i remove it and add it a new one seems like i can't point on it, no idea why...

so this works:

void Start(){
          EventDelegate.Add (main_label_obj.GetComponent<TypewriterEffect> ().onFinished, function_test);
          main_label.text = "Benvenuto Giocatore";
}

but i need to do this and don't work:
           
            Destroy (main_label_obj.GetComponent<TypewriterEffect> ());
      main_label_obj.AddComponent<TypewriterEffect> ();
      main_label_obj.GetComponent<TypewriterEffect> ().ResetToBeginning ();
      EventDelegate.Add (main_label_obj.GetComponent<TypewriterEffect> ().onFinished, function_test);

why i can't point to the new component? : (

2
NGUI 3 Support / Re: Typewriter Effect, how to reset it?
« on: April 28, 2017, 11:48:59 AM »
doesn't work : (

   public void interaction(){
      Destroy (main_label_obj.GetComponent<TypewriterEffect> ());
      main_label_obj.AddComponent<TypewriterEffect> ();
      main_label_obj.GetComponent<TypewriterEffect> ().ResetToBeginning ();
      EventDelegate.Add (main_label_obj.GetComponent<TypewriterEffect> ().onFinished, function_test);
      main_label.text = testi [counter_dialogue];
      counter_dialogue++;
   }

Have you any idea why my function_test don't start when main_label.text is complete?

3
NGUI 3 Support / Re: Typewriter Effect, how to reset it?
« on: April 26, 2017, 11:57:47 PM »
UPDATE:
tried in this way:       EventDelegate.Set (main_label_obj.GetComponent<TypewriterEffect> ().onFinished, delegate() {
         my function ();
but doesn't work :(

4
NGUI 3 Support / Re: Typewriter Effect, how to reset it?
« on: April 26, 2017, 05:50:08 PM »
sorry another thing...
after i added a new typewritereffect i have to set again the <TypewriterEffect>().onFinished behaviour, usually i add the function in the inspector, i tried to do something like this:

      main_label_obj.AddComponent<TypewriterEffect> ();
      main_label_obj.GetComponent<TypewriterEffect> ().onFinished += my_function_in_the_same_script;

but i receive error "Operator `+=' cannot be applied to operands of type `System.Collections.Generic.List<EventDelegate>' and `method group'"

sorry i'm not very good in scripting...dunno how i can simply pass my function to typewritereffect :(

5
NGUI 3 Support / Re: Typewriter Effect, how to reset it?
« on: April 26, 2017, 04:41:42 PM »
excuse me ArenMook, i'm trying to solve the same problem and Addcomponent works great but if i use something like that:

      main_label.text = "";
      main_label_obj.AddComponent<TypewriterEffect> ();
      main_label.text = test_array [counter_dialogue];
      counter_dialogue++;

the new string become entirely visible for a fraction of second before the typewriting effect start to write it correctly.
How can i avoid to see on the screen the entire string before the typewriting effect starts?

6
first of all thanks for your reply as always!
sorry i don't understand your solution i'm so noob : )
i have an uitexture prefab, his dimensions is equal to screen dimension, no anchors.
when i have to instantiate it i put a texture on it picked from android/ios gallery, if i don't set "fixed aspect" the texture fill all the screen, if i set "fixed aspect" on the prefab my texture ratio is correct, but when i rotate the device  i need to update uitexture h/w for wide, i attach to this post an example image, maybe you understood that right and i don't understand your solution, in that case please try to explane that again to me : (
thanks!

EDIT: the second images is different my bad XD but they have the same ratio so i suppose is clear enough : )

7
NGUI 3 Support / ui texture resize on device orientation change problem
« on: August 10, 2016, 06:48:17 PM »
hello everyone!
i'm trying to create an image gallery with NGUI for my app in ios/android, but i have a huge problem:
i am using a grid filled with uitexture with fixed aspect flag set, in this way my images keep their ratio in fullscreen.
the problem is when i rotate my device in widescreen, the image result small in the center of the screen, there is a way to update my uitexture for fill the screen when i rotate my device?
sorry for my english, please any help is appreciated : )
thank you!

8
NGUI 3 Support / Re: NGUI Timeline scrollview memory management
« on: August 02, 2016, 10:21:32 AM »
Hi ArenMook
i have this problem too, i have a scrollview with a children grid, how can i use this wrap system with my grid?
tried to replace my ui grid with an object with ui wrap script but don't work like before : (
I need to populate my scroll objects in runtime, with ui grid it is easy, i just call gridparent.GetComponent<UIGrid>().Reposition(); after i populate my scrollview, but with the wrap script all my objects are in the same place, tried to call gridparent.GetComponent<UIWrapContent>().WrapContent(); after i populate my scrollviews but nothing happen, my items are all in the same location : (
thank you like always!

EDIT: solved using SortBasedOnScrollMovement();, it do the jobs : )

9
NGUI 3 Documentation / Re: UIRect
« on: May 29, 2016, 03:33:11 PM »
That would be the OnUpdate setting.

but i don't want to update the anchors every frame, but only when i want, there's no way to update anchors via script?
try to explain it better:
i have a 2d ui texture on screen in full screen, anchored to camera for take the fullscreen and with fixed aspect enabled for manteining img ratio, when i rotate the device the image appear small in the center of the screen, i just want recalculate the anchors to adapt the texture in full screen with the new device orientation.
sorry for my english, hope it is understandable : )

10
NGUI 3 Documentation / Re: UIRect
« on: May 29, 2016, 11:41:51 AM »
excuse me...there's a way to execute anchors in runtime?
for example if i set anchors execute "on start" and i need to execute again in runtime, how can i do that? thanks a lot like always

11
NGUI 3 Support / Re: panel orientation with device orientation
« on: May 28, 2016, 10:25:34 AM »
dunno why, but the canvas don't rotate with all the others element : (

12
NGUI 3 Support / panel orientation with device orientation
« on: May 26, 2016, 01:22:31 PM »
Hi! I have a problem with the uipanel, hope u can help me : (
i need the panel orientation change with the device orientation but i dunno how can i do that.
there is a panel with a full screen picture on it, when i rotate my mobile device i need the panel and the image rotate with it, just like android or ios gallery, there is a simple way to to that?
thanks a lot!

13
NGUI 3 Documentation / Re: UI2DSprite
« on: April 30, 2016, 12:44:58 PM »
Hi!
i found the "fixed aspect" function in the ispector very useful for displaying images, just one question:
There's a way to recalculate the "fixed aspect" after the screen orientation is changed?
Cause fixed aspect work like a charm when i open the image, but if rotate my device obviously is not updated, thank you!

14
NGUI 3 Documentation / Re: UILabel
« on: February 15, 2016, 10:31:37 PM »
Can i change font in runtime in the same string?
for example:

[times new roman] "hello" + [arial black] "world"

15
NGUI 3 Support / Re: Change Color Tint of UILabel?
« on: January 31, 2016, 06:35:20 AM »
  1. UILabel lbl = GetComponent<UILabel>();
  2. lbl.color = Color.red;

sorry, what if i want change just a part of a uilabel?
for example: uilabel_text = "Hello World[/color=#2b2b2b]";

Pages: [1] 2