// Copyright (C) 2002-2012 Nikolaus Gebhardt
// Copyright (C) 2016 Nathanaƫl Courant:
// Modified the functions to use EnrichedText instead of string.
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "static_text.h"
#ifdef _IRR_COMPILE_WITH_GUI_
#include <IGUIFont.h>
#include <IVideoDriver.h>
#include <rect.h>
#include <SColor.h>
#if USE_FREETYPE
#include "CGUITTFont.h"
#endif
#include "util/string.h"
namespace irr
{
#if USE_FREETYPE
namespace gui
{
//! constructor
StaticText::StaticText(const EnrichedString &text, bool border,
IGUIEnvironment* environment, IGUIElement* parent,
s32 id, const core::rect<s32>& rectangle,
bool background)
: IGUIStaticText(environment, parent, id, rectangle),
HAlign(EGUIA_UPPERLEFT), VAlign(EGUIA_UPPERLEFT),
Border(border), WordWrap(false), Background(background),
RestrainTextInside(true), RightToLeft(false),
OverrideFont(0), LastBreakFont(0)
{
#ifdef _DEBUG
setDebugName("StaticText");
#endif
setText(text);
}
//! destructor
StaticText::~StaticText()
{
if (OverrideFont)
|