Back to index

supertuxkart  0.5+dfsg1
config_display.hpp
Go to the documentation of this file.
00001 //  $Id: config_display.hpp 2111 2008-05-31 07:04:30Z cosmosninja $
00002 //
00003 //  SuperTuxKart - a fun racing game with go-kart
00004 //  Copyright (C) 2006 SuperTuxKart-Team
00005 //
00006 //  This program is free software; you can redistribute it and/or
00007 //  modify it under the terms of the GNU General Public License
00008 //  as published by the Free Software Foundation; either version 2
00009 //  of the License, or (at your option) any later version.
00010 //
00011 //  This program is distributed in the hope that it will be useful,
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //  GNU General Public License for more details.
00015 //
00016 //  You should have received a copy of the GNU General Public License
00017 //  along with this program; if not, write to the Free Software
00018 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020 #ifndef HEADER_CONFIGDISPLAY_H
00021 #define HEADER_CONFIGDISPLAY_H
00022 
00023 #include <vector>
00024 
00025 #include "base_gui.hpp"
00026 #include "translation.hpp"
00027 #include "display_res_confirm.hpp"
00028 
00029 class ConfigDisplay: public BaseGUI
00030 {
00031 public:
00032     ConfigDisplay();
00033     ~ConfigDisplay();
00034 
00035     void select();
00036 
00037 private:
00038     std::vector< std::pair<int,int> > m_sizes;
00039     int m_curr_res;
00040 
00041     int m_curr_width;
00042     int m_curr_height;
00043 
00044     // changeResolution() reverse param is set true when changing to a previous resolution,
00045     // thought it is disabled for now.
00046     void changeResolution(int width, int height/*, bool reverse*/);
00047     void getScreenModes();
00048     void changeApplyButton();
00049 
00050 #if 0
00051     // isBlacklisted() returns the index of the resolution in the blacklist 
00052     // or -1 if not in the blacklist
00053     int isBlacklisted(); 
00054 #endif
00055     bool isBlacklisted(int width, int height);
00056     void showBlacklistButtons();
00057 
00058     void loadDefaultModes();
00059 };
00060 
00061 #endif