David Blume commited on 2015-11-08 12:49:50
Showing 10 changed files, with 135 additions and 0 deletions.
... | ... |
@@ -0,0 +1,40 @@ |
1 |
+{ |
|
2 |
+ "build_systems": |
|
3 |
+ [ |
|
4 |
+ { |
|
5 |
+ "file_regex": "^(...*?):([0-9]*):?([0-9]*)", |
|
6 |
+ "name": "Cygwin Make", |
|
7 |
+ "shell_cmd": "C:/cygwin64/bin/bash --login $project_base_name/build", |
|
8 |
+ "working_dir": "$project_path" |
|
9 |
+ }, |
|
10 |
+ { |
|
11 |
+ "name": "Zip", |
|
12 |
+ "working_dir": "$project_path", |
|
13 |
+ "windows": { |
|
14 |
+ "cmd": "\"C:\\Program Files\\7-Zip\\7z.exe\" a -tzip \"$project_base_name.zip\" manifest source/*.* images" |
|
15 |
+ }, |
|
16 |
+ "osx": { |
|
17 |
+ "shell_cmd": "zip \"$project_base_name.zip\" manifest source/*.* images/*.*" |
|
18 |
+ }, |
|
19 |
+ "linux": { |
|
20 |
+ "shell_cmd": "zip \"$project_base_name.zip\" manifest source/*.* images/*.*" |
|
21 |
+ } |
|
22 |
+ } |
|
23 |
+ ], |
|
24 |
+ "folders": |
|
25 |
+ [ |
|
26 |
+ { |
|
27 |
+ "path": ".", |
|
28 |
+ "file_exclude_patterns": |
|
29 |
+ [ |
|
30 |
+ "tags", |
|
31 |
+ "*.zip", |
|
32 |
+ "*.sublime-project" |
|
33 |
+ ], |
|
34 |
+ "folder_exclude_patterns": |
|
35 |
+ [ |
|
36 |
+ "obj" |
|
37 |
+ ], |
|
38 |
+ } |
|
39 |
+ ] |
|
40 |
+} |
... | ... |
@@ -0,0 +1,77 @@ |
1 |
+Sub Main() |
|
2 |
+ print "Starting Family Photos" |
|
3 |
+ |
|
4 |
+ m.imageSizeX = 1280 |
|
5 |
+ m.imageSizeY = 720 |
|
6 |
+ m.index = 0 |
|
7 |
+ |
|
8 |
+ port = CreateObject("roMessagePort") |
|
9 |
+ m.screen = CreateObject("roScreen", true) |
|
10 |
+ m.screen.SetAlphaEnable(true) |
|
11 |
+ m.screen.Clear(&h000000FF) |
|
12 |
+ m.screen.SetMessagePort(port) |
|
13 |
+ |
|
14 |
+ m.arrayImages = [ |
|
15 |
+ "pkg:/images/Slide01.jpg", "pkg:/images/Slide02.jpg", "pkg:/images/Slide03.jpg" |
|
16 |
+ ] |
|
17 |
+ m.slideCount = m.arrayImages.Count() |
|
18 |
+ |
|
19 |
+ m.currentBitmap = CreateObject("roBitmap", m.arrayImages[m.index]) |
|
20 |
+ m.currentBitmap.SetAlphaEnable(true) |
|
21 |
+ |
|
22 |
+ m.scaleX = m.screen.GetWidth() / m.imageSizeX |
|
23 |
+ m.scaleY = m.screen.GetHeight() / m.imageSizeY |
|
24 |
+ m.screen.DrawScaledObject(0, 0, m.scaleX, m.scaleY, m.currentBitmap) |
|
25 |
+ |
|
26 |
+ ChangeSlide() |
|
27 |
+ |
|
28 |
+ While(True) |
|
29 |
+ |
|
30 |
+ msg = wait(0, port) |
|
31 |
+ If type(msg) = "roUniversalControlEvent" Then |
|
32 |
+ button = msg.GetInt() |
|
33 |
+ |
|
34 |
+ If ((button = 5) Or (button = 6)) and m.index < m.slideCount - 1 Then |
|
35 |
+ print "Show Next Slide" |
|
36 |
+ m.index = m.index + 1 |
|
37 |
+ ChangeSlide() |
|
38 |
+ Else If (button = 4) And (m.index > 0) Then |
|
39 |
+ print "Show Previous Slide" |
|
40 |
+ m.index = m.index - 1 |
|
41 |
+ ChangeSlide() |
|
42 |
+ End If |
|
43 |
+ End If |
|
44 |
+ |
|
45 |
+ End While |
|
46 |
+ |
|
47 |
+End Sub |
|
48 |
+ |
|
49 |
+ |
|
50 |
+Function ChangeSlide() |
|
51 |
+ |
|
52 |
+ If m.index < 0 Then |
|
53 |
+ m.nextBitmap = CreateObject("roBitmap", "pkg:/images/background.jpg") |
|
54 |
+ Else If m.index >= m.slideCount Then |
|
55 |
+ m.nextBitmap = CreateObject("roBitmap", "pkg:/images/background.jpg") |
|
56 |
+ Else |
|
57 |
+ m.nextBitmap = CreateObject("roBitmap", m.arrayImages[m.index]) |
|
58 |
+ End If |
|
59 |
+ |
|
60 |
+ m.nextBitmap.SetAlphaEnable(true) |
|
61 |
+ |
|
62 |
+ For i = 0 to 255 Step 5 |
|
63 |
+ hexcolor = &hFFFFFFFF - i |
|
64 |
+ hexcolor2 = &hFFFFFF00 + i |
|
65 |
+ |
|
66 |
+ m.screen.DrawScaledObject(0, 0, m.scaleX, m.scaleY, m.currentBitmap, hexcolor) 'fadeout |
|
67 |
+ m.screen.DrawScaledObject(0, 0, m.scaleX, m.scaleY, m.nextBitmap, hexcolor2) 'fadein |
|
68 |
+ |
|
69 |
+ m.screen.SwapBuffers() |
|
70 |
+ End For |
|
71 |
+ |
|
72 |
+ m.currentBitmap = 0 'release the current bitmap |
|
73 |
+ m.currentBitmap = m.nextBitmap 'assign the new next bitmap |
|
74 |
+ m.nextBitmap = 0 'release the next bitmap |
|
75 |
+ |
|
76 |
+End Function |
|
77 |
+ |
|
0 | 78 |