-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpres.kv
1102 lines (926 loc) · 38.2 KB
/
pres.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
#:include defalt_value.kv
#:include set_widget.kv
#:include ./calc/calculator.kv
#:include ./drag_drop/drag_drop.kv
#:include ./graph_example/graph.kv
#:include ./anime/anime.kv
#:include ./layout/layout_example.kv
#:include ./clock/clock.kv
MainSlide:
<MainSlide>
BoxLayout:
size: root.size
orientation: 'vertical'
canvas.before:
Color:
rgba: color(background_color)
Rectangle:
pos: self.pos
size: self.size
# Title:
# text: '「Kivyによるアプリケーション開発のすすめ」'
Title:
text: sm.current
PresButton:
pos_hint: {'center_y': .5, 'x': 0}
size_hint_x: None
width: self.height
text: '←'
on_press:
sm.transition.direction = 'right'
sm.current = sm.previous()
PresButton:
pos_hint: {'center_y': .5, 'right': 1}
size_hint_x: None
width: self.height
text: '→'
on_press:
sm.transition.direction = 'left'
sm.current = sm.next()
ScreenManager:
id: sm
Screen:
name: 'PyconJP2017'
BoxLayout:
orientation: 'vertical'
TitleLabel:
text: '[b]「Kivyによるアプリケーション開発のすすめ」[/b]'
ContentLabel:
#markup: True
text: 'オカザキ'
Spacer
Screen:
name: '自己紹介'
TextSlide:
# テキストないで\nを使用すると改行する
text:
'''
オカザキ
職業:プログラマー
http://twitter.com/dario_okazaki
Kivyの公式マニュアルの翻訳を有志でしています
(https://pyky.github.io/kivy-doc-ja/)
'''
Screen:
name: '目次'
TextSlide:
text:
'''
・Kivyとは
・今日の内容
・kivyの機能について
・kivyの4つの壁
・kivyのよい点と悪い点
・まとめ
・おまけ
'''
#Spacer
Screen:
name: '検証環境'
TextSlide:
text:
'''
Windows10 ※Mac,Linuxでも一部の機能を除いて動作します
Python3.5
Kivy1.10
'''
Screen:
name: 'コードについて'
TextSlide:
text:
'''
GITHub:https://github.com/okajun35/kivy_pyconjp2017
Slide:https://www.slideshare.net/secret/45D5Wuy6FWI3X5
※コードの詳しい説明は今回はしません。
コードの詳しい説明は後日webに公開予定
'''
#Spacer
Screen:
name: 'Kivyとは(1/2)'
BoxLayout:
orientation: 'vertical'
FloatLayout:
id: logo_container
size_hint_y: None
height: logo.texture_size[1] * 2
Scatter:
size_hint: None, 1.0
size: logo.size
center: logo_container.center
Image:
id: logo
size: self.texture_size
source: 'data/logo/kivy-icon-256.png'
ContentLabel:
text:
'''
・PythonでGUIを作成するツール
・Python2/3対応
・マルチプラットフォーム(Win,Mac,Linux,Raspberry Pi,android,ios)
・マルチタッチ対応
・Kv LanguageというUIを記述するメタ言語がある
・MITライセンス
'''
Spacer
Screen:
name: 'Kivyとは(2/2)'
BoxLayout:
orientation: 'vertical'
Image:
source: 'github.jpg'
ImageLabel:
text:
'''
・GitHub上( https://github.com/kivy/kivy )でコードが公開されている
・2017年現在も開発は盛んにおこなわれている
'''
Screen:
name: 'kivyの知名度(1/2)'
BoxLayout:
orientation: 'vertical'
Image:
source: 'intro.JPG'
ImageLabel:
text:
'''
Python3.6から公式の「グラフィックユーザインタフェース FAQ」に
も紹介されている
http://docs.python.jp/3/faq/gui.html#kivy
'''
#Spacer
Screen:
name: 'kivyの知名度(2/2)'
BoxLayout:
orientation: 'vertical'
Image:
source: 'intro2.JPG'
ImageLabel:
text:
'''
「AweSome Python」ではGUIの部門で1位
https://python.libhunt.com/categories/290-gui
'''
#Spacer
Screen:
name: '今日の内容'
BoxLayout:
orientation: 'vertical'
TitleLabel:
text:
'''
[color=ff0000]「Kivyで何ができるか」[/b]の紹介
'''
Spacer
Screen:
name: 'Kivyで作れるアプリケーション'
TextSlide:
text:
'''
公式で出しているAndroidアプリがあるので
それをインストールして試してみる。\n
※Android端末がなくても「kivy_examples」を
インストールして、実行すれば試せます。
'''
#Spacer
Screen:
name: 'Kivy Showcase'
BoxLayout:
orientation: 'vertical'
Image:
source: 'Showcase.jpg'
ImageLabel:
text:
'''
Kivy Showcas(https://play.google.com/store/apps/details?id=org.kivy.showcase)
・UI(widget)の一覧とコードが読める
'''
Screen:
name: 'Kivy Touchtracer'
BoxLayout:
orientation: 'vertical'
Image:
source: 'Touchtracer.jpg'
ImageLabel:
text:
'''
Kivy Touchtracer(https://play.google.com/store/apps/details?id=org.kivy.touchtracer)
・タッチの軌跡を描画する
・マルチタッチ対応
'''
Screen:
name: 'Kivyの構造'
BoxLayout:
orientation: 'vertical'
Image:
source: 'architecture.png'
ImageLabel:
text:
'''
・GraphicはOpenGL ESで描画
・入力などはSDLで制御
※Windowsはver1.10でANGLE(OpenGl ESのDirectX実装)が選択できるようになった
'''
Screen:
name: 'Kivyのファイル構造'
BoxLayout:
orientation: 'vertical'
Image:
source: 'file_example.jpg'
ImageLabel:
text:
'''
①Pythonファイル(機能部分)とKVファイル(UI)の2つ
②Pythonファイルのみ
-Kv Languageが内部で記載されている
-Pythonのみで構成
'''
Screen:
name: 'Kivyの機能について'
TextSlide:
text:
'''
ここで説明するのはごく一部の機能です
'''
#Spacer
Screen:
name: 'Widget'
TextSlide:
text:
'''
画面を構成するパーツ
・Label
・Image
・Button
etc…
'''
Screen:
name: 'Layout'
TextSlide:
text:
'''
画面のレイアウト
・BoxLayout
・GridLayout
・Float Layout
etc…
'''
Screen:
name: 'レイアウトの基本'
TextSlide:
text:
'''
\n
・「Layout」と「Widget」を組み合わせて作る
・位置とサイズの指定は2パターンある
・絶対的な指標で指定: 「pos」、「size」
・画面サイズからの相対的な比率で指定: 「pos_hint」「size_hint」
・「hint」で決まる値が優先的に決まる
・「Layout」の基本は「BoxLayout」
・「BoxLayout」を組み合わせると大体のレイアウトはできる
・「Label」などの文字のサイズは動的に変更する仕組みがない・・・
'''
Screen:
name: '文字、画像の表示'
ExampleBoxWidget
Screen:
name: '文字、画像の表示(size_hint)'
ExampleBoxWidget2
Screen:
name: 'Event'
TextSlide:
text:
'''
動作に紐づく命令を実行する
・On_Press
・On_Relese
etc…
'''
Screen:
name: 'Property'
TextSlide:
text:
'''
widgetの値を参照する
・NumericProperty
・StringProperty
・ListProperty
etc…
'''
Screen:
name: 'ボタンの使用'
ExampleButton:
Screen:
name: 'ボタンとレイアウトの使用例(1/2)'
CalculatorRoot:
id:calcu_root
Screen:
name: 'ボタンとレイアウトの使用例(2/2)'
id: kivy_calender
Image:
source: 'kivy_calender.jpg'
Screen:
name: 'Kivy Language'
BoxLayout:
orientation: 'vertical'
Image:
source: 'kv_sample.JPG'
ImageLabel:
text:
'''
Kv Languageともいう
・UI用のメタ言語
・Widget(UI)を簡単に記述できる
・CSSとBootstrap(グリッド)の概念にちかい
※Kvを使用しなくてもUIは作れるが、
使用したほうがコードが簡潔にかける
'''
Screen:
name: 'Animation'
TextSlide:
text:
'''
動きを付ける
・start
・stop
使用例:メニューの表示などに使う
'''
Screen:
name: 'Animationの使用'
AnimeWidget:
#Button:
id: lap
text: 'Lap'
Screen:
name: 'Clock'
TextSlide:
text:
'''
繰り返しや定期的な動作を行う
・schedule_interval
・schedule_once
etc…
'''
Screen:
name: '繰り返し(時計)'
BoxLayout:
orientation: 'vertical'
Label: # test
id: time
font_name: './fonts/7SDD.TTF'
color: color(content_color)
text: '[b]00:00:00[/b]'
font_size: 100
markup: True
Label: # test
id: today
color: color(content_color)
font_name: './fonts/7SDD.TTF'
text: 'aa/bb/cc'
font_size: 100
markup: True
Spacer
Screen:
name: '繰り返し(ストップウォッチ)'
BoxLayout:
orientation: 'vertical'
Label: # test
id: stopwatch
color: color(content_color)
text: '[b]00:00:00[/b]'
font_size: 50
markup: True
BoxLayout:
height: 90
orientation: 'horizontal'
padding: 20
spacing: 20
size_hint: (1, None)
Button:
id: start_stop
text: 'Start'
on_press: app.start_stop()
Button:
id: reset
text: 'Reset'
on_press: app.reset()
Button:
id: lap
text: 'Lap'
on_press: app.record_lap()
BoxLayout:
height: 90
orientation: 'horizontal'
Label: # test
id: lap
color: color(content_color)
text: 'LAP'
font_size: 30
size_hint_x: 0.2
Label: # test
id: lap
color: color(content_color)
text: '00:00:00'
font_size: 50
size_hint_x: 0.8
markup: True
Spacer
Screen:
name: '実例(時計2)'
MyClockWidget:
Screen:
name: 'そのほかの機能1'
TextSlide:
text:
'''
スライド
・Carousel:ヘッダー,フッターは固定
・ScreenManager:画面全体が動く
\n
※このスライドはScreenManagerによって作成されています
'''
Screen:
name: 'そのほかの機能2'
TextSlide:
text:
'''
・ファイル選択
・ドラッグ&ドロップ
etc…
\n
Kivyにはこの他にもたくさんの機能があります
'''
Screen:
name: 'ファイル選択'
BoxLayout:
orientation: 'vertical'
#size: root.size
#pos: root.pos
BoxLayout:
size_hint_y: 0.2
Label:
font_size: 30
color: 0,0,0,1
text: 'リストタイプ'
Label:
font_size: 30
color: 0,0,0,1
text: 'アイコンタイプ'
BoxLayout:
size_hint_y: 0.8
canvas.before:
Color:
rgba: 0.1, 0.1, 0.1, 1
Rectangle:
pos: self.pos
size: self.size
FileChooserListView:
rootpath: './'
FileChooserIconView:
rootpath: './'
Screen:
name: 'ドラッグ&ドロップ'
ImageWidget: # ドラッグアンドドロップの例
Screen:
name: 'Garden'
TextSlide:
text:
'''
拡張機能。個別にインストールする。
・地図表示
・グラフ描画
etc…
'''
Screen:
name: '地図表示'
TextSlide:
text:
'''
・mapview(https://github.com/kivy-garden/garden.mapview)
-OpenStreetMapを使用。
-マーカーを表示
'''
Screen:
name: 'garden.mapview'
BoxLayout:
orientation: 'vertical'
Label:
size_hint_y: 0.1
color: color(content_color)
text: "早稲田大学 西早稲田キャンパス"
MapView:
size: root.size
id: map
zoom: 17
lat: 35.706020
lon: 139.707188
MapMarkerPopup:
lat: 35.706020
lon: 139.707188
Bubble:
size_hint: (None, None)
size: (300, 100)
arrow_pos: 'bottom_left'
BoxLayout:
orientation: "horizontal"
padding: "5dp"
AsyncImage:
source: "https://www.waseda.jp/top/assets/uploads/2014/02/w20140415_145-2000x1333.jpg"
mipmap: True
Label:
text: "早稲田大学\n 西早稲田キャンパス"
halign: "center"
Screen:
name: 'グラフ描画'
TextSlide:
text:
'''
\n
Kivyの機能のみで実装する
・Graph(https://github.com/kivy-garden/garden.graph)
※スライドに組み込むには改造する必要あり。
https://github.com/kivy-garden/garden.graph/issues/7
\n
matplotlbを使用する
・matplotlib(https://github.com/kivy-garden/garden.matplotlib)
・動作が重い
・パッケージ化の際に難易度がます
'''
Screen:
on_enter:root.call_glph()
name: 'グラフ(garden.glah)'
id: graph_plot2
GraphWidget:
id: graph_plot4
Screen:
on_enter:root.call_matplot()
on_pre_leave:root.del_matplot()
name: 'グラフ(garden.matplotlib)'
id: graph_matplot
Screen:
name: 'デスクトップアプリの方法'
TextSlide:
text:
'''
PyInstaller(http://www.pyinstaller.org/)を使用
・使用方法はKivyの公式マニュアル(翻訳済み)を参考
(https://pyky.github.io/kivy-doc-ja/guide/packaging.html)※
・オプションでいろいろできる
・依存関係の設定などコツがいる
・起動が重い
※MacOSのみ翻訳が公式より古いので、
MacOSの場合は公式を見てください
'''
Screen:
name: 'androidアプリの作成(1/2)'
BoxLayout:
orientation: 'vertical'
ContentLabel:
text:
'''
・Kivy Launcher
(GooglePlayから入手)
-Pythonコードによるプレビューツール
-バックグラウンドでも動作可能
-実行時のログ出力対応
-Pyhon2系のみ対応
-Kivy1.9.1対応で最新版には対応していない
\n
・Buildozer(UbuntuによるVM)でのapk作成
-Python2/3系対応
\n
・Plyer:Pythonラッパーのプラットフォーム非依存API群。
・Pyjnius:PythonからJava / Android APIへ動的アクセスする
'''
Spacer
Screen:
name: 'androidアプリの作成(2/2)'
BoxLayout:
orientation: 'vertical'
ContentLabel:
text:
'''
androidの開発手順は以下が理想
①PCで開発
②android端末にコードを転送
③Kivy Launcherで動作確認
④Buildozerでapk作成
⑤apkでの動作確認
⑥PlayStoreにリリース
※この方法だとPython2系による開発になる
'''
Spacer
Screen:
name: 'iosアプリの作成'
BoxLayout:
orientation: 'vertical'
ContentLabel:
text:
'''
・Python2系のみ対応※
・toolchainを使用してXcode用のプロジェクトを作成する
・Pyobjus:動的にiosのAPIにアクセス
※Python3系の対応は有志によって開発中
Python 3 support #184(https://github.com/kivy/kivy-ios/issues/184)
'''
Spacer
Screen:
name: 'kivy Lancherでの実演'
BoxLayout:
orientation: 'vertical'
Image:
source: 'kivyLaucher.jpg'
ImageLabel:
text:
'''
国会図書館の検索API(http://iss.ndl.go.jp/information/api/)
を使用して書籍検索する
UrlRequest()を利用して非同期でリクエストを送受信する
'''
Spacer
Screen:
name: '実例(Android)'
BoxLayout:
orientation: 'vertical'
Camera:
id: camera
resolution: (640, 480)
play: False
ToggleButton:
text: 'Play'
on_press: camera.play = not camera.play
size_hint_y: None
height: '48dp'
Screen:
name: 'クロスプラットフォームについて'
BoxLayout:
orientation: 'vertical'
Image:
source: 'gs-introduction.png'
ImageLabel:
text:
'''
・どのデバイスまで視野にいれるかの検討が必要
'''
Screen:
name: 'クロスプラットフォームの一覧'
BoxLayout:
orientation: 'vertical'
Image:
source: 'os_ver.jpg'
ImageLabel:
text:
'''
※2019年をめどにすべてのデバイスでPython3系対応
およびPython2系の対応廃止予定
(https://github.com/kivy/kivy/wiki/Kivy-Python-2-Support-Timeline)
'''
Screen:
name: 'Kivyについて'
TitleLabel:
text:
'''
GUIツールとしての機能は一通りそろっている
'''
#Spacer:
Screen:
name: 'Kivyの4つの壁'
BoxLayout:
orientation: 'vertical'
TitleLabel:
text:
'''
\n
①情報が少ない
②インストール
③Kv Language
④日本語入力(IME)
'''
Spacer
Screen:
name: '①情報が少ない(1/4)'
TextSlide:
text:
'''
・日本語の情報は特に少ない
-存在していても日本語の情報は古いものがある
-環境構築系は参考にしない方がいい
・コミュニティがないのでわからなくても聞く人がいない
'''
Screen:
name: '①情報が少ない(2/4)'
TextSlide:
text:
'''
・公式サイト(英語)
(https://kivy.org/docs/)
・公式の翻訳
(https://pyky.github.io/kivy-doc-ja/)
※最初のうちは両方開いて比較するとよい
※翻訳の協力者募集中
'''
Screen:
name: '①情報が少ない(3/4)'
TextSlide:
text:
'''
日本語の情報(個人的なおすすめサイト)
・Python Kivyの使い方① ~Kv Languageの基本~
(http://qiita.com/dario_okazaki/items/7892b24fcfa787faface)
・とりなとりな氏(blog)
(https://torina.top/tag/Kivy/)
・水戸う 納豆斎氏(Qitta)
(http://qiita.com/gotta_dive_into_python)
'''
Screen:
name: '①情報が少ない(4/4)'
BoxLayout:
orientation: 'vertical'
ContentLabel:
markup: True
text:
'''
・StackOverflow(https://stackoverflow.com/)
-Google翻訳を使えばなんとなくわかる
\n
書籍(洋書だが国内でもAmazonで購入可能)
・Creating Apps in Kivy (O‘Reilly)
・Kivy: Interactive Applications and Games in Python -Second Edition
・Kivy Blueprints
※コードはwebで無料で見れる
'''
Spacer
Screen:
name: '②インストール'
BoxLayout:
orientation: 'vertical'
ContentLabel:
markup: True
text:
'''
WindowsOSだとOpenGLとSDLなどのせいで
pipでインストールできない場合がある
・Python2.7/3.4について
-公式どおりで大丈夫
・3.5以上をインストール
-VisualStudio2015をインストール。
glutを配置しないとインストールできない
・インストールがうまくいかない場合
-非公式パッケージのインストールをお勧めします
(http://www.lfd.uci.edu/~gohlke/pythonlibs/#kivy)
\n
MacOSでもPython3.6だとうまく動作しない場合がある
'''
Spacer
Screen:
name: '③Kv Language'
BoxLayout:
orientation: 'vertical'
text:
'''
\n
'''
ContentLabel:
markup: True
text:
'''
kivy独自の概念なので理解するのに時間がかかる
\n
・kviewerを使うとリアルタイムに変更が確認できる
※Python3系だとコードを書きなおす必要がある
反映されるのはkvファイル側の記述であるところが注意
Pythonファイル側の設定は反映されない
\n
・Inspector()
-m inspector を実行時の引数につける
widegetを選択してPropertyの値、親子関係を確認できる
\n
・Python側でwidget内部にブレイクポイントをはって
widgetの構成を調べる
・Atomやsublimeなどだと3rdPartyによる入力補完が可能
'''
Spacer
Screen:
name: '③Kv Language(kviewer)'
BoxLayout:
orientation: 'vertical'
Image:
source: 'kviewer.jpg'
ImageLabel:
text:
'''
「python -m kivy.tools.kviewer <kvファイル>」で実行
・Python3系だとKivy本体のソースを修正しないと
エラーになって起動しない
'''
Screen:
name: '③Kv Language(Inspector)'
TextSlide:
BoxLayout:
orientation: 'vertical'
Image:
source: 'inspector.jpg'
ImageLabel:
text:
'''
「python ./main.py -m inspector」で実行
・「Ctr+e」でメニューがでる
'''
Screen:
name: '④日本語入力(IME)'
TextSlide:
pos:root.pos
text:
'''
\n\n
windows/mac/iosだと日本語入力中のIMEが表示されない
・SDL側の入力イベントをキャッチしていないのが原因
(http://qiita.com/dario_okazaki/items/8c6953166b336e83e417)
\n
・@sou_anさんがプルリクしたが採択されていない。
「Add textedit event for text editing by IME #5109」
※個人で直すとcythonによるビルドが必要
SDL2のライブラリーが必要なのでビルド環境を作るのは難しい
'''
Screen: