Hi, I'm having trouble programming my own input class. Here is the basic code I'm having problems with:
class input
{
sf::RenderWindow *iApp;
sf::Input Input;
input(sf::RenderWindow *window)
{
iApp=window;
}
//////THIS FUNCTION MUST BE CALLED EVERY FRAME TO GET NEW //INPUTS
void refreshInput()
{
Input=iApp->GetInput();
}
////////////////////////////////////////////////////////////////
bool checkKey(sf::Key::Code code)
{
return Input.IsKeyDown(code);
}
void checkMouse(unsigned int *x, unsigned int *y)
{
*x=Input.GetMouseX();
*y=Input.GetMouseY();
}
bool checkMouseKey(sf::Mouse::Button button)
{
return Input.IsMouseButtonDown(button);
}
};
My compiler (code::blocks gcc) outputs this error:
..\..\..\..\..\..\..\..\SFML-1.6\include\SFML\System\NonCopyable.hpp||In member function `sf::Input& sf::Input::operator=(const sf::Input&)':|
..\..\..\..\..\..\..\..\SFML-1.6\include\SFML\System\NonCopyable.hpp|64|error: `sf::NonCopyable& sf::NonCopyable::operator=(const sf::NonCopyable&)' is private|
C:\Documents and Settings\My Documents\Development\Programming\C++\My Projects\Game Lib Testing\main.cpp|18|error: within this context|
||=== Build finished: 2 errors, 0 warnings ===|
Thanks for the help...