-
Notifications
You must be signed in to change notification settings - Fork 0
/
dialog.kv
50 lines (37 loc) · 1.09 KB
/
dialog.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
<CutsceneText@ModalView>:
size: root.size
current_text: 'Current Text'
Label:
text: root.current_text
<Conversation@BoxLayout>:
current_name: 'Character Name'
current_text: 'Current Dialog'
# using __self__ so that we can add/remove these widgets at will
current_name_widget: actor_name.__self__
current_text_widget: dialog.__self__
# override for target actor name
current_name_override: None
orientation: 'vertical'
Button:
id: actor_name
halign: 'justify'
size_hint_y: 0.2
text: root.current_name_override if root.current_name_override is not None else root.current_name
Button:
id: dialog
padding: [5, 5]
halign: 'justify'
valign: 'top'
text: root.current_text
<ConversationContainer@ModalView>:
conversation: conversation
size: root.size
GridLayout:
rows: 2
orientation: 'vertical'
padding: [5, 5]
BoxLayout:
size_hint_y: 0.7
Conversation:
id: conversation
size_hint_y: 0.3