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

Pages: [1] 2
1
NGUI 3 Support / move widget with anchor without using tween
« on: November 03, 2014, 04:42:35 PM »
Hi I'm having trouble on how to find the correct solution, I want to move using transform.localPosition, an anchored widget, but without success. The only way I found that this was possible is with tween position, but I think that is too much to just move a widget to a desired position.

With the old stretch system I can do this without trouble because it just stretch and doesn't anchor the widget, but with this new system I can't do what I need.

Any ideas?

2
NGUI 3 Support / [Feature request] Uniform Scale short cut?
« on: May 21, 2014, 03:14:24 PM »
I search on the forum but, I couldn't find a short cut to scale sprites on uniform scale. For example like Photoshop that if you hold shift while scale a widget it scales on uniform.

I found that one can scale if set aspect ratio to width or height and it works but it will be faster just to have a short cut like on Photoshop and hold shift, or something like that.

3
NGUI 3 Support / Set anchor type advanced in code? [SOLVED]
« on: April 22, 2014, 04:19:32 PM »
Hi I need to set anchor just on left and right with value 0, and on bottom and top to null, all this in code but I don't know how to setup correctly.

I check UIRect.SetAnchor() but this set the anchor of type unified, how can I set it on advance?

Also I'm using this code:
  1. for(int i = 0; i<= 10; i++)
  2. {
  3.      GameObject row = NGUITools.AddChild(Grid, prefabRow);
  4.      row.GetComponent<UISprite>().leftAnchor.target = ScrollView.transform;
  5.      row.GetComponent<UISprite>().leftAnchor.absolute = 0;
  6.      row.GetComponent<UISprite>().rightAnchor.target = ScrollView.transform;
  7.      row.GetComponent<UISprite>().rightAnchor.absolute = 0;
  8.      row.GetComponent<UISprite>().ResetAnchors();              /////////////The line that was missing to work correctly
  9. }
  10. Grid.getComponent<UIGrid>().Reposition();
  11. ScrollView.ResetPosition();
  12.  

And this correctly set the anchor, the problem that I have with the last one is when I instantiate a new row tje width of the sprite is set to small like 2 pixels. But if I disable the gameObject (row) and enable it again the anchor updates the sprite width correctly, something that didn't happen on previous version of ngui, but now happens when I update to last version.


SOLUTION
I need to call ResetAnchors() before I set the anchors

4
NGUI 3 Support / Problem with events on UISlider
« on: March 27, 2014, 09:23:15 PM »
Hi I'm making a switch behavior with the slider prefab, and making it of two steps, and I have a script attached to the object that catch when the slider change of value to play the sound "swipe" that is on ngui.
The problem is that I have the slider is hided at first and the when the user press a button it shows the slider and it appears that it triggers a the event of the slider, and plays the sound, but I didn't use the switch.

So how I prevent the slider triggers the onchange method when I show the switch?

5
NGUI 3 Support / Problem Toggle Checkmark with alpha value
« on: February 04, 2014, 03:18:24 PM »
Hi was trying to implement a file browser in ngui for my app, and I list all the files and directories using the prefab toggle and using it like radio buttons, so when I click on a file this is highlighted (the checkmark is the sprite that highlights the item), so I setup my checkmark with an alpha value of 90 (0-255) on the sprite color. The problem is when I hit play and I click on file checkmark always its show with alpha 255 value and doesn't respect the value that I put on the sprite alpha value on my setup.

How can I solve this?

Thanks in Advance.

6
NGUI 3 Support / [Bug] UILabels max lines
« on: December 06, 2013, 02:29:44 AM »
I have some UILabels with ResizeHeight, with MaxLines set. But appears this is ignored.

7
NGUI 3 Support / How to get the width, and height of the GUI camera
« on: December 04, 2013, 09:06:19 PM »
Hi, I need to get the width and height that ngui is calculating for the stretching script, because if I use Screen.width this returns the real width, but not the width of my GUI.

Also I search on the documentation, but i couldn't find the answer.

I'm using a working around where I have a background sprite with stretch both, and get the dimensions from there, but it would be great if theres a method where I can get this values.

