Posts

Showing posts with the label Examples

DroidScript Images

Image
In this post I will speak about images in DroidScript. They are the easiest way to display image files and also for drawing basic shapes like lines, rectangles, ellipses and even other images. The possibilities are endless - you can make image viewers, drawing apps, animations, visualizations, games and even your own controls. Content Load image files Basic Drawing Touch events Animating Image drawing and alias Load image files This is the most common usage of images - displaying. You can't just display png or jpg files - also gif's are possible! //Called when application is started. function OnStart() { //Create a layout with objects vertically centered. var lay = app.CreateLayout( "linear", "VCenter,FillXY" ); //Create png image and add it to layout png = app.CreateImage("/Sys/Img/Hello.png"); lay.AddChild(png); //Create gif image and add it to layout gif = app.CreateImage("/assets/edit...

DroidScript Hello World Example

The 'Hello World' Project is the first app you will see in DroidScript. It creates an image and a button. And if you press the button, a "Hello World!" popup appears and the phone is vibrating. This is a very basic demonstration of how easy DroidScript can be used: - create the main app-layout. - add controls or more layouts to it - show the layout on screen This is the basic concept of how DroidScript works. Try it out yourself: Download DroidScript agate androidstudio arduino-light arta ascetic atelier-cave-dark atelier-cave-light atelier-dune-dark atelier-dune-light atelier-estuary-dark atelier-estuary-light atelier-forest-dark atelier-forest-light atelier-heath-dark atelier-heath-light atelier-lakeside-dark atelier-lakeside-light atelier-plateau-dark atelier-plateau-light atelier-savanna-dark atelier-savanna-light atelier-seaside-dark ...