Renamed CGUIFont.{h,cpp} to scalable_font.{hc}pp, removed all
references to CGUIFont (so that the new mono-space-digits functions can be used everywhere); some code cleanup. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5700 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
7557d4be8b
commit
2ad6b0a027
@ -77,8 +77,6 @@ supertuxkart_SOURCES = \
|
|||||||
graphics/stars.hpp \
|
graphics/stars.hpp \
|
||||||
graphics/water_splash.hpp \
|
graphics/water_splash.hpp \
|
||||||
graphics/water_splash.cpp \
|
graphics/water_splash.cpp \
|
||||||
guiengine/CGUIFont.cpp \
|
|
||||||
guiengine/CGUIFont.h \
|
|
||||||
guiengine/CGUISpriteBank.cpp \
|
guiengine/CGUISpriteBank.cpp \
|
||||||
guiengine/CGUISpriteBank.h \
|
guiengine/CGUISpriteBank.h \
|
||||||
guiengine/abstract_state_manager.cpp \
|
guiengine/abstract_state_manager.cpp \
|
||||||
@ -89,6 +87,8 @@ supertuxkart_SOURCES = \
|
|||||||
guiengine/event_handler.hpp \
|
guiengine/event_handler.hpp \
|
||||||
guiengine/modaldialog.cpp \
|
guiengine/modaldialog.cpp \
|
||||||
guiengine/modaldialog.hpp \
|
guiengine/modaldialog.hpp \
|
||||||
|
guiengine/scalable_font.cpp \
|
||||||
|
guiengine/scalable_font.hpp \
|
||||||
guiengine/screen_loader.cpp \
|
guiengine/screen_loader.cpp \
|
||||||
guiengine/screen.cpp \
|
guiengine/screen.cpp \
|
||||||
guiengine/screen.hpp \
|
guiengine/screen.hpp \
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "graphics/material_manager.hpp"
|
#include "graphics/material_manager.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
#include "guiengine/modaldialog.hpp"
|
#include "guiengine/modaldialog.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/screen.hpp"
|
#include "guiengine/screen.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "items/item_manager.hpp"
|
#include "items/item_manager.hpp"
|
||||||
|
@ -409,9 +409,9 @@
|
|||||||
|
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "input/input_manager.hpp"
|
#include "input/input_manager.hpp"
|
||||||
#include "guiengine/CGUIFont.h"
|
|
||||||
#include "guiengine/event_handler.hpp"
|
#include "guiengine/event_handler.hpp"
|
||||||
#include "guiengine/modaldialog.hpp"
|
#include "guiengine/modaldialog.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/screen.hpp"
|
#include "guiengine/screen.hpp"
|
||||||
#include "guiengine/skin.hpp"
|
#include "guiengine/skin.hpp"
|
||||||
#include "guiengine/widget.hpp"
|
#include "guiengine/widget.hpp"
|
||||||
@ -427,9 +427,9 @@ namespace GUIEngine
|
|||||||
{
|
{
|
||||||
IGUIEnvironment* g_env;
|
IGUIEnvironment* g_env;
|
||||||
Skin* g_skin = NULL;
|
Skin* g_skin = NULL;
|
||||||
IGUIFont* g_font;
|
ScalableFont* g_font;
|
||||||
IGUIFont* g_title_font;
|
ScalableFont* g_title_font;
|
||||||
IGUIFont* g_small_font;
|
ScalableFont* g_small_font;
|
||||||
|
|
||||||
IrrlichtDevice* g_device;
|
IrrlichtDevice* g_device;
|
||||||
IVideoDriver* g_driver;
|
IVideoDriver* g_driver;
|
||||||
|
@ -29,6 +29,13 @@
|
|||||||
|
|
||||||
#include "utils/constants.hpp"
|
#include "utils/constants.hpp"
|
||||||
#include "utils/ptr_vector.hpp"
|
#include "utils/ptr_vector.hpp"
|
||||||
|
namespace irr
|
||||||
|
{
|
||||||
|
namespace gui
|
||||||
|
{
|
||||||
|
class ScalableFont;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \ingroup guiengine
|
* \ingroup guiengine
|
||||||
@ -73,9 +80,9 @@ namespace GUIEngine
|
|||||||
{
|
{
|
||||||
extern irr::gui::IGUIEnvironment* g_env;
|
extern irr::gui::IGUIEnvironment* g_env;
|
||||||
extern Skin* g_skin;
|
extern Skin* g_skin;
|
||||||
extern irr::gui::IGUIFont* g_small_font;
|
extern irr::gui::ScalableFont* g_small_font;
|
||||||
extern irr::gui::IGUIFont* g_font;
|
extern irr::gui::ScalableFont* g_font;
|
||||||
extern irr::gui::IGUIFont* g_title_font;
|
extern irr::gui::ScalableFont* g_title_font;
|
||||||
|
|
||||||
extern irr::IrrlichtDevice* g_device;
|
extern irr::IrrlichtDevice* g_device;
|
||||||
extern irr::video::IVideoDriver* g_driver;
|
extern irr::video::IVideoDriver* g_driver;
|
||||||
@ -120,17 +127,17 @@ namespace GUIEngine
|
|||||||
/**
|
/**
|
||||||
* \return the smaller font (useful for less important messages)
|
* \return the smaller font (useful for less important messages)
|
||||||
*/
|
*/
|
||||||
inline irr::gui::IGUIFont* getSmallFont() { return Private::g_small_font; }
|
inline irr::gui::ScalableFont* getSmallFont() { return Private::g_small_font; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \return the "normal" font (useful for text)
|
* \return the "normal" font (useful for text)
|
||||||
*/
|
*/
|
||||||
inline irr::gui::IGUIFont* getFont() { return Private::g_font; }
|
inline irr::gui::ScalableFont* getFont() { return Private::g_font; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \return the "title" font (it's bigger and orange, useful for headers/captions)
|
* \return the "title" font (it's bigger and orange, useful for headers/captions)
|
||||||
*/
|
*/
|
||||||
inline irr::gui::IGUIFont* getTitleFont() { return Private::g_title_font; }
|
inline irr::gui::ScalableFont* getTitleFont() { return Private::g_title_font; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \return the currently shown screen, or NULL if none
|
* \return the currently shown screen, or NULL if none
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
// This file is part of the "Irrlicht Engine".
|
// This file is part of the "Irrlicht Engine".
|
||||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||||
|
|
||||||
#include "CGUIFont.h"
|
#include "guiengine/scalable_font.hpp"
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include "IGUIEnvironment.h"
|
#include "IGUIEnvironment.h"
|
||||||
#include "IXMLReader.h"
|
#include "IXMLReader.h"
|
||||||
#include "IReadFile.h"
|
#include "IReadFile.h"
|
||||||
#include "IVideoDriver.h"
|
#include "IVideoDriver.h"
|
||||||
#include "IGUISpriteBank.h"
|
#include "IGUISpriteBank.h"
|
||||||
#include <iostream>
|
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "utils/translation.hpp"
|
#include "utils/translation.hpp"
|
||||||
@ -340,19 +341,11 @@ core::dimension2d<u32> ScalableFont::getDimension(const wchar_t* text) const
|
|||||||
|
|
||||||
for (const wchar_t* p = text; *p; ++p)
|
for (const wchar_t* p = text; *p; ++p)
|
||||||
{
|
{
|
||||||
bool lineBreak=false;
|
if (*p == L'\r' || // Windows breaks
|
||||||
if (*p == L'\r') // Windows breaks
|
*p == L'\n' ) // Unix breaks
|
||||||
{
|
{
|
||||||
lineBreak = true;
|
if (*p==L'\r' && p[1] == L'\n') // Windows breaks
|
||||||
if (p[1] == L'\n') // Windows breaks
|
|
||||||
++p;
|
++p;
|
||||||
}
|
|
||||||
else if (*p == L'\n') // Unix breaks
|
|
||||||
{
|
|
||||||
lineBreak = true;
|
|
||||||
}
|
|
||||||
if (lineBreak)
|
|
||||||
{
|
|
||||||
dim.Height += thisLine.Height;
|
dim.Height += thisLine.Height;
|
||||||
if (dim.Width < thisLine.Width)
|
if (dim.Width < thisLine.Width)
|
||||||
dim.Width = thisLine.Width;
|
dim.Width = thisLine.Width;
|
||||||
@ -437,7 +430,6 @@ void ScalableFont::draw(const core::stringw& text,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool lineBreak=false;
|
|
||||||
if (c == L'\r' || // Windows breaks
|
if (c == L'\r' || // Windows breaks
|
||||||
c == L'\n' ) // Unix breaks
|
c == L'\n' ) // Unix breaks
|
||||||
{
|
{
|
@ -15,19 +15,21 @@
|
|||||||
// 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 "guiengine/skin.hpp"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include "config/user_config.hpp"
|
#include "config/user_config.hpp"
|
||||||
#include "graphics/irr_driver.hpp"
|
#include "graphics/irr_driver.hpp"
|
||||||
#include "guiengine/skin.hpp"
|
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
#include "guiengine/modaldialog.hpp"
|
#include "guiengine/modaldialog.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/screen.hpp"
|
#include "guiengine/screen.hpp"
|
||||||
#include "guiengine/widgets.hpp"
|
#include "guiengine/widgets.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
#include <cassert>
|
|
||||||
#include <stdexcept>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
using namespace GUIEngine;
|
using namespace GUIEngine;
|
||||||
using namespace irr;
|
using namespace irr;
|
||||||
|
@ -30,6 +30,7 @@ using namespace gui;
|
|||||||
|
|
||||||
#include "graphics/irr_driver.hpp"
|
#include "graphics/irr_driver.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/screen.hpp"
|
#include "guiengine/screen.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "utils/string_utils.hpp"
|
#include "utils/string_utils.hpp"
|
||||||
|
@ -15,8 +15,11 @@
|
|||||||
// 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 "guiengine/engine.hpp"
|
|
||||||
#include "guiengine/widgets/label_widget.hpp"
|
#include "guiengine/widgets/label_widget.hpp"
|
||||||
|
|
||||||
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
|
|
||||||
using namespace GUIEngine;
|
using namespace GUIEngine;
|
||||||
using namespace irr::core;
|
using namespace irr::core;
|
||||||
using namespace irr::gui;
|
using namespace irr::gui;
|
||||||
|
@ -17,17 +17,17 @@
|
|||||||
|
|
||||||
#include "guiengine/widgets/ribbon_widget.hpp"
|
#include "guiengine/widgets/ribbon_widget.hpp"
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#include "graphics/irr_driver.hpp"
|
#include "graphics/irr_driver.hpp"
|
||||||
#include "guiengine/widgets/button_widget.hpp"
|
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
|
#include "guiengine/widgets/button_widget.hpp"
|
||||||
#include "input/input_manager.hpp"
|
#include "input/input_manager.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
#include "utils/string_utils.hpp"
|
#include "utils/string_utils.hpp"
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace GUIEngine;
|
using namespace GUIEngine;
|
||||||
using namespace irr::core;
|
using namespace irr::core;
|
||||||
using namespace irr::gui;
|
using namespace irr::gui;
|
||||||
|
@ -296,10 +296,6 @@
|
|||||||
RelativePath="..\..\guiengine\abstract_state_manager.cpp"
|
RelativePath="..\..\guiengine\abstract_state_manager.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\guiengine\CGUIFont.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\guiengine\CGUISpriteBank.cpp"
|
RelativePath="..\..\guiengine\CGUISpriteBank.cpp"
|
||||||
>
|
>
|
||||||
@ -334,6 +330,10 @@
|
|||||||
RelativePath="..\..\guiengine\modaldialog.cpp"
|
RelativePath="..\..\guiengine\modaldialog.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\guiengine\scalable_font.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\guiengine\screen.cpp"
|
RelativePath="..\..\guiengine\screen.cpp"
|
||||||
>
|
>
|
||||||
@ -1092,10 +1092,6 @@
|
|||||||
RelativePath="..\..\guiengine\abstract_state_manager.hpp"
|
RelativePath="..\..\guiengine\abstract_state_manager.hpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\guiengine\CGUIFont.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\guiengine\engine.hpp"
|
RelativePath="..\..\guiengine\engine.hpp"
|
||||||
>
|
>
|
||||||
@ -1108,6 +1104,10 @@
|
|||||||
RelativePath="..\..\guiengine\modaldialog.hpp"
|
RelativePath="..\..\guiengine\modaldialog.hpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\guiengine\scalable_font.hpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\guiengine\screen.hpp"
|
RelativePath="..\..\guiengine\screen.hpp"
|
||||||
>
|
>
|
||||||
|
@ -15,10 +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 "guiengine/screen.hpp"
|
|
||||||
#include "guiengine/widget.hpp"
|
|
||||||
#include "states_screens/credits.hpp"
|
#include "states_screens/credits.hpp"
|
||||||
#include "states_screens/state_manager.hpp"
|
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
@ -28,12 +25,14 @@ using irr::core::stringc;
|
|||||||
|
|
||||||
#include "config/user_config.hpp"
|
#include "config/user_config.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
|
#include "guiengine/screen.hpp"
|
||||||
|
#include "guiengine/widget.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
|
#include "states_screens/state_manager.hpp"
|
||||||
|
|
||||||
DEFINE_SCREEN_SINGLETON( CreditsScreen );
|
DEFINE_SCREEN_SINGLETON( CreditsScreen );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace GUIEngine;
|
using namespace GUIEngine;
|
||||||
const float TIME_SECTION_FADE = 0.8f;
|
const float TIME_SECTION_FADE = 0.8f;
|
||||||
const float ENTRIES_FADE_TIME = 0.3f;
|
const float ENTRIES_FADE_TIME = 0.3f;
|
||||||
|
@ -15,14 +15,15 @@
|
|||||||
// 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 "states_screens/dialogs/add_device_dialog.hpp"
|
||||||
|
|
||||||
#include "config/player.hpp"
|
#include "config/player.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/widget.hpp"
|
#include "guiengine/widget.hpp"
|
||||||
#include "guiengine/widgets/button_widget.hpp"
|
#include "guiengine/widgets/button_widget.hpp"
|
||||||
#include "input/device_manager.hpp"
|
#include "input/device_manager.hpp"
|
||||||
#include "input/input_manager.hpp"
|
#include "input/input_manager.hpp"
|
||||||
#include "states_screens/dialogs/add_device_dialog.hpp"
|
|
||||||
#include "states_screens/options_screen_players.hpp"
|
#include "states_screens/options_screen_players.hpp"
|
||||||
#include "states_screens/options_screen_input.hpp"
|
#include "states_screens/options_screen_input.hpp"
|
||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
@ -37,7 +38,7 @@ using namespace irr::core;
|
|||||||
|
|
||||||
AddDeviceDialog::AddDeviceDialog() : ModalDialog(0.7f, 0.7f)
|
AddDeviceDialog::AddDeviceDialog() : ModalDialog(0.7f, 0.7f)
|
||||||
{
|
{
|
||||||
IGUIFont* font = GUIEngine::getFont();
|
ScalableFont* font = GUIEngine::getFont();
|
||||||
const int textHeight = GUIEngine::getFontHeight();
|
const int textHeight = GUIEngine::getFontHeight();
|
||||||
const int buttonHeight = textHeight + 10;
|
const int buttonHeight = textHeight + 10;
|
||||||
|
|
||||||
|
@ -15,14 +15,15 @@
|
|||||||
// 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 "states_screens/dialogs/confirm_resolution_dialog.hpp"
|
||||||
|
|
||||||
#include "config/player.hpp"
|
#include "config/player.hpp"
|
||||||
#include "graphics/irr_driver.hpp"
|
#include "graphics/irr_driver.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/widgets/button_widget.hpp"
|
#include "guiengine/widgets/button_widget.hpp"
|
||||||
#include "input/device_manager.hpp"
|
#include "input/device_manager.hpp"
|
||||||
#include "input/input_manager.hpp"
|
#include "input/input_manager.hpp"
|
||||||
#include "states_screens/dialogs/confirm_resolution_dialog.hpp"
|
|
||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
#include "utils/string_utils.hpp"
|
#include "utils/string_utils.hpp"
|
||||||
#include "utils/translation.hpp"
|
#include "utils/translation.hpp"
|
||||||
@ -37,7 +38,7 @@ ConfirmResolutionDialog::ConfirmResolutionDialog() : ModalDialog(0.7f, 0.7f)
|
|||||||
{
|
{
|
||||||
m_countdown_message = NULL;
|
m_countdown_message = NULL;
|
||||||
|
|
||||||
IGUIFont* font = GUIEngine::getFont();
|
ScalableFont* font = GUIEngine::getFont();
|
||||||
const int textHeight = GUIEngine::getFontHeight();
|
const int textHeight = GUIEngine::getFontHeight();
|
||||||
const int buttonHeight = textHeight + 10;
|
const int buttonHeight = textHeight + 10;
|
||||||
|
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
// 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 "states_screens/dialogs/player_info_dialog.hpp"
|
||||||
|
|
||||||
#include "config/player.hpp"
|
#include "config/player.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/widgets.hpp"
|
#include "guiengine/widgets.hpp"
|
||||||
#include "states_screens/dialogs/player_info_dialog.hpp"
|
|
||||||
#include "states_screens/options_screen_players.hpp"
|
#include "states_screens/options_screen_players.hpp"
|
||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
#include "utils/string_utils.hpp"
|
#include "utils/string_utils.hpp"
|
||||||
@ -47,7 +48,7 @@ void PlayerInfoDialog::showRegularDialog()
|
|||||||
const int y3 = m_area.getHeight()*3/6;
|
const int y3 = m_area.getHeight()*3/6;
|
||||||
const int y4 = m_area.getHeight()*5/6;
|
const int y4 = m_area.getHeight()*5/6;
|
||||||
|
|
||||||
IGUIFont* font = GUIEngine::getFont();
|
ScalableFont* font = GUIEngine::getFont();
|
||||||
const int textHeight = GUIEngine::getFontHeight();
|
const int textHeight = GUIEngine::getFontHeight();
|
||||||
const int buttonHeight = textHeight + 10;
|
const int buttonHeight = textHeight + 10;
|
||||||
|
|
||||||
|
@ -15,8 +15,11 @@
|
|||||||
// 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 "states_screens/dialogs/race_over_dialog.hpp"
|
||||||
|
|
||||||
#include "challenges/unlock_manager.hpp"
|
#include "challenges/unlock_manager.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/widgets.hpp"
|
#include "guiengine/widgets.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "input/input_manager.hpp"
|
#include "input/input_manager.hpp"
|
||||||
@ -26,7 +29,6 @@
|
|||||||
#include "modes/world.hpp"
|
#include "modes/world.hpp"
|
||||||
#include "network/network_manager.hpp"
|
#include "network/network_manager.hpp"
|
||||||
#include "race/race_manager.hpp"
|
#include "race/race_manager.hpp"
|
||||||
#include "states_screens/dialogs/race_over_dialog.hpp"
|
|
||||||
#include "states_screens/feature_unlocked.hpp"
|
#include "states_screens/feature_unlocked.hpp"
|
||||||
#include "states_screens/main_menu_screen.hpp"
|
#include "states_screens/main_menu_screen.hpp"
|
||||||
#include "states_screens/race_setup_screen.hpp"
|
#include "states_screens/race_setup_screen.hpp"
|
||||||
|
@ -17,7 +17,10 @@
|
|||||||
|
|
||||||
#include "states_screens/dialogs/race_paused_dialog.hpp"
|
#include "states_screens/dialogs/race_paused_dialog.hpp"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/widgets.hpp"
|
#include "guiengine/widgets.hpp"
|
||||||
#include "input/input_manager.hpp"
|
#include "input/input_manager.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
@ -31,7 +34,6 @@
|
|||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
#include "utils/translation.hpp"
|
#include "utils/translation.hpp"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
using namespace GUIEngine;
|
using namespace GUIEngine;
|
||||||
using namespace irr::core;
|
using namespace irr::core;
|
||||||
using namespace irr::gui;
|
using namespace irr::gui;
|
||||||
@ -43,7 +45,7 @@ RacePausedDialog::RacePausedDialog(const float percentWidth, const float percent
|
|||||||
{
|
{
|
||||||
World::getWorld()->pause(WorldStatus::IN_GAME_MENU_PHASE);
|
World::getWorld()->pause(WorldStatus::IN_GAME_MENU_PHASE);
|
||||||
|
|
||||||
IGUIFont* font = GUIEngine::getTitleFont();
|
ScalableFont* font = GUIEngine::getTitleFont();
|
||||||
const int text_height = GUIEngine::getFontHeight();
|
const int text_height = GUIEngine::getFontHeight();
|
||||||
|
|
||||||
IGUIFont* titlefont = GUIEngine::getTitleFont();
|
IGUIFont* titlefont = GUIEngine::getTitleFont();
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
|
|
||||||
#include "states_screens/feature_unlocked.hpp"
|
#include "states_screens/feature_unlocked.hpp"
|
||||||
|
|
||||||
|
#include <SColor.h>
|
||||||
|
|
||||||
#include "challenges/challenge.hpp"
|
#include "challenges/challenge.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "items/item_manager.hpp"
|
#include "items/item_manager.hpp"
|
||||||
#include "karts/kart.hpp"
|
#include "karts/kart.hpp"
|
||||||
@ -15,8 +18,6 @@
|
|||||||
#include "tracks/track_manager.hpp"
|
#include "tracks/track_manager.hpp"
|
||||||
#include "utils/translation.hpp"
|
#include "utils/translation.hpp"
|
||||||
|
|
||||||
#include <SColor.h>
|
|
||||||
|
|
||||||
using namespace irr::core;
|
using namespace irr::core;
|
||||||
using namespace irr::gui;
|
using namespace irr::gui;
|
||||||
using namespace irr::video;
|
using namespace irr::video;
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
|
|
||||||
#include "states_screens/grand_prix_lose.hpp"
|
#include "states_screens/grand_prix_lose.hpp"
|
||||||
|
|
||||||
|
#include <SColor.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include "audio/music_manager.hpp"
|
#include "audio/music_manager.hpp"
|
||||||
#include "audio/sfx_manager.hpp"
|
#include "audio/sfx_manager.hpp"
|
||||||
#include "challenges/unlock_manager.hpp"
|
#include "challenges/unlock_manager.hpp"
|
||||||
#include "graphics/irr_driver.hpp"
|
#include "graphics/irr_driver.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/widgets/label_widget.hpp"
|
#include "guiengine/widgets/label_widget.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "items/item_manager.hpp"
|
#include "items/item_manager.hpp"
|
||||||
@ -14,9 +18,6 @@
|
|||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
#include "utils/translation.hpp"
|
#include "utils/translation.hpp"
|
||||||
|
|
||||||
#include <SColor.h>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
using namespace irr::core;
|
using namespace irr::core;
|
||||||
using namespace irr::gui;
|
using namespace irr::gui;
|
||||||
using namespace irr::video;
|
using namespace irr::video;
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
|
|
||||||
#include "states_screens/grand_prix_win.hpp"
|
#include "states_screens/grand_prix_win.hpp"
|
||||||
|
|
||||||
|
#include <SColor.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include "audio/music_manager.hpp"
|
#include "audio/music_manager.hpp"
|
||||||
#include "audio/sfx_manager.hpp"
|
#include "audio/sfx_manager.hpp"
|
||||||
#include "challenges/unlock_manager.hpp"
|
#include "challenges/unlock_manager.hpp"
|
||||||
#include "graphics/irr_driver.hpp"
|
#include "graphics/irr_driver.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "guiengine/widgets/label_widget.hpp"
|
#include "guiengine/widgets/label_widget.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "items/item_manager.hpp"
|
#include "items/item_manager.hpp"
|
||||||
@ -14,9 +18,6 @@
|
|||||||
#include "states_screens/state_manager.hpp"
|
#include "states_screens/state_manager.hpp"
|
||||||
#include "utils/translation.hpp"
|
#include "utils/translation.hpp"
|
||||||
|
|
||||||
#include <SColor.h>
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
using namespace irr::core;
|
using namespace irr::core;
|
||||||
using namespace irr::gui;
|
using namespace irr::gui;
|
||||||
using namespace irr::video;
|
using namespace irr::video;
|
||||||
|
@ -30,6 +30,7 @@ using namespace irr;
|
|||||||
#include "graphics/material_manager.hpp"
|
#include "graphics/material_manager.hpp"
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
#include "guiengine/modaldialog.hpp"
|
#include "guiengine/modaldialog.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "io/file_manager.hpp"
|
#include "io/file_manager.hpp"
|
||||||
#include "input/input.hpp"
|
#include "input/input.hpp"
|
||||||
#include "input/input_manager.hpp"
|
#include "input/input_manager.hpp"
|
||||||
@ -316,7 +317,7 @@ void RaceGUI::drawGlobalTimer()
|
|||||||
pos += core::vector2d<s32>(0, UserConfigParams::m_height/2);
|
pos += core::vector2d<s32>(0, UserConfigParams::m_height/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
gui::IGUIFont* font = GUIEngine::getFont();
|
gui::ScalableFont* font = GUIEngine::getFont();
|
||||||
font->draw(sw.c_str(), pos, time_color);
|
font->draw(sw.c_str(), pos, time_color);
|
||||||
} // DRAWGLOBALTimer
|
} // DRAWGLOBALTimer
|
||||||
|
|
||||||
@ -385,7 +386,7 @@ void RaceGUI::drawGlobalPlayerIcons(const KartIconDisplayInfo* info)
|
|||||||
ICON_PLAYER_WIDTH = 35;
|
ICON_PLAYER_WIDTH = 35;
|
||||||
}
|
}
|
||||||
|
|
||||||
gui::IGUIFont* font = GUIEngine::getFont();
|
gui::ScalableFont* font = GUIEngine::getFont();
|
||||||
World *world = World::getWorld();
|
World *world = World::getWorld();
|
||||||
const unsigned int kart_amount = world->getNumKarts();
|
const unsigned int kart_amount = world->getNumKarts();
|
||||||
for(unsigned int i = 0; i < kart_amount ; i++)
|
for(unsigned int i = 0; i < kart_amount ; i++)
|
||||||
@ -646,8 +647,7 @@ void RaceGUI::drawLap(const KartIconDisplayInfo* info, const Kart* kart,
|
|||||||
pos.UpperLeftCorner.X = viewport.UpperLeftCorner.X + (int)(0.05f*UserConfigParams::m_width);
|
pos.UpperLeftCorner.X = viewport.UpperLeftCorner.X + (int)(0.05f*UserConfigParams::m_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
gui::IGUIFont* font = GUIEngine::getFont();
|
gui::ScalableFont* font = GUIEngine::getFont();
|
||||||
|
|
||||||
int font_height = (int)(font->getDimension(L"X").Height);
|
int font_height = (int)(font->getDimension(L"X").Height);
|
||||||
|
|
||||||
if (kart->hasFinishedRace())
|
if (kart->hasFinishedRace())
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "states_screens/race_result_gui.hpp"
|
#include "states_screens/race_result_gui.hpp"
|
||||||
|
|
||||||
#include "guiengine/engine.hpp"
|
#include "guiengine/engine.hpp"
|
||||||
|
#include "guiengine/scalable_font.hpp"
|
||||||
#include "modes/world.hpp"
|
#include "modes/world.hpp"
|
||||||
#include "states_screens/dialogs/race_over_dialog.hpp"
|
#include "states_screens/dialogs/race_over_dialog.hpp"
|
||||||
#include "utils/string_utils.hpp"
|
#include "utils/string_utils.hpp"
|
||||||
@ -28,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
RaceResultGUI::RaceResultGUI()
|
RaceResultGUI::RaceResultGUI()
|
||||||
{
|
{
|
||||||
#undef USE_NEW_RACE_RESULT
|
#define USE_NEW_RACE_RESULT
|
||||||
|
|
||||||
#ifndef USE_NEW_RACE_RESULT
|
#ifndef USE_NEW_RACE_RESULT
|
||||||
// FIXME: for now disable the new race result display
|
// FIXME: for now disable the new race result display
|
||||||
@ -67,7 +68,7 @@ void RaceResultGUI::nextPhase()
|
|||||||
*/
|
*/
|
||||||
void RaceResultGUI::determineLayout()
|
void RaceResultGUI::determineLayout()
|
||||||
{
|
{
|
||||||
m_font = dynamic_cast<gui::ScalableFont*>(GUIEngine::getFont());
|
m_font = GUIEngine::getFont();
|
||||||
assert(m_font);
|
assert(m_font);
|
||||||
World *world = World::getWorld();
|
World *world = World::getWorld();
|
||||||
world->raceResultOrder(&m_order);
|
world->raceResultOrder(&m_order);
|
||||||
|
@ -20,11 +20,18 @@
|
|||||||
#ifndef HEADER_RACE_RESULT_GUI_HPP
|
#ifndef HEADER_RACE_RESULT_GUI_HPP
|
||||||
#define HEADER_RACE_RESULT_GUI_HPP
|
#define HEADER_RACE_RESULT_GUI_HPP
|
||||||
|
|
||||||
|
#include "states_screens/race_gui_base.hpp"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "states_screens/race_gui_base.hpp"
|
namespace irr
|
||||||
#include "guiengine/CGUIFont.h"
|
{
|
||||||
|
namespace gui
|
||||||
|
{
|
||||||
|
class ScalableFont;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Displays the results (while the end animation is shown).
|
* \brief Displays the results (while the end animation is shown).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user