Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

raylib c# basic window

using Raylib_cs;
using static Raylib_cs.Raylib;
using static Raylib_cs.Color;

namespace Examples
{
    public class core_basic_window
    {
        public static int Main()
        {
            // Initialization
            //--------------------------------------------------------------------------------------
            const int screenWidth = 800;
            const int screenHeight = 450;

            InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");

            SetTargetFPS(60);
            //--------------------------------------------------------------------------------------

            // Main game loop
            while (!WindowShouldClose())    // Detect window close button or ESC key
            {
                // Update
                //----------------------------------------------------------------------------------
                // TODO: Update your variables here
                //----------------------------------------------------------------------------------

                // Draw
                //----------------------------------------------------------------------------------
                BeginDrawing();
                ClearBackground(RAYWHITE);

                DrawText("Congrats! You created your first window!", 190, 200, 20, MAROON);

                EndDrawing();
                //----------------------------------------------------------------------------------
            }

            // De-Initialization
            //--------------------------------------------------------------------------------------
            CloseWindow();        // Close window and OpenGL context
            //--------------------------------------------------------------------------------------

            return 0;
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity audio manager 
Csharp :: how to get specific length of row in matrix c# 
Csharp :: roman to number 
Csharp :: C# add two numbers using a method 
Csharp :: c# nullable string 
Csharp :: c# see if string is int 
Csharp :: c# remove first 5 characters from string 
Csharp :: .net core copy directory to output 
Csharp :: c# convert datetime to unix timestamp 
Csharp :: c# string interpolation 
Csharp :: how to cap rigidbody velocity 
Csharp :: switch expression c# 
Csharp :: c# remove first three characters from string 
Csharp :: change column name in datatable C# 
Csharp :: c# get last day of month 
Csharp :: datetime in specific format c# 
Csharp :: how to restart flutter app programmatically 
Csharp :: how to deserialize string array in c# 
Csharp :: unity create 3d object in script 
Csharp :: check an enum containa an int or not in C# 
Csharp :: c# remove all whitespaces from string 
Csharp :: join array in c# 
Csharp :: save image in c# 
Csharp :: trygetvalue dictionary c# example 
Csharp :: if set active == false unity 
Csharp :: Write text in Word Document at specific location using C# 
Csharp :: how to evaluate code in c# 
Csharp :: returning multiple values in C# 
Csharp :: convert uint to int C# 
Csharp :: c# split string by index 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =