1

I want to make a manual like this:

It can switch to the next page or last page, and click on the character it will turn to the detail page.

enter image description here

Now I have achieved this:

enter image description here

The problem is when the mouse is on the character, it can not scroll view but just turn to the detail page.

I can only scroll view by putting mouse in the space out of character and drag.

How can I drag anywhere to scroll view and just click to turn to the detail page?

Chenxing Zheng
  • 117
  • 1
  • 2
  • 10

2 Answers2

0

so i don't exacly know, what you mean but i try to help you there:

if you are scrolling through the pages using the UnityEngine libaries, you could try to make your own script that handles scrolling:

int pageCount = 3; //how many pages you wanna support
int curPage = 0; //show page 0 at start
void Update(){
  float scrolling = Input.GetAxis("Mouse ScrollWheel");
  if (scrolling < 0f){
    curPage --;
    if (curPage < 0){
      //If you wanna go from page 0 to page 3 by scrolling down
      curPage = pageCount; 
    }
  }
}
void OnGUI(){
  //and now you can show the right page by selecting curPage
}

I hope that this helps. If not, you should post some code that we can response to

3DExtended
  • 153
  • 15
  • I need to drag the page to switch to the next page,and click the character to open detail page. But if I try to do drag on the character, it will open detail page instead of switch to the next page as I hope.Now I find the problem is that both scrollview and opening detail page use void OnPress (bool pressed). – Chenxing Zheng Oct 11 '15 at 14:49
0

I modified my script and then fixed it.

//I use void OnPress(bool isPressed) before,and it causes conflict with scrollview
void OnClick()
{
    Application.LoadLevel("Main");
}
Chenxing Zheng
  • 117
  • 1
  • 2
  • 10