1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

root/trunk/fheroes2/src/fheroes2/game/game_focus.h @ 2454

Revision 2454, 2.3 KB (checked in by afletdinov, 21 months ago)

update game::focus

Line 
1/***************************************************************************
2 *   Copyright (C) 2009 by Andrey Afletdinov <fheroes2@gmail.com>          *
3 *                                                                         *
4 *   Part of the Free Heroes2 Engine:                                      *
5 *   http://sourceforge.net/projects/fheroes2                              *
6 *                                                                         *
7 *   This program is free software; you can redistribute it and/or modify  *
8 *   it under the terms of the GNU General Public License as published by  *
9 *   the Free Software Foundation; either version 2 of the License, or     *
10 *   (at your option) any later version.                                   *
11 *                                                                         *
12 *   This program is distributed in the hope that it will be useful,       *
13 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
14 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
15 *   GNU General Public License for more details.                          *
16 *                                                                         *
17 *   You should have received a copy of the GNU General Public License     *
18 *   along with this program; if not, write to the                         *
19 *   Free Software Foundation, Inc.,                                       *
20 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
21 ***************************************************************************/
22
23#ifndef H2GAMEFOCUS_H
24#define H2GAMEFOCUS_H
25
26#include "gamedefs.h"
27#include "game.h"
28
29class Castle;
30class Heroes;
31
32namespace Game
33{
34    class Focus
35    {
36    public:
37        enum focus_t { UNSEL = 0, HEROES = 1, CASTLE = 2, FIRSTHERO = 3 };
38
39        static Focus &  Get(void);
40        static void     ResetAll(u8);
41
42        void            Set(Heroes *hr);
43        void            Set(Castle *cs);
44        void            SetRedraw(void);
45        void            Reset(u8);
46
47        void            CheckIconsPanel(void);
48
49        const Point &   Center(void) const;
50
51        u8              Type(void) const;
52
53        const Castle &  GetCastle(void) const;
54        const Heroes &  GetHeroes(void) const;
55       
56        Heroes & GetHeroes(void);
57        Castle & GetCastle(void);
58
59        Focus();
60
61    private:
62        Castle *        castle;
63        Heroes *        heroes;
64        Point           center;
65    };
66}
67
68#endif
Note: See TracBrowser for help on using the browser.