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

Pages: [1]
1
NGUI 3 Support / Re: Anchoring a row of buttons
« on: September 27, 2014, 08:21:23 PM »
You need to take UIRoot's pixelSizeAdjustment into account. When UIRoot is set to Constrained, it means its virtual pixels don't match your screen pixels, so you can't simply use Screen.width and height.
That is what I needed.
Thanks!

2
NGUI 3 Support / Re: Anchoring a row of buttons
« on: September 26, 2014, 04:10:19 PM »
So I gave up on the anchors and decided to use a simple script instead. This accomplished the task, however, I seem to have a hard time with the constrained mode using my script. In the pixel perfect mode this script works fine, however, in constrained mode it doesn't (I'm guessing it has something to do with the resolution being different or something). Any ideas? Thanks.

http://pastebin.com/a6Es5SpR


3
NGUI 3 Support / Re: Anchoring a row of buttons
« on: September 25, 2014, 08:48:49 PM »
Use Advanced anchoring with Custom settings, specifying 0 for Absolute and some 0 to 1 value for the relative fields (the slider). For example 0.3 means 30% from the left if it's on Left/Right, or 30% from the bottom if it's on Top/Bottom.
Thanks for the reply. I played with this for a bit and basically had the same results with a variety of methods. I want some blank space between the buttons when the resolution gets bigger, but when the buttons are anchored they always just stretch themselves instead of leaving some space. I've anchored them to the root, other buttons, some of both, and they all seem to have the same sort of behavior.

4
NGUI 3 Support / Anchoring a row of buttons
« on: September 25, 2014, 04:19:29 PM »
Hello,
I have a row of buttons that I want to anchor to the top of the screen. I've tried various methods including anchoring them to each other, anchoring them to the root etc. but none of them have produced the desired effect. I want them to be spaced evenly regardless of the resolution. Currently, however, the middle two buttons just get stretched out instead of spaced evenly. Any ideas?

Thanks

5
NGUI 3 Support / Re: UIToggle Question
« on: July 18, 2014, 12:50:17 PM »
Edit: I was able to solve this problem about ten minutes ago. It turns out that, in fact, this had nothing at all to do with NGUI. Apparently unity wasn't getting all the objects in the update function, so it was producing strange results. Instead I used the awake function and the inspector to gather all of the objects I needed.

Thanks!

6
NGUI 3 Support / UIToggle Question
« on: July 17, 2014, 06:02:07 PM »
I have a series of radio buttons that when active need to change their sprite. The standard UI toggle won't work as the sprites have a transparency effect, therefore I can't simply hide it behind the other sprite. I've tried writing a script that changes the sprites when a new radio button is selected. Unfortunately, the sprites don't seem to update unless I mouse over them. What is the best way to handle this situation?

Thanks

7
NGUI 3 Support / Re: Streching Several Sprites
« on: July 12, 2014, 11:35:00 AM »
That worked nicely.

Thanks

8
NGUI 3 Support / Streching Several Sprites
« on: July 12, 2014, 08:54:22 AM »
Hello,
I have a chatbox with four sprites. One is the input box, another is a vertical bar on the left side, a horizontal bar at the top, and a background. I have a button located on the bottom right of the chatbox that I want to be able to click and drag around to resize the box. The problem is each sprite needs to be stretched a certain way to avoid distortion(The input box needs to be streched horizontally while the background can be stretched in any way, for example). What is the best method to accomplish this?

Thanks

Pages: [1]