2.- Make a window

In order to access the libraries, you need to add  #include "rosemary.h"

the rosemary framework uses the namespace rm, so in order to access the classes you will need to write rm::<classs name>, remember that you can use using namespace rm in the top to avoid doing this every time.

To begin create a Screen variable, and call the SetUp function from that variable. The SetUp function needs two arguments: the width and the height.

#include "rosemary.h"

rm::Screen window;

int main (){

    window.SetUp (800 , 600);

    return 0;

}

And with this you will create a window with a width of 800 by 600 height.

There is another function called HideCursor , this function will hide the little intermittent bar.
so if we add window.HideCursor(); you will get something like this.



The function Clear will clear all the characters in the screen, it's recommended to call it at the top of the main loop.

Comments