Skip to content

Commit

Permalink
Simplify the example code in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonsilva committed Oct 19, 2023
1 parent da24d91 commit a9a2b86
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Raylib.init_window(800, 450, 'My window')

until Raylib.window_should_close
Raylib.begin_drawing
Raylib.clear_background(Raylib::RAYWHITE)
Raylib.draw_text('Congrats! You created your first window!', 190, 200, 20, Raylib::LIGHTGRAY)
Raylib.clear_background(Raylib::WHITE)
Raylib.draw_text('Congrats! You created your first window!', 190, 200, 20, Raylib::BLACK)
Raylib.end_drawing
end

Expand All @@ -64,10 +64,12 @@ init_window(800, 450, 'My window')

until window_should_close
begin_drawing
clear_background(RAYWHITE)
draw_text('Congrats! You created your first window!', 190, 200, 20, LIGHTGRAY)
clear_background(WHITE)
draw_text('Congrats! You created your first window!', 190, 200, 20, BLACK)
end_drawing
end

close_window
```

In the code above, `require 'raylib/dsl` is a shorthand for `require 'raylib'` + `include Raylib`.
Expand Down

0 comments on commit a9a2b86

Please sign in to comment.