1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

Remove irr namespace (#16309)

This commit is contained in:
Lars Müller 2025-07-09 10:35:52 +02:00 committed by GitHub
parent 7e22c72492
commit 61551cfc3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
381 changed files with 680 additions and 1632 deletions

View file

@ -43,8 +43,7 @@
#include <cstdlib>
#include <iostream>
namespace irr
{
namespace gui
{
@ -955,4 +954,3 @@ std::u32string CGUITTFont::convertWCharToU32String(const wchar_t* const charArra
} // end namespace gui
} // end namespace irr

View file

@ -46,12 +46,10 @@
#include <map>
#include <optional>
namespace irr
{
namespace gui
{
// Manages the FT_Face cache.
struct SGUITTFace : public irr::IReferenceCounted
struct SGUITTFace : public IReferenceCounted
{
private:
@ -409,4 +407,3 @@ namespace gui
};
} // end namespace gui
} // end namespace irr

View file

@ -7,7 +7,7 @@
#include <vector2d.h>
#include <vector3d.h>
namespace irr::core {
namespace core {
template <class T>
std::ostream &operator<< (std::ostream &os, vector2d<T> vec)

View file

@ -14,8 +14,6 @@
#include "CGUITTFont.h"
#include "util/string.h"
namespace irr
{
namespace gui
{
@ -97,7 +95,7 @@ void StaticText::draw()
font->getDimension(str.c_str()).Width;
}
if (font->getType() == irr::gui::EGFT_CUSTOM) {
if (font->getType() == gui::EGFT_CUSTOM) {
CGUITTFont *tmp = static_cast<CGUITTFont*>(font);
tmp->draw(str,
r, HAlign == EGUIA_CENTER, VAlign == EGUIA_CENTER,
@ -319,7 +317,7 @@ void StaticText::updateText()
elWidth -= 2*skin->getSize(EGDS_TEXT_DISTANCE_X);
wchar_t c;
//std::vector<irr::video::SColor> colors;
//std::vector<video::SColor> colors;
// We have to deal with right-to-left and left-to-right differently
// However, most parts of the following code is the same, it's just
@ -574,5 +572,3 @@ s32 StaticText::getTextWidth() const
} // end namespace gui
} // end namespace irr

View file

@ -18,9 +18,6 @@
#include <IGUIEnvironment.h>
namespace irr
{
namespace gui
{
@ -39,18 +36,18 @@ namespace gui
//! destructor
virtual ~StaticText();
static irr::gui::IGUIStaticText *add(
irr::gui::IGUIEnvironment *guienv,
static gui::IGUIStaticText *add(
gui::IGUIEnvironment *guienv,
const EnrichedString &text,
const core::rect< s32 > &rectangle,
bool border = false,
bool wordWrap = true,
irr::gui::IGUIElement *parent = NULL,
gui::IGUIElement *parent = NULL,
s32 id = -1,
bool fillBackground = false)
{
parent = parent ? parent : guienv->getRootGUIElement();
irr::gui::IGUIStaticText *result = new irr::gui::StaticText(
gui::IGUIStaticText *result = new gui::StaticText(
text, border, guienv, parent,
id, rectangle, fillBackground);
@ -59,13 +56,13 @@ namespace gui
return result;
}
static irr::gui::IGUIStaticText *add(
irr::gui::IGUIEnvironment *guienv,
static gui::IGUIStaticText *add(
gui::IGUIEnvironment *guienv,
std::wstring_view text,
const core::rect< s32 > &rectangle,
bool border = false,
bool wordWrap = true,
irr::gui::IGUIElement *parent = NULL,
gui::IGUIElement *parent = NULL,
s32 id = -1,
bool fillBackground = false)
{
@ -190,21 +187,19 @@ namespace gui
} // end namespace gui
} // end namespace irr
inline void setStaticText(irr::gui::IGUIStaticText *static_text, const EnrichedString &text)
inline void setStaticText(gui::IGUIStaticText *static_text, const EnrichedString &text)
{
// dynamic_cast not possible due to some distributions shipped
// without rtti support in irrlicht
if (static_text->hasType(irr::gui::EGUIET_ENRICHED_STATIC_TEXT)) {
irr::gui::StaticText* stext = static_cast<irr::gui::StaticText*>(static_text);
if (static_text->hasType(gui::EGUIET_ENRICHED_STATIC_TEXT)) {
gui::StaticText* stext = static_cast<gui::StaticText*>(static_text);
stext->setText(text);
} else {
static_text->setText(text.c_str());
}
}
inline void setStaticText(irr::gui::IGUIStaticText *static_text, std::wstring_view text)
inline void setStaticText(gui::IGUIStaticText *static_text, std::wstring_view text)
{
setStaticText(static_text, EnrichedString(text, static_text->getOverrideColor()));
}