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

Pages: [1]
1
NGUI 3 Documentation / Re: UIScrollView
« on: June 26, 2018, 10:32:00 PM »
Hello guys I just wanted help for this. I created a 2 buttons (left and right) for scrolling to the next page. It's like a pagination thing .

Here's what I've got so far

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class NGUI_PageNavigation : MonoBehaviour {
  6.  
  7.     public GameObject sv;
  8.     public SpringPanel sp = null;
  9.     private const int xSpring = 1278;
  10.    
  11.  
  12.     // Use this for initialization
  13.     void Start()
  14.     {
  15.         sp = sv.GetComponent<SpringPanel>();
  16.         if (sp == null) sp = sv.AddComponent<SpringPanel>();
  17.        
  18.         sp.target.x = 0;
  19.         sp.target.y = 0;
  20.         sp.target.z = 0;
  21.     }
  22.  
  23.     public void LeftArrow()
  24.     {
  25.         if (sp.target.x >= 0)
  26.         {
  27.             sp.target = Vector3.zero;
  28.             sp.enabled = true;
  29.         }
  30.         else
  31.         {
  32.             sp.target = new Vector3(sp.target.x += xSpring, sp.target.y, sp.target.z);
  33.             sp.enabled = true;
  34.         }
  35.     }
  36.  
  37.     public void RightArrow()
  38.     {
  39.         sp.target = new Vector3(sp.target.x -= xSpring, sp.target.y, sp.target.z);
  40.         sp.enabled = true;
  41.     }
  42. }
  43.  
  44.  

What my problem is the VOID RIGHT ARROW

It exceeds even without object it still go endlessly. How can I stop that if the next page doesn't have an item it will springback to the last position.

2
NGUI 3 Support / Re: UIDraggableCamera alternate
« on: May 08, 2018, 12:38:09 AM »
Could someone help me please too on my problem it's about the scroll view

So here's my problem .

So what i am trying to do here is that when i try to scroll and stop scrolling in the middle part of scrolling  it will stop at the middle of course so i want it to be like " If i scroll it to the next page even i stop at the center it must proceed to the next page " something like that. Could someone please help me with this

PLEASE SEE ATTACH IMAGE.


3
NGUI 3 Support / Keep ratio of my livefeed
« on: February 09, 2018, 02:32:03 AM »
Good day everyone . Sorry for being a noob in advance. I have an attachment please see it please because it is an image for you to not misunderstood me.

My problem is that i want to keep my video feed which 1920x540 how can i keep the ratio of that???.

Pages: [1]