December 2015
Beginner to intermediate
522 pages
11h 21m
English
Now that we have our blueprint, let's begin actually building our window class. The entry and exit points seem as good a place as any to start with:
Window::Window(){ Setup("Window", sf::Vector2u(640,480)); }
Window::Window(const std::string& l_title, const sf::Vector2u& l_size)
{
Setup(l_title,l_size);
}
Window::~Window(){ Destroy(); }Both implementations of the constructor and destructor simply utilize the helper methods which we'll be implementing shortly. There's also a default constructor that takes no arguments and initializes some pre-set default values, which is not necessary, but it's convenient. With that said, let's take a look at the setup method:
void Window::Setup(const std::string l_title, const sf::Vector2u& ...
Read now
Unlock full access