Initial version
[tenra-roller.git] / tenraroller.kv
1 <SlavedSlider>:
2 orientation: 'horizontal'
3 min: 1
4 step: 1
5
6 <SlavedTextInput>:
7 padding: [5, ( self.height - self.line_height ) / 2]
8 multiline: False
9
10 <TenraRoller>:
11 dice_slider: dice_slider
12 dice_text: dice_text
13 skill_slider: skill_slider
14 skill_text: skill_text
15
16 roll_button: roll_button
17 result_label: result_label
18 previous_results: previous_results
19
20 BoxLayout:
21 orientation: 'vertical'
22 spacing: 10
23
24 BoxLayout:
25 orientation: 'horizontal'
26 spacing: 10
27 center_x: root.center_x
28 width: root.width
29 Label:
30 text: "Dice"
31 SlavedSlider:
32 id: dice_slider
33 max: root.max_dice
34 value: root.dice_value
35 on_value: root.slider_value_change(dice_slider)
36 SlavedTextInput:
37 id: dice_text
38 text: str(root.dice_value)
39 on_text: root.text_value_change(dice_text)
40
41
42 BoxLayout:
43 orientation: 'horizontal'
44 spacing: 10
45 width: root.width
46 Label:
47 text: "Skill"
48 SlavedSlider:
49 id: skill_slider
50 max: root.max_skill
51 value: root.skill_value
52 on_value: root.slider_value_change(skill_slider)
53 SlavedTextInput:
54 id: skill_text
55 on_text: root.text_value_change(skill_text)
56 text: str(root.skill_value)
57
58
59 Button:
60 id: roll_button
61 text: "Roll"
62 on_press: root.roll_dice()
63
64 Label:
65 id: result_label
66 bold: True
67 text: root.initial_result_label_text
68
69 ListView:
70 id: previous_results
71 adapter: root.previous_results_la