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/shapes/shapes_logo_raylib.py
2024-11-17 01:17:05 +00:00

39 lines
1.2 KiB
Python

"""
raylib [shapes] example - Logo Raylib
"""
from pyray import *
# Initialization
screenWidth = 800
screenHeight = 450
init_window(screenWidth, screenHeight, 'raylib [shapes] example - raylib logo using shapes')
set_target_fps(60) # Set our game to run at 60 frames-per-second
# Main game loop
while not window_should_close(): # Detect window close button or ESC key
# Update
# ----------------------------------------------------------------------------------
# TODO: Update your variables here
# ----------------------------------------------------------------------------------
# Draw
# ----------------------------------------------------------------------------------
begin_drawing()
clear_background(RAYWHITE)
draw_rectangle(int(screenWidth/2 - 128), int(screenHeight/2 - 128), 256, 256, BLACK)
draw_rectangle(int(screenWidth/2 - 112), int(screenHeight/2 - 112), 224, 224, RAYWHITE)
draw_text("raylib", int(screenWidth/2 - 44), int(screenHeight/2 + 48), 50, BLACK)
draw_text("this is NOT a texture!", 350, 370, 10, GRAY)
end_drawing()
# De-Initialization
close_window() # Close window and OpenGL context