David Blume commited on 2015-11-28 11:05:42
Showing 1 changed files, with 20 additions and 20 deletions.
... | ... |
@@ -1,4 +1,4 @@ |
1 |
-Sub Main() |
|
1 |
+sub main() |
|
2 | 2 |
print "Starting Family Photos" |
3 | 3 |
|
4 | 4 |
m.imageSizeX = 1280 |
... | ... |
@@ -23,43 +23,43 @@ Sub Main() |
23 | 23 |
m.scaleY = m.screen.GetHeight() / m.imageSizeY |
24 | 24 |
m.screen.DrawScaledObject(0, 0, m.scaleX, m.scaleY, m.currentBitmap) |
25 | 25 |
|
26 |
- ChangeSlide() |
|
26 |
+ change_slide() |
|
27 | 27 |
|
28 |
- While(True) |
|
28 |
+ while(true) |
|
29 | 29 |
|
30 | 30 |
msg = wait(0, port) |
31 |
- If type(msg) = "roUniversalControlEvent" Then |
|
31 |
+ if type(msg) = "roUniversalControlEvent" |
|
32 | 32 |
button = msg.GetInt() |
33 | 33 |
|
34 |
- If ((button = 5) Or (button = 6)) and m.index < m.slideCount - 1 Then |
|
34 |
+ if ((button = 5) Or (button = 6)) and m.index < m.slideCount - 1 |
|
35 | 35 |
print "Show Next Slide" |
36 | 36 |
m.index = m.index + 1 |
37 |
- ChangeSlide() |
|
38 |
- Else If (button = 4) And (m.index > 0) Then |
|
37 |
+ change_slide() |
|
38 |
+ else if (button = 4) And (m.index > 0) |
|
39 | 39 |
print "Show Previous Slide" |
40 | 40 |
m.index = m.index - 1 |
41 |
- ChangeSlide() |
|
42 |
- End If |
|
43 |
- End If |
|
41 |
+ change_slide() |
|
42 |
+ end if |
|
43 |
+ end if |
|
44 | 44 |
|
45 |
- End While |
|
45 |
+ end while |
|
46 | 46 |
|
47 |
-End Sub |
|
47 |
+end sub |
|
48 | 48 |
|
49 | 49 |
|
50 |
-Function ChangeSlide() |
|
50 |
+function change_slide() |
|
51 | 51 |
|
52 |
- If m.index < 0 Then |
|
52 |
+ if m.index < 0 |
|
53 | 53 |
m.nextBitmap = CreateObject("roBitmap", "pkg:/images/background.jpg") |
54 |
- Else If m.index >= m.slideCount Then |
|
54 |
+ else if m.index >= m.slideCount |
|
55 | 55 |
m.nextBitmap = CreateObject("roBitmap", "pkg:/images/background.jpg") |
56 |
- Else |
|
56 |
+ else |
|
57 | 57 |
m.nextBitmap = CreateObject("roBitmap", m.arrayImages[m.index]) |
58 |
- End If |
|
58 |
+ End if |
|
59 | 59 |
|
60 | 60 |
m.nextBitmap.SetAlphaEnable(true) |
61 | 61 |
|
62 |
- For i = 0 to 255 Step 5 |
|
62 |
+ for i = 0 to 255 step 5 |
|
63 | 63 |
hexcolor = &hFFFFFFFF - i |
64 | 64 |
hexcolor2 = &hFFFFFF00 + i |
65 | 65 |
|
... | ... |
@@ -67,11 +67,11 @@ Function ChangeSlide() |
67 | 67 |
m.screen.DrawScaledObject(0, 0, m.scaleX, m.scaleY, m.nextBitmap, hexcolor2) 'fadein |
68 | 68 |
|
69 | 69 |
m.screen.SwapBuffers() |
70 |
- End For |
|
70 |
+ end for |
|
71 | 71 |
|
72 | 72 |
m.currentBitmap = 0 'release the current bitmap |
73 | 73 |
m.currentBitmap = m.nextBitmap 'assign the new next bitmap |
74 | 74 |
m.nextBitmap = 0 'release the next bitmap |
75 | 75 |
|
76 |
-End Function |
|
76 |
+end function |
|
77 | 77 |
|
78 | 78 |