Skip to content

Commit ef91af8

Browse files
fixes to examples
1 parent 7ca36d1 commit ef91af8

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

examples/core/core_input_mouse_wheel.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,14 @@
3131
# Main game loop
3232
while not pyray.window_should_close(): # Detect window close button or ESC key
3333
# Update
34-
box_position_y -= (pyray.get_mouse_wheel_move() * scroll_speed)
34+
box_position_y -= int(pyray.get_mouse_wheel_move() * scroll_speed)
3535

3636
# Draw
3737
pyray.begin_drawing()
3838

3939
pyray.clear_background(RAYWHITE)
4040

41-
# TODO
42-
# FIXME
43-
pyray.draw_rectangle(
44-
SCREEN_WIDTH // 2 - 40, box_position_y, 80, 80, MAROON)
41+
pyray.draw_rectangle(SCREEN_WIDTH // 2 - 40, box_position_y, 80, 80, MAROON)
4542

4643
pyray.draw_text('User mouse wheel to move the cube up and down!',
4744
10, 10, 20, GRAY)

examples/extra/camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def camera_test():
123123
rl.BeginMode3D(cam[0])
124124

125125
# NOTE(pebaz): For whatever reason, this can solve a percentage of artifacts
126-
rl.DrawGizmo([100000000, 100000000, 100000000])
126+
#rl.DrawGizmo([100000000, 100000000, 100000000])
127127

128128
rl.DrawGrid(32, 1)
129129

examples/extra/flow-field.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99

1010
import sys, math, time, random
11-
import glm
11+
import glm # Note package is PyGLM, not glm.
1212
from raylib import rl, ffi
1313
from raylib.colors import *
1414

@@ -28,7 +28,7 @@
2828
#rl.DisableCursor()
2929

3030
canvas = rl.LoadRenderTexture(rl.GetScreenWidth(), rl.GetScreenHeight())
31-
rl.SetTextureWrap(canvas.texture, rl.WRAP_MIRROR_REPEAT)
31+
rl.SetTextureWrap(canvas.texture, rl.TEXTURE_WRAP_MIRROR_REPEAT)
3232

3333
def random_point_in_circle(center, radius):
3434
a = random.random() * 2 * math.pi

examples/extra/transparent_undecorated_window.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
"""
2+
FIXME this example is broken with Raylib 4.0
3+
24
Requirements:
35
- raylib
46
- pytweening
57
- pyglm
8+
- screeninfo
69
710
Windows-Only Requirements:
811
- win32gui
@@ -18,7 +21,7 @@
1821
import glm
1922
import pytweening as tween
2023
import screeninfo
21-
from raylib.dynamic import raylib as rl, ffi
24+
from raylib import rl, ffi
2225
from raylib.colors import *
2326

2427

0 commit comments

Comments
 (0)