Skip to content

Instantly share code, notes, and snippets.

@tank-king
tank-king / custom-titlebar-pygame-ce-multiple-windows.py
Created January 26, 2024 07:02
A utility program in pygame-ce which uses custom title bars in multiple windows to prevent event queue being paused when moving windows
import asyncio
import math
import sys
import time
from functools import lru_cache
import pygame.event
import pynput.mouse
from pygame._sdl2 import video
@tank-king
tank-king / pygbag.Fetch.py
Last active January 26, 2024 06:56
A code snippet to create a convenient way of using GET and POST requests in javascript from a WASM environment for use in pygbag scripts to run pygame games on the web.
import sys
from urllib.parse import urlencode
import asyncio
import platform
import json
class Fetch:
"""
WASM compatible request handler