-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.py
55 lines (45 loc) · 932 Bytes
/
ui.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
48
49
50
51
52
53
54
55
# General constants
SCREEN_WIDTH = 900
SCREEN_HEIGHT = 480
TITLE = "Number Crunch"
GRID_WIDTH = 3
GRID_HEIGHT = 3
# Rectangle sizes
BUTTON_WIDTH = 100
BUTTON_HEIGHT = 50
SQUARE_SIZE = 95
GRID_GAP = 5
SHOP_WIDTH = 340
SHOP_HEIGHT = 50
# Text sizes
TITLE_SIZE = 72 # for start, end
DETAIL_SIZE = 48 # for end
SMALL_TITLE_SIZE = 36 # for game
NUMBER_SIZE = 36 # for game
COST_SIZE = 30 # for game
STATE_SIZE = 30 # for game
# Element positions (start)
START_TITLE_Y = 180
# Element positions (game)
GRID_X = 30
STATE_X_1 = GRID_X
STATE_X_2 = 230
OFFSET_X = 5
STATE_Y_1 = 380
STATE_Y_2 = 410
STATE_Y_3 = 440
SHOP_X = 430
SHOP_TEXT_X = SHOP_X + 30
SHOP_RANGE_X = SHOP_X + 250
SHOP_Y_1 = 60
SHOP_Y_2 = 140
SHOP_Y_3 = 220
SHOP_TEXT_Y_1 = SHOP_Y_1 + 15
SHOP_TEXT_Y_2 = SHOP_Y_2 + 15
SHOP_TEXT_Y_3 = SHOP_Y_3 + 15
# Element positions (end)
END_TITLE_Y = 80
DETAIL_Y_1 = 160
DETAIL_Y_2 = 200
DETAIL_Y_3 = 240
DETAIL_Y_4 = 280