-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
37 lines (29 loc) · 983 Bytes
/
config.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
import json
import pygame
import pygame_gui
pygame.init()
pygame.display.set_caption("creature game")
screen = pygame.display.set_mode((1300, 800))
screen_rect = screen.get_rect()
clock = pygame.time.Clock()
pygame.key.set_repeat(True)
manager = pygame_gui.UIManager((1300, 800), theme_path="UI_config.JSON")
map_width = 8
map_height = 13
tile_size = 100
dt = clock.tick(60)/1000.0
# This is here so that text can be looped through and placed in the dialogue box.
dialogue = {}
with open('dialogue.json') as file:
dialogue = json.load(file)
text = {}
with open('item_descriptions.json') as file:
text = json.load(file)
running = True
character_can_move = True
show_dialogue_box = False
# Dialogue
dialogue_box = pygame_gui.elements.UITextBox(relative_rect=pygame.Rect((150, 500), (1000, 250)),
html_text = '<body style="black">test</body>',
manager = manager)
dialogue_box.hide()