forked from inclement/noGo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
miscwidgets.py
48 lines (39 loc) · 1.4 KB
/
miscwidgets.py
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
from kivy.uix.widget import Widget
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.textinput import TextInput
from kivy.properties import NumericProperty, ReferenceListProperty, ObjectProperty, ListProperty, AliasProperty, StringProperty, DictProperty, BooleanProperty, StringProperty, OptionProperty
class AndroidTextInput(TextInput):
def on_focus(self,*args):
print 'focus changed for',self
super(AndroidTextInput, self).on_focus(*args)
class CarouselRightArrow(Button):
pass
class CarouselLeftArrow(Button):
pass
class VDividerLine(Widget):
vgap = NumericProperty(0.2)
linewidth = NumericProperty(1)
colour = ListProperty([0.195,0.641,0.805])
class HDividerLine(Widget):
hgap = NumericProperty(0.1)
linewidth = NumericProperty(2)
colour = ListProperty([0.195,0.641,0.805])
class DividerLine(Widget):
hgap = NumericProperty(0.1)
linewidth = NumericProperty(2)
colour = ListProperty([0.195,0.641,0.805])
class WhiteStoneImage(Widget):
pass
class BlackStoneImage(Widget):
pass
class NumberChooser(BoxLayout):
number = NumericProperty(0)
number_max = NumericProperty(9)
number_min = NumericProperty(0)
def increment(self):
if self.number < self.number_max:
self.number += 1
def decrement(self):
if self.number > self.number_min:
self.number -= 1