Hello,
I'm making a menu class, that inherits from sf::Drawable. So that I can simply draw it.
Menu.h
#ifndef _MENU_H_
#define _MENU_H_
#include <SFML/Graphics.hpp>
class menu : public sf::Drawable
{
private:
sf::Image buttonImage;
sf::Image menuBackgroundImage;
sf::Sprite buttonSprite;
sf::Sprite menuBackgroundSprite;
public:
//constructor
menu();
void pauseMenu();
};
#endif
And in main I just make an instance of a menu, then I get this error;
Error:
main.cpp: In function ‘int main()’:
main.cpp:8:8: error: cannot declare variable ‘myMenu’ to be of abstract type ‘menu’
menu.h:7:1: note: because the following virtual functions are pure within ‘menu’:
/usr/include/SFML/Graphics/Drawable.hpp:503:18: note: virtual void sf::Drawable::Render(sf::RenderTarget&, sf::Renderer&) const
Can you give me some help, or tell me another way how I should make the menu? Maybe a button class or something?
Thanks, and sorry for my bad english;]