scrollview without mask

Hi,

i am migrating my project to graphics v2 at the moment. I have a scrollView, whose content should be also visible outside the borders. That was no problem with gv1, just by omit the mask. I was wondering how to do this with gv2. I already tried to set a larger (screensize) mask:

local mask = graphics.newMask( "Images/mask\_1136x640.png") scrollView:setMask( mask ) scrollView.maskY = 0

But that doesn’t work so far. Is there a build in, or at least a kind of hack, solution?

Thanks! 

Hi, the auto-masking feature introduced in G2 makes this use case impossible. I think there was a thread where this issue was recognized by CL staff and a resolution was promised. In other words, I think the auto-masking nature should be controlled by a switch so you can achieve the result you need. 

Hmm, that’s a huge problem. I already tried to modify the widget library by myself, but I wasn’t even able to run the self-included library. I downloaded the actual version (not legacy) from github and got this error by generate a scrollView:

?:0: attempt to perform arithmetic on field '\_oldAnchorX' (a nil value) message stack traceback: ?: in function \<?:218\> [C]: ? ?: in function '\_calculatePosition' ?: in function \<?:507\> (tail call): ? ...ollView(default)/ScrollView/widgetLibrary/widget.lua:133: in function \<...ollView(default)/ScrollView/widgetLibrary/widget.lua:122\> (tail call): ? ...View(Builds)/ScrollView(default)/ScrollView/main.lua:51: in main chunk

Can you just make the scrollView larger and apply a custom mask to the group? I think this works, according to a user who wanted a “curved edge” mask on a tableView, and applied a mask to the group, since the “maskFile” parameter was removed.

I’m not sure I understand the usage case of a scrollView with visible content outside its own bounds. Can you describe exactly what you’re aiming for here?

Best regards,

Brent

Thanks Brent, your answer brought me the final idea - and it was so easy …

I just made a scrollView with of the complete screensize and positioned my content inside the scrollView. with other words, the borders are just more far away, so the content is still visible by scrolling. There was no need for an explicit mask.

In my case I used a scrollView for navigation buttons. You can scroll the Buttons vertically and the other stuff on the screen is moving dependent on the buttons position. Its just a visual gimmick, but it took me a while to implement, and I didn’t want to kick it out.

Thanks together for your thoughts!

Hi Sunmils,

Stuck on the same issue - cant get my brain into gear - can you please post a sample of what code you changed to resolve this?

I had it working and when I updated to the latest daily (as picker wheels were a bit jumpy) - that fixed my picked and broke my tableview - but its the same error… :frowning:

Hi, the auto-masking feature introduced in G2 makes this use case impossible. I think there was a thread where this issue was recognized by CL staff and a resolution was promised. In other words, I think the auto-masking nature should be controlled by a switch so you can achieve the result you need. 

Hmm, that’s a huge problem. I already tried to modify the widget library by myself, but I wasn’t even able to run the self-included library. I downloaded the actual version (not legacy) from github and got this error by generate a scrollView:

?:0: attempt to perform arithmetic on field '\_oldAnchorX' (a nil value) message stack traceback: ?: in function \<?:218\> [C]: ? ?: in function '\_calculatePosition' ?: in function \<?:507\> (tail call): ? ...ollView(default)/ScrollView/widgetLibrary/widget.lua:133: in function \<...ollView(default)/ScrollView/widgetLibrary/widget.lua:122\> (tail call): ? ...View(Builds)/ScrollView(default)/ScrollView/main.lua:51: in main chunk

Can you just make the scrollView larger and apply a custom mask to the group? I think this works, according to a user who wanted a “curved edge” mask on a tableView, and applied a mask to the group, since the “maskFile” parameter was removed.

I’m not sure I understand the usage case of a scrollView with visible content outside its own bounds. Can you describe exactly what you’re aiming for here?

Best regards,

Brent

Thanks Brent, your answer brought me the final idea - and it was so easy …

I just made a scrollView with of the complete screensize and positioned my content inside the scrollView. with other words, the borders are just more far away, so the content is still visible by scrolling. There was no need for an explicit mask.

In my case I used a scrollView for navigation buttons. You can scroll the Buttons vertically and the other stuff on the screen is moving dependent on the buttons position. Its just a visual gimmick, but it took me a while to implement, and I didn’t want to kick it out.

Thanks together for your thoughts!

Hi Sunmils,

Stuck on the same issue - cant get my brain into gear - can you please post a sample of what code you changed to resolve this?

I had it working and when I updated to the latest daily (as picker wheels were a bit jumpy) - that fixed my picked and broke my tableview - but its the same error… :frowning: