misc cleanup (especially in modal dialogs)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3621 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
72ef6843ad
commit
bfa5b18f24
@ -14,9 +14,9 @@
|
|||||||
<list id="players" proportion="5" width="75%" align="center"/>
|
<list id="players" proportion="5" width="75%" align="center"/>
|
||||||
<spacer width="20" height="25"/>
|
<spacer width="20" height="25"/>
|
||||||
|
|
||||||
<button id="addplayer" x="20" width="35%" height="30" text="Add Player" />
|
<button id="addplayer" x="20" width="35%" height="30" text="Add Player" align="center"/>
|
||||||
<spacer width="50" height="10" />
|
<spacer width="50" height="10" />
|
||||||
<button id="rempayer" x="20" width="35%" height="30" text="Remove Player" />
|
<button id="rempayer" x="20" width="35%" height="30" text="Remove Player" align="center"/>
|
||||||
|
|
||||||
<spacer width="20" height="15"/>
|
<spacer width="20" height="15"/>
|
||||||
</box>
|
</box>
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
// $Id$
|
|
||||||
//
|
|
||||||
// SuperTuxKart - a fun racing game with go-kart
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
// Copyright (C) 2006 Joerg Henrichs
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU General Public License
|
// modify it under the terms of the GNU General Public License
|
||||||
@ -17,6 +15,7 @@
|
|||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#include "gui/credits.hpp"
|
#include "gui/credits.hpp"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#ifndef HEADER_CREDITS_HPP
|
#ifndef HEADER_CREDITS_HPP
|
||||||
#define HEADER_CREDITS_HPP
|
#define HEADER_CREDITS_HPP
|
||||||
|
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#include "gui/engine.hpp"
|
#include "gui/engine.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
+---------+
|
+---------+
|
||||||
+ Widgets +
|
+ Widgets +
|
||||||
|
69
src/gui/modaldialog.cpp
Normal file
69
src/gui/modaldialog.cpp
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
#include "gui/engine.hpp"
|
||||||
|
#include "gui/modaldialog.hpp"
|
||||||
|
#include "utils/translation.hpp"
|
||||||
|
|
||||||
|
using namespace irr;
|
||||||
|
|
||||||
|
// global instance of the current dialog if any
|
||||||
|
static ModalDialog* modalWindow = NULL;
|
||||||
|
|
||||||
|
ModalDialog::~ModalDialog()
|
||||||
|
{
|
||||||
|
m_irrlicht_window->remove();
|
||||||
|
|
||||||
|
if(modalWindow == this) modalWindow = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModalDialog::dismiss()
|
||||||
|
{
|
||||||
|
if(modalWindow != NULL) delete modalWindow;
|
||||||
|
modalWindow = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModalDialog::ModalDialog(const float percentWidth, const float percentHeight)
|
||||||
|
{
|
||||||
|
const core::dimension2d<s32>& frame_size = GUIEngine::getDriver()->getCurrentRenderTargetSize();
|
||||||
|
const int w = (int)(frame_size.Width*percentWidth);
|
||||||
|
const int h = (int)(frame_size.Height*percentHeight);
|
||||||
|
m_area = core::rect< s32 >( position2d< s32 >(frame_size.Width/2 - w/2, frame_size.Height/2 - h/2),
|
||||||
|
dimension2d< s32 >(w, h) );
|
||||||
|
m_irrlicht_window = GUIEngine::getGUIEnv()->addWindow ( m_area, true /* modal */ );
|
||||||
|
|
||||||
|
if(modalWindow != NULL) delete modalWindow;
|
||||||
|
modalWindow = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
PressAKeyDialog::PressAKeyDialog(const float w, const float h) :
|
||||||
|
ModalDialog(w, h)
|
||||||
|
{
|
||||||
|
core::rect< s32 > area2(0, 0, m_area.getWidth(), m_area.getHeight());
|
||||||
|
GUIEngine::getGUIEnv()->addButton( area2, m_irrlicht_window, -1, stringw(_("Press a key")).c_str() );
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
EnterPlayerNameDialog::EnterPlayerNameDialog(const float w, const float h) :
|
||||||
|
ModalDialog(w, h)
|
||||||
|
{
|
||||||
|
core::rect< s32 > area2(0, 0, m_area.getWidth(), m_area.getHeight());
|
||||||
|
GUIEngine::getGUIEnv()->addButton( area2, m_irrlicht_window, -1, stringw(_("Enter the new player's name")).c_str() );
|
||||||
|
}
|
59
src/gui/modaldialog.hpp
Normal file
59
src/gui/modaldialog.hpp
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
#include "irrlicht.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class, derive your own.
|
||||||
|
* Only once instance at a time (if you create a 2nd the first will be destroyed).
|
||||||
|
* You can call static function 'dismiss' to simply close current dialog (so you don't
|
||||||
|
* need to keep track of instances yourself)
|
||||||
|
*/
|
||||||
|
class ModalDialog
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
irr::gui::IGUIWindow* m_irrlicht_window;
|
||||||
|
core::rect< s32 > m_area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a modal dialog with given percentage of screen width and height
|
||||||
|
*/
|
||||||
|
ModalDialog(const float percentWidth, const float percentHeight);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~ModalDialog();
|
||||||
|
|
||||||
|
static void dismiss();
|
||||||
|
};
|
||||||
|
|
||||||
|
class PressAKeyDialog : public ModalDialog
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Creates a modal dialog with given percentage of screen width and height
|
||||||
|
*/
|
||||||
|
PressAKeyDialog(const float percentWidth, const float percentHeight);
|
||||||
|
};
|
||||||
|
|
||||||
|
class EnterPlayerNameDialog : public ModalDialog
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Creates a modal dialog with given percentage of screen width and height
|
||||||
|
*/
|
||||||
|
EnterPlayerNameDialog(const float percentWidth, const float percentHeight);
|
||||||
|
};
|
@ -1,7 +1,26 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#include "gui/options_screen.hpp"
|
#include "gui/options_screen.hpp"
|
||||||
#include "gui/engine.hpp"
|
#include "gui/engine.hpp"
|
||||||
#include "gui/widget.hpp"
|
#include "gui/modaldialog.hpp"
|
||||||
#include "gui/screen.hpp"
|
#include "gui/screen.hpp"
|
||||||
|
#include "gui/widget.hpp"
|
||||||
#include "audio/sound_manager.hpp"
|
#include "audio/sound_manager.hpp"
|
||||||
#include "audio/sfx_manager.hpp"
|
#include "audio/sfx_manager.hpp"
|
||||||
#include "audio/sfx_base.hpp"
|
#include "audio/sfx_base.hpp"
|
||||||
@ -353,7 +372,7 @@ namespace StateManager
|
|||||||
assert( devices != NULL );
|
assert( devices != NULL );
|
||||||
std::cout << "-------\nentering sensing mode for " << devices->getSelectionIDString().c_str() << std::endl;
|
std::cout << "-------\nentering sensing mode for " << devices->getSelectionIDString().c_str() << std::endl;
|
||||||
|
|
||||||
getCurrentScreen()->showModalDialog();
|
new PressAKeyDialog(0.4f, 0.4f);
|
||||||
|
|
||||||
if(devices->getSelectionIDString() == "keyboard")
|
if(devices->getSelectionIDString() == "keyboard")
|
||||||
{
|
{
|
||||||
@ -445,7 +464,7 @@ namespace StateManager
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
getCurrentScreen()->dismissModalDialog();
|
ModalDialog::dismiss();
|
||||||
input_manager->setMode(InputManager::MENU);
|
input_manager->setMode(InputManager::MENU);
|
||||||
|
|
||||||
// re-select the previous button
|
// re-select the previous button
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#ifndef __HEADER_OPTIONS_SCREEN_HPP__
|
#ifndef __HEADER_OPTIONS_SCREEN_HPP__
|
||||||
#define __HEADER_OPTIONS_SCREEN_HPP__
|
#define __HEADER_OPTIONS_SCREEN_HPP__
|
||||||
|
|
||||||
|
@ -1,16 +1,35 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "irrlicht.h"
|
#include "irrlicht.h"
|
||||||
#include "utils/translation.hpp"
|
|
||||||
|
|
||||||
#include "gui/screen.hpp"
|
|
||||||
#include "gui/engine.hpp"
|
|
||||||
#include "gui/widget.hpp"
|
|
||||||
#include "gui/state_manager.hpp"
|
|
||||||
#include "io/file_manager.hpp"
|
|
||||||
#include "input/input.hpp"
|
#include "input/input.hpp"
|
||||||
|
#include "io/file_manager.hpp"
|
||||||
|
#include "gui/engine.hpp"
|
||||||
|
#include "gui/modaldialog.hpp"
|
||||||
|
#include "gui/screen.hpp"
|
||||||
|
#include "gui/state_manager.hpp"
|
||||||
|
#include "gui/widget.hpp"
|
||||||
|
#include "utils/translation.hpp"
|
||||||
|
|
||||||
using namespace irr;
|
using namespace irr;
|
||||||
|
|
||||||
@ -260,28 +279,6 @@ void Screen::addWidgetsRecursively(ptr_vector<Widget>& widgets, Widget* parent)
|
|||||||
} // next widget
|
} // next widget
|
||||||
|
|
||||||
}
|
}
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
//ok, global is not nice... but in the end there will only ever be maximum 1 dialog at a time
|
|
||||||
static IGUIWindow* modalWindow = NULL;
|
|
||||||
|
|
||||||
void Screen::showModalDialog()
|
|
||||||
{
|
|
||||||
const core::dimension2d<s32>& frame_size = GUIEngine::getDriver()->getCurrentRenderTargetSize();
|
|
||||||
const int w = (int)(frame_size.Width*0.4f);
|
|
||||||
const int h = (int)(frame_size.Height*0.4f);
|
|
||||||
core::rect< s32 > area( position2d< s32 >(frame_size.Width/2 - w/2, frame_size.Height/2 - h/2),
|
|
||||||
dimension2d< s32 >(w, h) );
|
|
||||||
|
|
||||||
modalWindow = GUIEngine::getGUIEnv()->addWindow ( area, true /* modal */ );
|
|
||||||
|
|
||||||
core::rect< s32 > area2(0, 0, w, h);
|
|
||||||
GUIEngine::getGUIEnv()->addButton( area2, modalWindow, -1, stringw(_("Press a key")).c_str() );
|
|
||||||
}
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
void Screen::dismissModalDialog()
|
|
||||||
{
|
|
||||||
modalWindow->remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
@ -530,6 +527,7 @@ void Screen::processAction(const int action, const unsigned int value, Input::In
|
|||||||
|
|
||||||
case PA_BRAKE:
|
case PA_BRAKE:
|
||||||
{
|
{
|
||||||
|
std::cerr << "brake\n";
|
||||||
IGUIElement *el, *first = NULL, *closest = NULL;
|
IGUIElement *el, *first = NULL, *closest = NULL;
|
||||||
el = GUIEngine::getGUIEnv()->getFocus();
|
el = GUIEngine::getGUIEnv()->getFocus();
|
||||||
|
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#ifndef HEADER_SCREEN_HPP
|
#ifndef HEADER_SCREEN_HPP
|
||||||
#define HEADER_SCREEN_HPP
|
#define HEADER_SCREEN_HPP
|
||||||
|
|
||||||
@ -64,9 +82,6 @@ namespace GUIEngine
|
|||||||
void addWidgets();
|
void addWidgets();
|
||||||
void calculateLayout();
|
void calculateLayout();
|
||||||
|
|
||||||
void showModalDialog();
|
|
||||||
void dismissModalDialog();
|
|
||||||
|
|
||||||
const std::string& getName() const { return m_filename; }
|
const std::string& getName() const { return m_filename; }
|
||||||
|
|
||||||
void elementsWereDeleted(ptr_vector<Widget>* within_vector = NULL);
|
void elementsWereDeleted(ptr_vector<Widget>* within_vector = NULL);
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#include "gui/screen.hpp"
|
#include "gui/screen.hpp"
|
||||||
#include "gui/engine.hpp"
|
#include "gui/engine.hpp"
|
||||||
#include "gui/widget.hpp"
|
#include "gui/widget.hpp"
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#include "gui/skin.hpp"
|
#include "gui/skin.hpp"
|
||||||
#include "gui/engine.hpp"
|
#include "gui/engine.hpp"
|
||||||
#include "gui/screen.hpp"
|
#include "gui/screen.hpp"
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#ifndef HEADER_SKIN_HPP
|
#ifndef HEADER_SKIN_HPP
|
||||||
#define HEADER_SKIN_HPP
|
#define HEADER_SKIN_HPP
|
||||||
|
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#include "gui/state_manager.hpp"
|
#include "gui/state_manager.hpp"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -8,6 +26,7 @@
|
|||||||
#include "graphics/irr_driver.hpp"
|
#include "graphics/irr_driver.hpp"
|
||||||
#include "gui/credits.hpp"
|
#include "gui/credits.hpp"
|
||||||
#include "gui/engine.hpp"
|
#include "gui/engine.hpp"
|
||||||
|
#include "gui/modaldialog.hpp"
|
||||||
#include "gui/options_screen.hpp"
|
#include "gui/options_screen.hpp"
|
||||||
#include "gui/screen.hpp"
|
#include "gui/screen.hpp"
|
||||||
#include "gui/widget.hpp"
|
#include "gui/widget.hpp"
|
||||||
@ -412,7 +431,7 @@ namespace StateManager
|
|||||||
if(input_manager->isInMode(InputManager::INPUT_SENSE_KEYBOARD) ||
|
if(input_manager->isInMode(InputManager::INPUT_SENSE_KEYBOARD) ||
|
||||||
input_manager->isInMode(InputManager::INPUT_SENSE_GAMEPAD) )
|
input_manager->isInMode(InputManager::INPUT_SENSE_GAMEPAD) )
|
||||||
{
|
{
|
||||||
getCurrentScreen()->dismissModalDialog();
|
ModalDialog::dismiss();
|
||||||
input_manager->setMode(InputManager::MENU);
|
input_manager->setMode(InputManager::MENU);
|
||||||
}
|
}
|
||||||
else if(g_game_mode)
|
else if(g_game_mode)
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#ifndef STATE_MANAGER_HPP
|
#ifndef STATE_MANAGER_HPP
|
||||||
#define STATE_MANAGER_HPP
|
#define STATE_MANAGER_HPP
|
||||||
|
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#include "gui/screen.hpp"
|
#include "gui/screen.hpp"
|
||||||
#include "gui/engine.hpp"
|
#include "gui/engine.hpp"
|
||||||
#include "gui/my_button.hpp"
|
#include "gui/my_button.hpp"
|
||||||
|
@ -1,3 +1,21 @@
|
|||||||
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
|
// Copyright (C) 2009 Marianne Gagnon
|
||||||
|
//
|
||||||
|
// This program is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 3
|
||||||
|
// of the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
#ifndef HEADER_WIDGET_HPP
|
#ifndef HEADER_WIDGET_HPP
|
||||||
#define HEADER_WIDGET_HPP
|
#define HEADER_WIDGET_HPP
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
9540E24F0FD5F8A8002985B8 /* explosion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9540E2490FD5F8A8002985B8 /* explosion.cpp */; };
|
9540E24F0FD5F8A8002985B8 /* explosion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9540E2490FD5F8A8002985B8 /* explosion.cpp */; };
|
||||||
9540E2500FD5F8A8002985B8 /* material_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9540E24B0FD5F8A8002985B8 /* material_manager.cpp */; };
|
9540E2500FD5F8A8002985B8 /* material_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9540E24B0FD5F8A8002985B8 /* material_manager.cpp */; };
|
||||||
9540E2510FD5F8A8002985B8 /* material.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9540E24D0FD5F8A8002985B8 /* material.cpp */; };
|
9540E2510FD5F8A8002985B8 /* material.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9540E24D0FD5F8A8002985B8 /* material.cpp */; };
|
||||||
|
954A57DC0FEC5AE40073C16C /* modaldialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 954A57DB0FEC5AE40073C16C /* modaldialog.cpp */; };
|
||||||
9551C8270FC1B72500DB481B /* music_information.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C2AC280F296540000D3E5D /* music_information.cpp */; };
|
9551C8270FC1B72500DB481B /* music_information.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C2AC280F296540000D3E5D /* music_information.cpp */; };
|
||||||
9551C8280FC1B72500DB481B /* music_ogg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C2AC2A0F296540000D3E5D /* music_ogg.cpp */; };
|
9551C8280FC1B72500DB481B /* music_ogg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C2AC2A0F296540000D3E5D /* music_ogg.cpp */; };
|
||||||
9551C8290FC1B72500DB481B /* sfx_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C2AC2D0F296540000D3E5D /* sfx_manager.cpp */; };
|
9551C8290FC1B72500DB481B /* sfx_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95C2AC2D0F296540000D3E5D /* sfx_manager.cpp */; };
|
||||||
@ -336,6 +337,8 @@
|
|||||||
9540E24E0FD5F8A8002985B8 /* material.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = material.hpp; path = ../../graphics/material.hpp; sourceTree = SOURCE_ROOT; };
|
9540E24E0FD5F8A8002985B8 /* material.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = material.hpp; path = ../../graphics/material.hpp; sourceTree = SOURCE_ROOT; };
|
||||||
9540E2560FD5F8FD002985B8 /* ptr_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ptr_vector.hpp; path = ../../utils/ptr_vector.hpp; sourceTree = SOURCE_ROOT; };
|
9540E2560FD5F8FD002985B8 /* ptr_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ptr_vector.hpp; path = ../../utils/ptr_vector.hpp; sourceTree = SOURCE_ROOT; };
|
||||||
9540E2570FD5F8FD002985B8 /* no_copy.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = no_copy.hpp; path = ../../utils/no_copy.hpp; sourceTree = SOURCE_ROOT; };
|
9540E2570FD5F8FD002985B8 /* no_copy.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = no_copy.hpp; path = ../../utils/no_copy.hpp; sourceTree = SOURCE_ROOT; };
|
||||||
|
954A57DB0FEC5AE40073C16C /* modaldialog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = modaldialog.cpp; path = games/supertuxkart/src/gui/modaldialog.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
|
||||||
|
954A57ED0FEC5BB00073C16C /* modaldialog.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = modaldialog.hpp; path = games/supertuxkart/src/gui/modaldialog.hpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
|
||||||
9551C7F80FC1B63C00DB481B /* libintl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libintl.framework; path = /Library/Frameworks/libintl.framework; sourceTree = "<absolute>"; };
|
9551C7F80FC1B63C00DB481B /* libintl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libintl.framework; path = /Library/Frameworks/libintl.framework; sourceTree = "<absolute>"; };
|
||||||
9551C7F90FC1B63C00DB481B /* Ogg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Ogg.framework; path = /Library/Frameworks/Ogg.framework; sourceTree = "<absolute>"; };
|
9551C7F90FC1B63C00DB481B /* Ogg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Ogg.framework; path = /Library/Frameworks/Ogg.framework; sourceTree = "<absolute>"; };
|
||||||
9551C7FA0FC1B63C00DB481B /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = /Library/Frameworks/OpenAL.framework; sourceTree = "<absolute>"; };
|
9551C7FA0FC1B63C00DB481B /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = /Library/Frameworks/OpenAL.framework; sourceTree = "<absolute>"; };
|
||||||
@ -990,10 +993,12 @@
|
|||||||
951C35BD0FC066ED00A48379 /* credits.hpp */,
|
951C35BD0FC066ED00A48379 /* credits.hpp */,
|
||||||
9505577A0F696A900056E88C /* engine.cpp */,
|
9505577A0F696A900056E88C /* engine.cpp */,
|
||||||
9505577B0F696A900056E88C /* engine.hpp */,
|
9505577B0F696A900056E88C /* engine.hpp */,
|
||||||
9505577C0F696A900056E88C /* my_button.cpp */,
|
|
||||||
9505577D0F696A900056E88C /* my_button.hpp */,
|
|
||||||
95C1E3FF0F699427005D33E6 /* font.cpp */,
|
95C1E3FF0F699427005D33E6 /* font.cpp */,
|
||||||
95C1E4020F69943D005D33E6 /* font.hpp */,
|
95C1E4020F69943D005D33E6 /* font.hpp */,
|
||||||
|
954A57DB0FEC5AE40073C16C /* modaldialog.cpp */,
|
||||||
|
954A57ED0FEC5BB00073C16C /* modaldialog.hpp */,
|
||||||
|
9505577C0F696A900056E88C /* my_button.cpp */,
|
||||||
|
9505577D0F696A900056E88C /* my_button.hpp */,
|
||||||
95D1F6180FC8CDBB00FF6968 /* options_screen.cpp */,
|
95D1F6180FC8CDBB00FF6968 /* options_screen.cpp */,
|
||||||
95D1F6170FC8CDBB00FF6968 /* options_screen.hpp */,
|
95D1F6170FC8CDBB00FF6968 /* options_screen.hpp */,
|
||||||
95C1E3F10F699079005D33E6 /* race_gui.cpp */,
|
95C1E3F10F699079005D33E6 /* race_gui.cpp */,
|
||||||
@ -2270,6 +2275,7 @@
|
|||||||
95D950D20FE473CA002E10AD /* stk_config.cpp in Sources */,
|
95D950D20FE473CA002E10AD /* stk_config.cpp in Sources */,
|
||||||
95D950D30FE473CA002E10AD /* user_config.cpp in Sources */,
|
95D950D30FE473CA002E10AD /* user_config.cpp in Sources */,
|
||||||
95D950DB0FE4741D002E10AD /* water_splash.cpp in Sources */,
|
95D950DB0FE4741D002E10AD /* water_splash.cpp in Sources */,
|
||||||
|
954A57DC0FEC5AE40073C16C /* modaldialog.cpp in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user