Hi @staytoooned,
For colors, perhaps the easiest way to “convert” from the old range to the new range is to just add “/255” after your color settings. For example:
[lua]
object:setFillColor( 240/255, 40/255, 60/255 )
[/lua]
Brent
Hi @staytoooned,
For colors, perhaps the easiest way to “convert” from the old range to the new range is to just add “/255” after your color settings. For example:
[lua]
object:setFillColor( 240/255, 40/255, 60/255 )
[/lua]
Brent
It is - although when you’ve got over 100 text or filled images in each app, and nearly 20 apps to update, it’s still a right pain.
I wish you could’ve just allowed decimal places on the old 0-255 range and converted this to 0-1 behind the scenes!
I understand all that, but now all my scrollViews are not display at all. Was there a major change here too?
Hi @staytooned,
This is odd, and I’d have to see some code to figure out why they’re not showing up at all.
Thanks,
Brent
Found another huge issue with Graphics 2.0 latest build. I created a scrollView and I want some objects to be added to the scrollView group. This caused my scrollView not to appear. Is there a work around for this? Thanks.
@staytooned, are you needing features of Graphics 2.0 or just upgrading to get the latest bug fixes and such? For your existing apps, you can simply put:
graphicsCompatibility = 1
in your config.lua where you set your width and your app should run pretty much unmodified.
Rob
Just want to say that I’ve received a reply from Engineering on this re: #29677
This use case will not be covered; if users want to be able to choose between a container mask or bitmap mask, somebody should make a feature request for it. (Which makes sense, it’s not a bug but it is a functionality change vs. 1.0)
Using the workaround (apply a mask manually) means hitting the 3-nest limit (tableView mask, text mask, bitmap mask) so keep in mind it prevents you from adding further container objects inside the view.
So this is technically a deprecated feature without any advance notice.
Well, the feature still works; it’s just that it uses a container (rectangle) instead of a bitmap now. Which is clean. And you can use graphics.newMask() to still apply a bitmap. G1.0 users would of course have an issue because .mask is deprecated but it’s a small amount of code to fix that.
Where trouble would come is in the nesting; tableView>mask is two so you can only nest a widget inside of that if it uses one mask. ie: I think newButton is alright since it’s all slices - the 3rd would be text on the button. But the tableView wouldn’t be able to fit something using two elements.
I’m not sure which widgets use two masking elements (container+text) apart from scrollView/tableView, so I guess we would have to look through those for potential troublespots.
I’ve discovered this problem when I upgraded to the latest version of Corona today. Would someone please provide a code snippet to show how to use the graphics.newMask() to create it and :setMask() on the TableView?
This is for a custom shape mask.
Thanks!
It’s pretty simple.
You need a mask image; everything in white is visible, everything in black is cut out.
Instantiate the mask.
[lua]local myMask = graphics.newMask(“themask.png”)[/lua]
[lua]myScrollView:setMask(myMask)[/lua]
Thanks so much. I did get that to work, but now I have a new problem. My category background color and lines are not showing up. Did this change as well?
I see how the colors changed. This is going to be a major overhaul. Just when I thought I was done coding for a while. What a pain!!!
Hi @staytoooned,
For colors, perhaps the easiest way to “convert” from the old range to the new range is to just add “/255” after your color settings. For example:
[lua]
object:setFillColor( 240/255, 40/255, 60/255 )
[/lua]
Brent
It is - although when you’ve got over 100 text or filled images in each app, and nearly 20 apps to update, it’s still a right pain.
I wish you could’ve just allowed decimal places on the old 0-255 range and converted this to 0-1 behind the scenes!
I understand all that, but now all my scrollViews are not display at all. Was there a major change here too?
Hi @staytooned,
This is odd, and I’d have to see some code to figure out why they’re not showing up at all.
Thanks,
Brent
Found another huge issue with Graphics 2.0 latest build. I created a scrollView and I want some objects to be added to the scrollView group. This caused my scrollView not to appear. Is there a work around for this? Thanks.
@staytooned, are you needing features of Graphics 2.0 or just upgrading to get the latest bug fixes and such? For your existing apps, you can simply put:
graphicsCompatibility = 1
in your config.lua where you set your width and your app should run pretty much unmodified.
Rob