Closed Caresle closed 2 years ago
Hello, when i'm trying to create a Rectangle and then draw on screen, I get this error when i compile.
Here is the code i'm using.
import Raylib.Rectangle; import Raylib.Colors; import Raylib.*; class Main { static function main() { var screenWidth = 800; var screenHeight = 450; InitWindow(screenWidth, screenHeight, "Draw a rectangle"); SetTargetFPS(60); var rect = Rectangle.create(100, 100, 36, 36); while(!WindowShouldClose()) { BeginDrawing(); DrawRectangle(Std.int(rect.x), Std.int(rect.y), Std.int(rect.w), Std.int(rect.h), Colors.RED); EndDrawing(); } CloseWindow(); } }
The w and the h variables of rectangle must be replaced as they are called width and height in raylib.h. This will be fixed shortly :)
Hello, when i'm trying to create a Rectangle and then draw on screen, I get this error when i compile.
Here is the code i'm using.