Added the icon to the window.

This commit is contained in:
The Wobbler 2023-11-18 13:01:55 +01:00
parent 990c8a1ec4
commit b61d5406d4

View file

@ -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")
grass_block_texture = load_block_texture("textures/terrain/grass_01.png")
rock_block_texture = load_block_texture("textures/terrain/rock_01.png")
icon_texture = load_texture("textures/icon.png")
# coordinate calculations
@ -142,8 +143,7 @@ def load_level(lvl):
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.fill(summer_sky)
level_surface = pygame.Surface((lvl_width * 40 * settings["level_size_multiplier"], lvl_height * 40 * settings["level_size_multiplier"]), pygame.SRCALPHA, 32)
x = 0
y = 0
@ -180,7 +180,6 @@ def blit_block(block, position: tuple):
level_surface.blit(texture_not_found, position)
def main_menu_page():
buttons[start_button].blit()
@ -192,6 +191,7 @@ def level_selector_page():
def ingame_page():
screen.fill(summer_sky)
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)
window_size_reload(settings["win_size"])
pygame.display.set_icon(icon_texture)
screen.fill(nero)
pygame.display.update()