Add layout to track hex selection.
This commit is contained in:
parent
ad550629a4
commit
b7346b713a
|
@ -0,0 +1,13 @@
|
||||||
|
#:import utils kivy.utils
|
||||||
|
|
||||||
|
BoxLayout:
|
||||||
|
orientation: 'horizontal'
|
||||||
|
HexMap:
|
||||||
|
id: map
|
||||||
|
size_hint: .8, 1
|
||||||
|
MapLabel:
|
||||||
|
id: coords
|
||||||
|
size_hint: .2, 1
|
||||||
|
|
||||||
|
<MapLabel@Label>:
|
||||||
|
text: 'Change me'
|
|
@ -4,8 +4,6 @@ from kivy.uix.widget import Widget
|
||||||
from kivy.utils import get_color_from_hex
|
from kivy.utils import get_color_from_hex
|
||||||
|
|
||||||
HEX_SIZE = 100
|
HEX_SIZE = 100
|
||||||
NUMBER_OF_HEXES = 2
|
|
||||||
|
|
||||||
HORIZONTAL_BUFFER = 0.9
|
HORIZONTAL_BUFFER = 0.9
|
||||||
VERTICAL_BUFFER = 0.8
|
VERTICAL_BUFFER = 0.8
|
||||||
|
|
||||||
|
@ -64,8 +62,7 @@ class HexMap(Widget):
|
||||||
|
|
||||||
|
|
||||||
class HexMapApp(App):
|
class HexMapApp(App):
|
||||||
def build(self):
|
pass
|
||||||
return HexMap()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue