diff --git a/assets/textures/floors/floor_01.png b/assets/textures/floors/floor_01.png index c299452..11fb13b 100644 Binary files a/assets/textures/floors/floor_01.png and b/assets/textures/floors/floor_01.png differ diff --git a/assets/textures/floors/floor_01.xcf b/assets/textures/floors/floor_01.xcf index 4540721..3572dc8 100644 Binary files a/assets/textures/floors/floor_01.xcf and b/assets/textures/floors/floor_01.xcf differ diff --git a/gd_pygame.py b/gd_pygame.py index 0dd88ee..e57d3dd 100644 --- a/gd_pygame.py +++ b/gd_pygame.py @@ -40,6 +40,11 @@ class GDPygame: self.mouse = pygame.mouse self.pusab = pygame.font.Font("PUSAB.otf") + self.floor_texture = pygame.image.load("assets/textures/floors/floor_01.png") # textures + self.floor_texture = pygame.transform.scale(self.floor_texture, (self.floor_texture.get_width() * 4, self.floor_texture.get_height() * 4)) + self.background_texture = pygame.image.load("assets/textures/backgrounds/background_01.png") + self.background_texture = pygame.transform.scale(self.background_texture, (self.background_texture.get_width() * ((self.screen.get_height() - self.floor_texture.get_height()) // self.background_texture.get_height()), self.screen.get_height() - self.floor_texture.get_height())) + # loading finished self.window.size = self.settings.window_size diff --git a/ui.py b/ui.py index 2ef2141..863eaeb 100644 --- a/ui.py +++ b/ui.py @@ -31,3 +31,14 @@ class Page: class MainMenu(Page): def draw(self): self.app.screen.fill(self.app.blue) + w, h = self.app.screen.get_size() + + x = 0 + while x < w: + self.app.screen.blit(self.app.background_texture, (x, 0)) + x += self.app.background_texture.get_width() + + x = 0 + while x < w: + self.app.screen.blit(self.app.floor_texture, (x, h - self.app.floor_texture.get_height())) + x += self.app.floor_texture.get_width()