|
@@ -162,6 +162,7 @@ if __name__ == "__main__":
|
162
|
162
|
import util
|
163
|
163
|
t = util.getTarget()
|
164
|
164
|
|
|
165
|
+ # show splash screen while initializing
|
165
|
166
|
from splash import SplashScreen
|
166
|
167
|
splash = SplashScreen(t)
|
167
|
168
|
t.loop_start()
|
|
@@ -171,18 +172,16 @@ if __name__ == "__main__":
|
171
|
172
|
from manager import Manager
|
172
|
173
|
m = Manager(t)
|
173
|
174
|
|
174
|
|
- m.add(ScrollText(t, "tom-thumb Abcdefgh tom-thumb", "tom-thumb",
|
175
|
|
- 1, 75, (0, 255, 0), (0, 0, 25)))
|
176
|
|
- m.add(ScrollText(t, "antidote Abcdefgh antidote", "antidote",
|
177
|
|
- 1, 75, (0, 255, 0), (0, 0, 25)))
|
178
|
|
- m.add(ScrollText(t, "uushi Abcdefgh uushi", "uushi",
|
179
|
|
- 1, 75, (0, 255, 0), (0, 0, 25)))
|
180
|
|
- m.add(ScrollText(t, "lemon Abcdefgh lemon", "lemon",
|
181
|
|
- 1, 75, (0, 255, 0), (0, 0, 25)))
|
182
|
|
- m.add(ScrollText(t, "ib8x8u Abcdefgh ib8x8u", "ib8x8u",
|
183
|
|
- 1, 75, (0, 255, 0), (0, 0, 25)))
|
184
|
|
- m.add(ScrollText(t, "iv18x16u Abcdefgh iv18x16u", "iv18x16u",
|
185
|
|
- 1, 75, (0, 255, 0), (0, 0, 25)))
|
|
175
|
+ scriptDir = os.path.dirname(os.path.realpath(__file__))
|
|
176
|
+ fontDir = os.path.join(scriptDir, "fonts")
|
|
177
|
+ for f in os.listdir(os.fsencode(fontDir)):
|
|
178
|
+ filename = os.fsdecode(f)
|
|
179
|
+ if not filename.endswith(".bdf"):
|
|
180
|
+ continue
|
|
181
|
+
|
|
182
|
+ fontName = filename[:-4]
|
|
183
|
+ s = fontName + " Abcdefgh " + fontName
|
|
184
|
+ m.add(ScrollText(t, s, fontName, 1, 75, (0, 255, 0), (0, 0, 25)))
|
186
|
185
|
|
187
|
186
|
m.restart()
|
188
|
187
|
t.loop(m.draw)
|