-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshopgui.py
66 lines (48 loc) · 1.5 KB
/
shopgui.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
56
57
58
59
60
61
62
63
64
65
66
import json
import pygame as pg
from . import setup, textbox
from . import constants as c
class Gui(object):
'''
CLASS FOR GUI OF SHOP STATE
'''
def __init__(self, level):
self.level = level
self.allow_input = False
self.selector = textbox.Selector(level.width)
self.selector.rect.topleft = (0,level.selector_height)
def make_dialog_box(self, dialog_list, index):
#image = setup.GFX['']
pass
def display_money(self, surface):
#BLIT MONEY ONTO SURFACE
#surface.blit(self.game_data['points'],())
pass
def make_state_dict(self):
'''
MAKE STATE DICTIONARY FOR GUI BEHAVIOUR
'''
state_dict = {'dialog':self.control_dialog,
'buy':self.buy
}
return state_dict
def control_dialog(self):
pass
def buy(self):
pass
def reject_insufficient_money(self,
keys,
current_time):
pass
def update(self, keys,current_time):
'''
UPDATE SHOPGUI
'''
state_function = self.state_dict[self.state]
state_function(keys, current_time)
def draw(self, surface):
'''
DRAW GUI TO LEVEL SURFACE
'''
state_list = []
surface.blit(self.selector.image, self.selector.rect)