<commit_before>import pygame as py
import variables as v
import menuItems
import network
import gameItems
import guiItems
import campaignAI
import sys
from renderer import *
import tween
import random
from functools import wraps
from webbrowser import open as wbopen

def boot():
    """Sets up the game and starts the mainMenu state"""
    py.init()
    network.loadMetadata()
    updateDisplay()
    v.screen = py.Surface((1280, 720))
    py.display.set_caption("Aiopa Battles")
    icon = py.image.load("assets/images/icons/icon4.png")
    py.display.set_icon(icon)
    v.clock = py.time.Clock()
    py.key.set_repeat(200, 70)
    v.state = logo if not v.debug else login
    while True:
        change(py.Rect(0, 0, 1280, 720))
        v.state()
    

def mainMenu():
    """The main menu state"""
    buttons = py.sprite.Group()
    if v.loggedIn: 
        buttons.add(menuItems.Button("Play Online", (640, 400), 80, (0, 100, 150), (20, 50, 100), "assets/fonts/Galdeano.ttf", "play", centred=True, bsize=(400, 100)))
        buttons.add(menuItems.Button("Account", (745, 630), 50, (0, 100, 150), (20, 50, 100), "assets/fonts/Galdeano.ttf", "account", centred=True, bsize=(190, 80)))
    else:
        buttons.add(menuItems.Button("Play Online", (640, 400), 80, (100, 100, 100), (100, 100, 100), "assets/fonts/Galdeano.ttf", "-play", centred=True, bsize=(400, 100)))
        buttons.add(menuItems.Button("Account", (745, 630), 50, (100, 100, 100), (100, 100, 100), "assets/fonts/Galdeano.ttf", "-account", centred=True, bsize=(190, 80)))<commit_msg>Fixed weird scaling issues on high dpi displays<commit_after>import pygame as py
import variables as v
import menuItems
import network
import gameItems
import guiItems
import campaignAI
import sys
from renderer import *
import tween
import random
from functools import wraps
from webbrowser import open as wbopen
import ctypes

def boot():
    """Sets up the game and starts the mainMenu state"""
    user32 = ctypes.windll.user32
    user32.SetProcessDPIAware()
    py.init()
    network.loadMetadata()
    updateDisplay()
    v.screen = py.Surface((1280, 720))
    py.display.set_caption("Aiopa Battles")
    icon = py.image.load("assets/images/icons/icon4.png")
    py.display.set_icon(icon)
    v.clock = py.time.Clock()
    py.key.set_repeat(200, 70)
    v.state = logo if not v.debug else login
    while True:
        change(py.Rect(0, 0, 1280, 720))
        v.state()
    

def mainMenu():
    """The main menu state"""
    buttons = py.sprite.Group()
    if v.loggedIn: 
        buttons.add(menuItems.Button("Play Online", (640, 400), 80, (0, 100, 150), (20, 50, 100), "assets/fonts/Galdeano.ttf", "play", centred=True, bsize=(400, 100)))
        buttons.add(menuItems.Button("Account", (745, 630), 50, (0, 100, 150), (20, 50, 100), "assets/fonts/Galdeano.ttf", "account", centred=True, bsize=(190, 80)))
    else:
        buttons.add(menuItems.Button("Play Online", (640, 400), 80, (100, 100, 100), (100, 100, 100), "assets/fonts/Galdeano.ttf", "-play", centred=True, bsize=(400, 100)))
        buttons.add(menuItems.Button("Account", (745, 630), 50, (100, 100, 100), (100, 100, 100), "assets/fonts/Galdeano.ttf", "-account", centred=True, bsize=(190, 80)))
{'fraction_non_alphanumeric': 0.1577639751552795, 'fraction_numerical': 0.08881987577639752, 'mean_word_length': 3.8002980625931446, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '161048', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1088, 'n_words': 311}