Creating a GUI: The Basics

CGS Basics

In this tutorial, you will learn how to get started with the Cosmos Graphic Subsystem, CGS from here on.

Note

Some features may not be in the userkit, but as more userkits are released, more features will become more available. If you choose to download the developer kit however, you’ll have the bleeding edge version of Cosmos. This is also a tutorial for a C# kernel, so be aware of that. Cosmos is made in C#, but you can use other .NET languages, but for these purposes, C# will be used.

Steps
  1. First, put Canvas canvas; in the main kernel class public class Kernel : Sys.Kernel.

  1. In a public void, type in canvas = FullScreenCanvas.GetFullScreenCanvas(); Note that it can be called from any public methods, but the main BeforeRun method is used in this example.
    In the same public void, type in canvas.Clear(Color.Blue);. You can also replace the color with anything you want.

  1. In the same methods, or after the canvas has been initialized, you can start playing around with methods inside of the CGS. Here’s a working example you can use of CGS. Make a new operating system and replace your Kernel.cs with the following code:

Happy creating!