Hello.
I am bad at explaining things so i will give my best.
Required:
To have a class looking like this
class Button
{
public:
Button();
bool isPressed();
bool isReleased();
void Pressed();//
void Released();
private:
bool isKBP;//is Key Button Pressed
bool isKBR;// is key button pressed
};
And at end of each loop i want to call a function
int main()
{
while()
{
//Logic
//...
//Display
//...
//End of loop
ResetButtons();
}
}
ResetButtons(); function would have to go true each object of "Button" class and set "isKBP = false"
Any sugestions or ideas how i would acomplish this?
What i would prefear is not to thnink about "Button" class object, there are gonna be many of those all around the code.