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
דור שפירא dead4cfcb5 adding the shapes_logo_raylib example.
adding the missing press checks in the core_input_mouse example:
I added the missing MOUSE_BUTTON_SIDE,MOUSE_BUTTON_EXTRA,MOUSE_BUTTON_FORWARD,MOUSE_BUTTON_BACK press checks.

note: my mouse doesn't have the "forward" and "back" buttons, so I couldn't test if they work
2022-07-30 09:20:26 +03:00

43 lines
1.2 KiB
Python

"""
raylib [core] example - Logo Raylib
"""
from pyray import *
from raylib.colors import (
RAYWHITE,
BLACK,
GRAY
)
# 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