How can use css in corona sdk ?
what do you want to do with css?
I create a background in css but I don’t know how to implement it on corona sdk
background for what
I finally fount a way to get the gradient background but it’s written in css
Corona is not a browser engine. It has no idea what css is.
So there’s no way to get the css background working on my app ? I just seen an article and I could use html on it
-
Anything is possible.
-
What article (link?)
That’s not an article, but …regardless. It is documenting the ‘web view’ functionality:
- Web views are native.* objects.
- Native objects always render over Corona objects. (https://docs.coronalabs.com/api/library/native/index.html#gotchas)
- Ergo, a web view cannot be a background.
You have to use display objects to create a background for your app.
So how do I make it my background ?
If ‘it’ == web view. You cannot make ‘it’ a background.
If you want objects rendered in a specific order in Corona. Use display objects.
Can I see a link ?
-
link to what?
-
define ‘see’
Link to display objects
- Docs for API https://docs.coronalabs.com/daily/api/
- Docs for display objects: https://docs.coronalabs.com/daily/api/library/display/index.html
Note: I’m about out of time (leaving @ 1310). So I may have time for one more question then I have to go.
Which display function should I use ?
I would use a custom shader and fill a rectangle with that, then ensure that rectangle is behind everything else.
Shaders are an advanced topic. The only two ways I can think for you to get the shader you need are:
- Learn to write shaders, then write one to do what you want.
- Post a job listing here and pay someone to write one.
This forum thread has links to a number of great shaders: https://forums.coronalabs.com/topic/56284-share-your-shaders/
I know you’re hoping for a ‘simple’ answer, but there simply is not one. The fact that you can do this in another medium does not make it simple to do in Corona.
Algorithmic fills are a specialized in any context, and while Corona supports it, you have to master shaders to get what you want.