blob: ab67180071274c5a2689e4b2a7b152f383e1e351 (
plain)
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
|
"""Dialogue to show some message.
Part of the tagit module.
A copy of the license is provided with the project.
Author: Matthias Baumgartner, 2022
"""
# kivy imports
from kivy.lang import Builder
import kivy.properties as kp
# inner-module imports
from .dialogue import Dialogue
# exports
__all__ = ('Message', )
## code ##
# load kv
Builder.load_string('''
<Message>:
text: ''
align: 'center'
textcolor: 1,1,1,1
DialogueContentNoTitle:
Label:
text: root.text
size_hint_y: None
color: root.textcolor
height: self.texture_size[1] + dp(16)
text_size: self.width - dp(16), None
halign: root.align
markup: True
DialogueButtons_One:
''')
# classes
class Message(Dialogue):
"""Dialogue to show a text message."""
text = kp.StringProperty()
align = kp.StringProperty()
textcolor: kp.ListProperty()
## EOF ##
|