1. Why is int totalCandidates; public?
2. Most of the stuff in Global.h should be read from a data file, or failing that, a std::string array in main.cpp. #defines are ugly in C++.
All the other #defines should be like const int ScreenWidth = 1024;
3. main is nearly 1000 lines long - awful.
4. Indentation != scope
Code:
if(voteKeyFont.loadFromFile("monospa1.ttf"))
voteKey.setFont(voteKeyFont);
voteKey.setColor(sf::Color::Red);
voteKey.setPosition(67,574);
InstructText.setFont(voteKeyFont);
InstructText.setColor(sf::Color::White);
InstructText.setPosition(70,556);
Despite the indentation, it's only the first line which is controlled by the if statement.
5. Use arrays or vectors.
bool b4(false) ; bool b5(false) ; bool b6(false) ; bool b7(false) ; bool b8(false) ;
...
int voteCounts_boyPrez_nameA = 0;
int voteCounts_boyPrez_nameB = 0;
When you start adding suffixes to variables like foo1, foo2, foo3 or barA, barB, barC, then it's a sure sign
you should be using an indexed container of some sort.
It would also significantly reduce the following code to use a loop, rather than copy/pasting your way to nearly 1000 lines.
6. More on arrays
> else if (Event.type == Event.MouseButtonReleased && buttonSwitch == 4
This gets copy/pasted all the way up to
else if (Event.type == Event.MouseButtonReleased && buttonSwitch == 23
which spans nearly 400 lines of code.
If you can figure out how to factor this properly, you'll have much shorter code.
7. bool Security::checkPassword(std::string password)
What is the point of this?
You need a better way of comparing with 1500 strings!
Gave up.
I think the only thing which needs to be said is lay off the copy/paste!
As soon as you've pressed ctrl-C, you should be thinking "How to I make this a function?"
Not immediately press ctrl-V and start hacking the difference over and over again.