Added the icon to the window.
This commit is contained in:
parent
990c8a1ec4
commit
b61d5406d4
1 changed files with 4 additions and 3 deletions
|
@ -84,6 +84,7 @@ stone_block_texture = load_block_texture("textures/terrain/stone_01.png")
|
||||||
dirt_block_texture = load_block_texture("textures/terrain/dirt_01.png")
|
dirt_block_texture = load_block_texture("textures/terrain/dirt_01.png")
|
||||||
grass_block_texture = load_block_texture("textures/terrain/grass_01.png")
|
grass_block_texture = load_block_texture("textures/terrain/grass_01.png")
|
||||||
rock_block_texture = load_block_texture("textures/terrain/rock_01.png")
|
rock_block_texture = load_block_texture("textures/terrain/rock_01.png")
|
||||||
|
icon_texture = load_texture("textures/icon.png")
|
||||||
|
|
||||||
|
|
||||||
# coordinate calculations
|
# coordinate calculations
|
||||||
|
@ -142,8 +143,7 @@ def load_level(lvl):
|
||||||
|
|
||||||
lvl_width, lvl_height = level_data.level_size
|
lvl_width, lvl_height = level_data.level_size
|
||||||
|
|
||||||
level_surface = pygame.Surface((lvl_width * 40 * settings["level_size_multiplier"], lvl_height * 40 * settings["level_size_multiplier"]))
|
level_surface = pygame.Surface((lvl_width * 40 * settings["level_size_multiplier"], lvl_height * 40 * settings["level_size_multiplier"]), pygame.SRCALPHA, 32)
|
||||||
level_surface.fill(summer_sky)
|
|
||||||
|
|
||||||
x = 0
|
x = 0
|
||||||
y = 0
|
y = 0
|
||||||
|
@ -180,7 +180,6 @@ def blit_block(block, position: tuple):
|
||||||
level_surface.blit(texture_not_found, position)
|
level_surface.blit(texture_not_found, position)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main_menu_page():
|
def main_menu_page():
|
||||||
buttons[start_button].blit()
|
buttons[start_button].blit()
|
||||||
|
|
||||||
|
@ -192,6 +191,7 @@ def level_selector_page():
|
||||||
|
|
||||||
|
|
||||||
def ingame_page():
|
def ingame_page():
|
||||||
|
screen.fill(summer_sky)
|
||||||
screen.blit(level_surface, (0, screen.get_height() - level_surface.get_height()))
|
screen.blit(level_surface, (0, screen.get_height() - level_surface.get_height()))
|
||||||
|
|
||||||
|
|
||||||
|
@ -277,6 +277,7 @@ def loop():
|
||||||
|
|
||||||
screen = pygame.display.set_mode(settings["win_size"], flags=pygame.RESIZABLE)
|
screen = pygame.display.set_mode(settings["win_size"], flags=pygame.RESIZABLE)
|
||||||
window_size_reload(settings["win_size"])
|
window_size_reload(settings["win_size"])
|
||||||
|
pygame.display.set_icon(icon_texture)
|
||||||
screen.fill(nero)
|
screen.fill(nero)
|
||||||
pygame.display.update()
|
pygame.display.update()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue