Commit 2d8c7db9 authored by Tošner, Jan's avatar Tošner, Jan
Browse files

v1.5

- Opravena chyba v knize
- Podpora Ubuntu a všech velikostí monitorů
parent 9580543a
......@@ -3,12 +3,14 @@ import ctypes
import os
from tkinter import Tk
from tkinter.filedialog import askopenfilename, asksaveasfilename
import platform
# Size of the screen
tk = Tk()
SCREEN_TITLE = "Map Maker"
SCREEN_WIDTH = 1920 #Change this
SCREEN_HEIGHT = 1080 #Change this
SCREEN_WIDTH = tk.winfo_screenwidth()
SCREEN_HEIGHT = tk.winfo_screenheight()
RATIO = (1920/SCREEN_WIDTH,1080/SCREEN_HEIGHT)
os.environ['SDL_VIDEO_WINDOW_POS'] = "0,0"
# Colors according to RGB codes
......@@ -19,7 +21,8 @@ MAXIMAL_ZOOM = 4.5
clock = pygame.time.Clock()
pygame.font.init()
font = pygame.font.SysFont("Sans", 75)
ctypes.windll.user32.SetProcessDPIAware()
if platform.system == "Windows":
ctypes.windll.user32.SetProcessDPIAware()
def scale(surf):
......@@ -157,10 +160,8 @@ class Game:
changed = False
picture.print(self.screen)
#self.screen.blit(self.image, (0, 0)) #Přidání rámečku
if in_book:
book.draw(self.screen)
if in_menu:
menu.draw(self.screen)
......@@ -370,7 +371,11 @@ class Book:
i = 4
else:
return -1
return 3 * i + j + self.page * 15
ret = 3 * i + j + self.page * 15
if ret < len(self.blocks):
return ret
else:
return -1
class Block:
......
896,432 32,32
tree-32x32.png 0,0,32,32
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment