from pybevy.prelude import *
from pybevy.window import WindowResolution
def setup(commands: Commands) -> None:
commands.spawn(Camera2d())
print("Window opened with custom configuration!")
print("- Title: 'PyBevy - Window Configuration Example'")
print("- Size: 1024x768")
print("- Resizable: Yes")
print("- Decorations: Yes")
@entrypoint
def main(app: App) -> App:
window = Window(
title="PyBevy - Window Configuration Example", resolution=WindowResolution(1024, 768), decorations=True, resizable=True, transparent=False, )
return (
app.add_plugins(DefaultPlugins().set(WindowPlugin(primary_window=window)))
.add_systems(Startup, setup)
)
if __name__ == "__main__":
main().run()