This repository has been archived on 2025-06-21. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
raylib-python-cffi/examples/core/core_basic_window.py
2024-02-21 11:23:55 +00:00

32 lines
717 B
Python

"""
raylib [core] example - Basic window
"""
import pyray
# Initialization
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 450
pyray.init_window(SCREEN_WIDTH, SCREEN_HEIGHT, 'raylib [core] example - basic window')
pyray.set_target_fps(60) # Set our game to run at 60 frames-per-second
# Main game loop
while not pyray.window_should_close(): # Detect window close button or ESC key
# Update
# TODO: Update your variables here
# Draw
pyray.begin_drawing()
pyray.clear_background(pyray.RAYWHITE)
pyray.draw_text(
'Congrats! You created your first window!', 190, 200, 20, pyray.LIGHTGRAY)
pyray.end_drawing()
# De-Initialization
pyray.close_window() # Close window and OpenGL context