git repos / blockattack-game

blame: source/code/ScoresDisplay.hpp

normal view · raw

c3b697c6 sago007 2016-02-07 17:30 1
/*
7a956470 sago007 2016-02-14 17:09 2
===========================================================================
7a956470 sago007 2016-02-14 17:09 3
blockattack - Block Attack - Rise of the Blocks
7a956470 sago007 2016-02-14 17:09 4
Copyright (C) 2005-2016 Poul Sander
7a956470 sago007 2016-02-14 17:09 5
7a956470 sago007 2016-02-14 17:09 6
This program is free software: you can redistribute it and/or modify
7a956470 sago007 2016-02-14 17:09 7
it under the terms of the GNU General Public License as published by
7a956470 sago007 2016-02-14 17:09 8
the Free Software Foundation, either version 2 of the License, or
7a956470 sago007 2016-02-14 17:09 9
(at your option) any later version.
7a956470 sago007 2016-02-14 17:09 10
7a956470 sago007 2016-02-14 17:09 11
This program is distributed in the hope that it will be useful,
7a956470 sago007 2016-02-14 17:09 12
but WITHOUT ANY WARRANTY; without even the implied warranty of
7a956470 sago007 2016-02-14 17:09 13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7a956470 sago007 2016-02-14 17:09 14
GNU General Public License for more details.
7a956470 sago007 2016-02-14 17:09 15
7a956470 sago007 2016-02-14 17:09 16
You should have received a copy of the GNU General Public License
7a956470 sago007 2016-02-14 17:09 17
along with this program.  If not, see http://www.gnu.org/licenses/
7a956470 sago007 2016-02-14 17:09 18
7a956470 sago007 2016-02-14 17:09 19
Source information and contacts persons can be found at
7a956470 sago007 2016-02-14 17:09 20
http://www.blockattack.net
7a956470 sago007 2016-02-14 17:09 21
===========================================================================
7a956470 sago007 2016-02-14 17:09 22
*/
c3b697c6 sago007 2016-02-07 17:30 23
c3b697c6 sago007 2016-02-07 17:30 24
#ifndef SCORESDISPLAY_HPP
c3b697c6 sago007 2016-02-07 17:30 25
#define SCORESDISPLAY_HPP
c3b697c6 sago007 2016-02-07 17:30 26
c3b697c6 sago007 2016-02-07 17:30 27
#include "sago/GameStateInterface.hpp"
c3b697c6 sago007 2016-02-07 17:30 28
c3b697c6 sago007 2016-02-07 17:30 29
class ScoresDisplay : public sago::GameStateInterface {
c3b697c6 sago007 2016-02-07 17:30 30
public:
c3b697c6 sago007 2016-02-07 17:30 31
	ScoresDisplay();
c3b697c6 sago007 2016-02-07 17:30 32
	ScoresDisplay(const ScoresDisplay& orig) = delete;
c3b697c6 sago007 2016-02-07 17:30 33
	virtual ~ScoresDisplay();
c3b697c6 sago007 2016-02-07 17:30 34
	
c3b697c6 sago007 2016-02-07 17:30 35
	bool IsActive() override;
c3b697c6 sago007 2016-02-07 17:30 36
	void Draw(SDL_Renderer* target) override;
c3b697c6 sago007 2016-02-07 17:30 37
	void ProcessInput(const SDL_Event& event, bool &processed) override;
c3b697c6 sago007 2016-02-07 17:30 38
	void Update() override;
c3b697c6 sago007 2016-02-07 17:30 39
	
c3b697c6 sago007 2016-02-07 17:30 40
	int page = 0;
c3b697c6 sago007 2016-02-07 17:30 41
	//button coodinates:
c3b697c6 sago007 2016-02-07 17:30 42
	int scoreX = 0;
c3b697c6 sago007 2016-02-07 17:30 43
	int scoreY = 0;
c3b697c6 sago007 2016-02-07 17:30 44
	int buttonXsize = 0;
c3b697c6 sago007 2016-02-07 17:30 45
	int buttonYsize = 0;
6e6e44b7 sago007 2016-10-18 15:30 46
	int mousex = 0;
6e6e44b7 sago007 2016-10-18 15:30 47
	int mousey = 0;
c3b697c6 sago007 2016-02-07 17:30 48
private:
c3b697c6 sago007 2016-02-07 17:30 49
	void DrawHighscores(int x, int y, bool endless);
c3b697c6 sago007 2016-02-07 17:30 50
	void DrawStats();
13476fc2 sago007 2016-09-28 18:34 51
	void DrawBackgroundAndCalcPlacements();
c3b697c6 sago007 2016-02-07 17:30 52
	bool isActive = true;
c3b697c6 sago007 2016-02-07 17:30 53
	bool bMouseUp = false;
13476fc2 sago007 2016-09-28 18:34 54
	int backX = 20;
13476fc2 sago007 2016-09-28 18:34 55
	int backY = 0;
13476fc2 sago007 2016-09-28 18:34 56
	int nextX = 0;
13476fc2 sago007 2016-09-28 18:34 57
	int nextY = 0;
c3b697c6 sago007 2016-02-07 17:30 58
};
c3b697c6 sago007 2016-02-07 17:30 59
c3b697c6 sago007 2016-02-07 17:30 60
#endif /* SCORESDISPLAY_HPP */
c3b697c6 sago007 2016-02-07 17:30 61
1970-01-01 00:00 62