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
This commit is contained in:
דור שפירא 2022-07-30 09:20:26 +03:00
parent 50e74a7e26
commit dead4cfcb5
3 changed files with 93 additions and 28 deletions

View file

@ -0,0 +1,43 @@
"""
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