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

Pages: [1]
1
NGUI 3 Support / Re: Making a square texture round?
« on: April 19, 2015, 07:27:17 AM »
Oh yes, another dane :-) Got it, it is not called (Unlit/transparent masked) on my version but (Unlit/AlphaMask)  :-)

It work s perfect when changing from script like this:
  1. Test.material.SetTexture("_MainTex",NewImg);

But... Is it possible to use the same material for multiple different images, or do I need to create a new material for each image (profileimg)?

Hope you can clarify this and thanks in advance (Takker :-))

2
NGUI 3 Support / Re: Making a square texture round?
« on: April 18, 2015, 02:17:37 PM »
Hey thanks, tried it but nothing happens? What am I missing? I have attached 2 images showing what I am doing.

Again, thanks in advance :-)

3
NGUI 3 Support / Making a square texture round?
« on: April 18, 2015, 03:06:57 AM »
Hi, I am making an game in which a users image will appear loaded from external server and placed on a NGUI texture. This image is a square rectangle and a s such works just fine, but... I would like to show the image as round. I have come so far to think that it has to do with shaders, but I have never worked with shaders before and have no idea where to start or if its the correct way to do. Maybe there is a easier way to approach this.

Hoping for help in this matter and any help is appreciated :-)

Thanks in advance.

4
NGUI 3 Documentation / Re: UIScrollView
« on: September 10, 2014, 02:23:09 PM »
I was wandering if its possible to only render the items visible in the scrollview. Lets say I have a scrollview which fits about 8 items but my item list is on 50 items. Then I, as it is now, have to render all 50 and making the scrollview heavy!? Is there a function I am missing or is this not possible?

Hoping for help and thanks in advance :-)

5
NGUI 3 Support / Generate ScrollView from c#
« on: August 11, 2014, 10:31:28 AM »
I am trying to figure out how to generate an scrollview from c#. I have made an GameObject as ScrollView and attached an grid. I have then made an prefab sprite which I want to copy/clone into my scrollview, but it is not working. Is there anything I am missing?

Here is how I have done so far:

  1. public GameObject listGrid;
  2. public GameObject listItem;

These 2 holds the grid object and the prefab.

  1. for(int i = 0;i < 3;i++){
  2.         GameObject insObj = Instantiate(listItem) as GameObject;
  3.         insObj.name = "listobject"+i;
  4.         insObj.SetActive(true);
  5.         insObj.transform.parent = listGrid.transform;
  6.         insObj.transform.localScale = new Vector3(1,1,1);
  7. }

This generates the list items, but they do not get in order below each other... The all is placed the same place?!?!

Hoping for help and thanks in advance :-)

6
NGUI 3 Support / Re: Localization only works with CSV?
« on: May 29, 2014, 08:58:23 AM »
So if I understand your answer correct. It can't be done the old style way? Only with CSV?

7
NGUI 3 Support / Localization only works with CSV?
« on: May 29, 2014, 05:55:12 AM »
I am trying to setup Localization in NGUI but am having some issues. I prefer to have my languages in separate files like "English.txt" and "Français.txt". I have taking the NGUI example 10 and tried to replace the CSV file with 2 separate files but with same content, but when doing so the localize component can't find the files?

My files look like this (english):
Language = English
Flag = Flag-US
Info = Localization example
Sound = Sound
Music = Music
Desc = English localization
Paragraph = "This example shows how to implement localization using NGUI. In order to localize a widget, simply attach [000000]UILocalize[-] script to it. The script will localize the sprite if it's a [000000]UISprite[-], or the text if it's a [000000]UILabel[-]. If you want to localize something else, just implement the [000000]OnLocalize[-] function. Either way, the actual data is defined via text assets specified on the [000000]Localization[-] script which must be present in the scene." 


In the comment inside the scripts it says that I just have to place these files inside the "resources" folder and it will be recognized?

Hoping for help in this matter and thanks in advance :-)

8
NGUI 3 Support / Re: Localization files
« on: May 25, 2014, 03:16:20 AM »
Hey thanks, but I am not sure what to do? I am a bit of an newbie at this. If i try to UIPopuplist it finds the demo localization scripts and not mine? It seems like the issue is that it doesn't find my text documents?

9
NGUI 3 Support / Localization files
« on: May 24, 2014, 04:57:06 PM »
I am trying to set up localization in my project but am having no luck, so...

I have created 2 local files like this.

en.txt:
1 = Connection Error
2 = You where not able to connect to the Numfeud server. Make sure that you have an active internet connection. You may also try to close/kill the game and start again.
3 = OK
4 = Reset password
5 = Please try again

da.txt:
1 = Netværks fejl
2 = Det var ikke muligt at få forbindelse til Numfeud serveren. Tjek din netværks forbindelse og prøv igen. Alternativt, prøv at lukke spillet helt ned og start op igen.
3 = OK
4 = Gendan kodeord
5 = Prøv igen

These 2 files have i saved in my Resources folder in the root of my project, not inside the NGUI folder.

I have then created an empty gameObject in which I have attached Localization.cs. This gameobject is outside the NGUI root.

I have then in my startup script in the void start() added this: Localization.language = "en";

When I then try to add UILocalize to an label and insert 3 as key it doesn't reconize this?!? What am I doing wrong. Am I missing something here?

Any help is appreciated and thanks in advance.

10
NGUI 3 Support / Change font from script?
« on: April 15, 2014, 02:47:25 AM »
I am trying to build an GameObject from script with NGUI components attached but am having some issues with font?

How do I tell what font to use?

Here is how i am trying to do:
  1. for(int i = 0;i < 3;i++){
  2.                         GameObject test = new GameObject("TEST"+i);
  3.                         test.AddComponent<UIDragScrollView>();
  4.                         UILabel countryName = test.AddComponent<UILabel>();
  5.                         countryName.font = MyriadProBold;
  6.                         countryName.text = "Just testing";
  7.                         test.AddComponent<BoxCollider>();
  8.                         test.AddComponent<UISprite>();
  9.  
  10.                         test.AddComponent<LanguageChooser>();
  11.                 }

Any help is appreciated.

11
NGUI 3 Support / Change a value in UIpanel anchor programmatically
« on: April 11, 2014, 07:17:00 PM »
I am making an game menu with a scroll panel. I would like to change the distance to the bottom of the panel from the UIRoot depending on if a user has a pro membership (no ads) or not. If they don't I will insert a ad in the bottom of the screen and I would like the panel to move up to be above the ad (50px). I can't figure out if this can be done, but if it could I would really appreciate some help on this.

Thansk in advance :-) 

Pages: [1]