i18n: Updated templates
[sdk] / samples / android / helloAndroid.ec
1 import "ecere"
2
3 class AndroidApp : GuiApplication
4 {
5    ColorHSV color;
6    color = red;
7    bool Cycle(bool idle)
8    {
9       color.h += Degrees { 1 };
10       if(color.h >= Degrees { 360 }) color.h = 0;
11       mw.background = color;
12       mw.Update(null);
13       return true;
14    }
15 }
16
17 class MyWindow : Window
18 {
19    BitmapResource bmp { "<:Hello>ecere sdk.png", window = this, alphaBlend = true };
20    hasClose = true;
21    anchor = { 0,0,0,0 };
22
23    void OnRedraw(Surface surface)
24    {
25       surface.background = green;
26       surface.Area(100, 100, 300, 300);
27       if(bmp.bitmap)
28       {
29          surface.Stretch(bmp.bitmap, 0,0, 0,0, 350, 350, bmp.bitmap.width, bmp.bitmap.height);
30       }
31    }
32 }
33
34 MyWindow mw { };
35 MessageBox hello { mw, contents = "Hello, Android!!" };