I need it because, I need set the position of a panel on the right side of the screen, and the move it to left, but I need to start on the right side. I tried to use anchors, but the anchor didn't adjust the position fast enough, so I'm just thinking on positioning myself on the right side.

8
NGUI 3 Support / Problem UIToggleObjects
« on: November 28, 2013, 08:36:26 PM »
Hi I'm having some issue with UIToggleObjects, I have setup a sample scene with some boxes and checkboxes, like on this image:


Then I setup the script uitoggleobjects to when the first check box is checked, show box one, and hide all others except the first (this I do the same with the others but changing the box to show depending of the checkbox).

Also i put all the checkboxes in the same group (ex: 1), and I set the first checkbox to Starting State true.

Then I disable all the boxes and the panel.

Finally I hit play and enable the panel, and this happens:


It suppose to hide all objects, with except of the first box, because that is checked true, but all the boxes with the exception of the last are showed.

I don't know why this is happening, if some one has a clue?


9
NGUI 3 Support / UIDraggablePanel, can't find it
« on: November 28, 2013, 06:02:44 PM »
I update my ngui, and the UIDraggablePanel wasn't on the package, you remove this scirpt?

Never mind, I see that now is UIScrollView

10
NGUI 3 Support / problem modular UI
« on: October 16, 2013, 09:23:54 AM »
Hi I was creating a modular UI and I watch that now you can parent children sprites, so I was creating a window with a header sprite with his respective anchor and stretch, and doesn't work right for me when I scale the window and move it to another position, the header doesn't stays where it has to be, but if I put the sprites like siblings it works.

Any one has this same problem?

I'm using the last version from the asset store

11
NGUI 3 Support / Input + Button Keys Weird Bug
« on: October 10, 2013, 04:33:22 PM »
Hi I have an input gameobject to receive input from the user, but I saw a weird thing when I attached UIButtonKeys and active Starts Selected, when I hit play the input show two carat characters, instead of one.

This is not a big deal for me because when my app is going to be release, I will remove this component because I was using just to make some fast testing, and don't want to select the input each time I test the app.

But I just want to report the bug, for some fix on the future.  ;)

12
Hi i was wondering if theres an option to scale a sprite with the handles?, but maintaining the proportions of the sprite, just like photoshop where one can scale like this if holds shift while doing it.

13
NGUI 3 Support / ngui 3.0 problem with stretch
« on: September 23, 2013, 01:58:46 AM »
Hi i was upgrading my project from 2.7 to 3.0, and everything was great except for a problem that happen to me with the stretch.

My project is using FixedSize with manual height 768 for ipad aspect ratio. And I add a background sprite with stretch script and using style both, because the project is for android and ios device.

So I decide to test the project on an android aspect ratio 16:10 the background doesn't cover all the screen, also if I'm using an aspect ratio of the ipad (4:3) but I make the game window smaller the background doen't cover all the screen like before,so I don't know if  i miss something else to fix this?

14
NGUI 3 Support / How Implement Kinect support
« on: January 18, 2013, 05:01:04 PM »
Hi, I need to develop a project where i need to use kinect, so i need implement interactions like where i hover over a button appear a timer and when expire click the button, but when remove the cursor cancel the timer, something like the xbox360 menu with the kinect, also use some gestures but that another thing.

So any tips of how i can implement this interaction, with ngui, and re-use already functionality like OnClick, and Draggable Panels, etc.

15
NGUI 3 Support / BUG on android
« on: January 10, 2013, 03:10:44 PM »
hi I'm having a problem when i run my app works everything great, if i hit home on the android device and then run again my app the touch doesn't works

to replicate this problem these are the steps:
1) create a new project
2) import last version of ngui
3) add the scene Example 7 - Scroll View (Panel) on Scenes in Build
4) on gameobject camera uncheck Allow Multi Touch
5) compile for android
6) when the application is running, hit home on android device
7) run again the app and the touch isn't working on the app


please if some one knows how to resolve this because i need to update my app on the store quickly

Pages: [1] 2