Merge branch 'NewBillboardText'
This commit is contained in:
166
src/graphics/stk_text_billboard.cpp
Normal file
166
src/graphics/stk_text_billboard.cpp
Normal file
@@ -0,0 +1,166 @@
|
||||
#include "graphics/stk_text_billboard.hpp"
|
||||
#include "graphics/glwrap.hpp"
|
||||
#include "graphics/shaders.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/stkbillboard.hpp"
|
||||
#include "graphics/stkmeshscenenode.hpp"
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
|
||||
#include <SMesh.h>
|
||||
#include <SMeshBuffer.h>
|
||||
#include <ISceneManager.h>
|
||||
#include <ICameraSceneNode.h>
|
||||
|
||||
using namespace irr;
|
||||
|
||||
STKTextBillboard::STKTextBillboard(core::stringw text, gui::ScalableFont* font,
|
||||
const video::SColor& color_top, const video::SColor& color_bottom,
|
||||
irr::scene::ISceneNode* parent,
|
||||
irr::scene::ISceneManager* mgr, irr::s32 id,
|
||||
const irr::core::vector3df& position, const irr::core::vector3df& size) :
|
||||
STKMeshSceneNode(new scene::SMesh(),
|
||||
parent, irr_driver->getSceneManager(), -1,
|
||||
position, core::vector3df(0.0f, 0.0f, 0.0f), size, false)
|
||||
{
|
||||
m_color_top = color_top;
|
||||
m_color_bottom = color_bottom;
|
||||
getTextMesh(text, font);
|
||||
createGLMeshes();
|
||||
Mesh->drop();
|
||||
//setAutomaticCulling(0);
|
||||
setReloadEachFrame(true); // FIXME: should not need that!!
|
||||
updateAbsolutePosition();
|
||||
}
|
||||
|
||||
scene::IMesh* STKTextBillboard::getTextMesh(core::stringw text, gui::ScalableFont* font)
|
||||
{
|
||||
font->doDraw(text, core::rect<s32>(0, 0, 1000, 1000), video::SColor(255,255,255,255),
|
||||
false, false, NULL, this);
|
||||
|
||||
const float scale = 0.018f;
|
||||
|
||||
//scene::SMesh* mesh = new scene::SMesh();
|
||||
std::map<video::ITexture*, scene::SMeshBuffer*> buffers;
|
||||
|
||||
int max_x = 0;
|
||||
int min_y = 0;
|
||||
int max_y = 0;
|
||||
for (unsigned int i = 0; i < m_chars.size(); i++)
|
||||
{
|
||||
int char_x = m_chars[i].m_destRect.LowerRightCorner.X;
|
||||
if (char_x > max_x)
|
||||
max_x = char_x;
|
||||
|
||||
int char_min_y = m_chars[i].m_destRect.UpperLeftCorner.Y;
|
||||
int char_max_y = m_chars[i].m_destRect.LowerRightCorner.Y;
|
||||
if (char_min_y < min_y)
|
||||
min_y = char_min_y;
|
||||
if (char_max_y > min_y)
|
||||
max_y = char_max_y;
|
||||
}
|
||||
float scaled_center_x = (max_x / 2.0f) * scale;
|
||||
float scaled_y = (max_y / 2.0f) * scale; // -max_y * scale;
|
||||
|
||||
for (unsigned int i = 0; i < m_chars.size(); i++)
|
||||
{
|
||||
core::vector3df char_pos(m_chars[i].m_destRect.UpperLeftCorner.X,
|
||||
m_chars[i].m_destRect.UpperLeftCorner.Y, 0);
|
||||
char_pos *= scale;
|
||||
|
||||
core::vector3df char_pos2(m_chars[i].m_destRect.LowerRightCorner.X,
|
||||
m_chars[i].m_destRect.LowerRightCorner.Y, 0);
|
||||
char_pos2 *= scale;
|
||||
|
||||
core::dimension2di char_size_i = m_chars[i].m_destRect.getSize();
|
||||
core::dimension2df char_size(char_size_i.Width*scale, char_size_i.Height*scale);
|
||||
|
||||
std::map<video::ITexture*, scene::SMeshBuffer*>::iterator map_itr = buffers.find(m_chars[i].m_texture);
|
||||
scene::SMeshBuffer* buffer;
|
||||
if (map_itr == buffers.end())
|
||||
{
|
||||
buffer = new scene::SMeshBuffer();
|
||||
buffer->getMaterial().setTexture(0, m_chars[i].m_texture);
|
||||
buffer->getMaterial().MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
|
||||
buffers[m_chars[i].m_texture] = buffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
buffer = map_itr->second;
|
||||
}
|
||||
|
||||
float tex_width = m_chars[i].m_texture->getSize().Width;
|
||||
float tex_height = m_chars[i].m_texture->getSize().Height;
|
||||
|
||||
|
||||
video::S3DVertex vertices[] =
|
||||
{
|
||||
video::S3DVertex(char_pos.X - scaled_center_x, char_pos.Y - scaled_y, 0.0f,
|
||||
0.0f, 0.0f, 1.0f,
|
||||
m_color_bottom,
|
||||
m_chars[i].m_sourceRect.UpperLeftCorner.X / tex_width,
|
||||
m_chars[i].m_sourceRect.LowerRightCorner.Y / tex_height),
|
||||
|
||||
video::S3DVertex(char_pos2.X - scaled_center_x, char_pos.Y - scaled_y, 0.0f,
|
||||
0.0f, 0.0f, 1.0f,
|
||||
m_color_bottom,
|
||||
m_chars[i].m_sourceRect.LowerRightCorner.X / tex_width,
|
||||
m_chars[i].m_sourceRect.LowerRightCorner.Y / tex_height),
|
||||
|
||||
video::S3DVertex(char_pos2.X - scaled_center_x, char_pos2.Y - scaled_y, 0.0f,
|
||||
0.0f, 0.0f, 1.0f,
|
||||
m_color_top,
|
||||
m_chars[i].m_sourceRect.LowerRightCorner.X / tex_width,
|
||||
m_chars[i].m_sourceRect.UpperLeftCorner.Y / tex_height),
|
||||
|
||||
video::S3DVertex(char_pos.X - scaled_center_x, char_pos2.Y - scaled_y, 0.0f,
|
||||
0.0f, 0.0f, 1.0f,
|
||||
m_color_top,
|
||||
m_chars[i].m_sourceRect.UpperLeftCorner.X / tex_width,
|
||||
m_chars[i].m_sourceRect.UpperLeftCorner.Y / tex_height)
|
||||
};
|
||||
|
||||
irr::u16 indices[] = { 2, 1, 0, 3, 2, 0 };
|
||||
|
||||
buffer->append(vertices, 4, indices, 6);
|
||||
}
|
||||
|
||||
for (std::map<video::ITexture*, scene::SMeshBuffer*>::iterator map_itr = buffers.begin();
|
||||
map_itr != buffers.end(); map_itr++)
|
||||
{
|
||||
((scene::SMesh*)Mesh)->addMeshBuffer(map_itr->second);
|
||||
|
||||
map_itr->second->recalculateBoundingBox();
|
||||
Mesh->setBoundingBox(map_itr->second->getBoundingBox()); // TODO: wrong if several buffers
|
||||
|
||||
map_itr->second->drop();
|
||||
}
|
||||
|
||||
getMaterial(0).MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
|
||||
|
||||
return Mesh;
|
||||
}
|
||||
|
||||
void STKTextBillboard::OnRegisterSceneNode()
|
||||
{
|
||||
if (IsVisible)
|
||||
{
|
||||
SceneManager->registerNodeForRendering(this, scene::ESNRP_TRANSPARENT);
|
||||
|
||||
scene::ICameraSceneNode* curr_cam = irr_driver->getSceneManager()->getActiveCamera();
|
||||
core::vector3df cam_pos = curr_cam->getPosition();
|
||||
core::vector3df text_pos = this->getAbsolutePosition();
|
||||
float angle = atan2(text_pos.X - cam_pos.X, text_pos.Z - cam_pos.Z);
|
||||
this->setRotation(core::vector3df(0.0f, angle * 180.0f / M_PI, 0.0f));
|
||||
}
|
||||
|
||||
ISceneNode::OnRegisterSceneNode();
|
||||
}
|
||||
|
||||
void STKTextBillboard::collectChar(video::ITexture* texture,
|
||||
const core::rect<s32>& destRect,
|
||||
const core::rect<s32>& sourceRect,
|
||||
const video::SColor* const colors)
|
||||
{
|
||||
m_chars.push_back(STKTextBillboardChar(texture, destRect, sourceRect, colors));
|
||||
}
|
||||
67
src/graphics/stk_text_billboard.hpp
Normal file
67
src/graphics/stk_text_billboard.hpp
Normal file
@@ -0,0 +1,67 @@
|
||||
#ifndef STK_TEXT_BILLBOARD_HPP
|
||||
#define STK_TEXT_BILLBOARD_HPP
|
||||
|
||||
#include "../lib/irrlicht/source/Irrlicht/CBillboardSceneNode.h"
|
||||
#include <IBillboardSceneNode.h>
|
||||
#include <irrTypes.h>
|
||||
#include <IMesh.h>
|
||||
#include "graphics/stkmeshscenenode.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "utils/cpp2011.hpp"
|
||||
|
||||
class STKTextBillboardChar
|
||||
{
|
||||
public:
|
||||
irr::video::ITexture* m_texture;
|
||||
irr::core::rect<irr::s32> m_destRect;
|
||||
irr::core::rect<irr::s32> m_sourceRect;
|
||||
//irr::video::SColor m_colors[4];
|
||||
|
||||
STKTextBillboardChar(irr::video::ITexture* texture,
|
||||
const irr::core::rect<irr::s32>& destRect,
|
||||
const irr::core::rect<irr::s32>& sourceRect,
|
||||
const irr::video::SColor* const colors)
|
||||
{
|
||||
m_texture = texture;
|
||||
m_destRect = destRect;
|
||||
m_sourceRect = sourceRect;
|
||||
//if (colors == NULL)
|
||||
//{
|
||||
// m_colors[0] = m_colors[1] = m_colors[2] = m_colors[3] = NULL;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// m_colors[0] = colors[0];
|
||||
// m_colors[1] = colors[1];
|
||||
// m_colors[2] = colors[2];
|
||||
// m_colors[3] = colors[3];
|
||||
//}
|
||||
}
|
||||
};
|
||||
|
||||
class STKTextBillboard : public STKMeshSceneNode, irr::gui::FontCharCollector
|
||||
{
|
||||
std::vector<STKTextBillboardChar> m_chars;
|
||||
irr::video::SColor m_color_top;
|
||||
irr::video::SColor m_color_bottom;
|
||||
|
||||
irr::scene::IMesh* getTextMesh(irr::core::stringw text, gui::ScalableFont* font);
|
||||
|
||||
public:
|
||||
STKTextBillboard(irr::core::stringw text, irr::gui::ScalableFont* font,
|
||||
const irr::video::SColor& color_top,
|
||||
const irr::video::SColor& color_bottom,
|
||||
irr::scene::ISceneNode* parent,
|
||||
irr::scene::ISceneManager* mgr, irr::s32 id,
|
||||
const irr::core::vector3df& position,
|
||||
const irr::core::vector3df& size);
|
||||
|
||||
virtual void OnRegisterSceneNode() OVERRIDE;
|
||||
|
||||
virtual void collectChar(irr::video::ITexture* texture,
|
||||
const irr::core::rect<irr::s32>& destRect,
|
||||
const irr::core::rect<irr::s32>& sourceRect,
|
||||
const irr::video::SColor* const colors);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -15,13 +15,15 @@
|
||||
STKMeshSceneNode::STKMeshSceneNode(irr::scene::IMesh* mesh, ISceneNode* parent, irr::scene::ISceneManager* mgr, irr::s32 id,
|
||||
const irr::core::vector3df& position,
|
||||
const irr::core::vector3df& rotation,
|
||||
const irr::core::vector3df& scale) :
|
||||
const irr::core::vector3df& scale, bool createGLMeshes) :
|
||||
CMeshSceneNode(mesh, parent, mgr, id, position, rotation, scale)
|
||||
{
|
||||
isDisplacement = false;
|
||||
immediate_draw = false;
|
||||
update_each_frame = false;
|
||||
createGLMeshes();
|
||||
|
||||
if (createGLMeshes)
|
||||
this->createGLMeshes();
|
||||
}
|
||||
|
||||
void STKMeshSceneNode::setReloadEachFrame(bool val)
|
||||
|
||||
@@ -29,7 +29,8 @@ public:
|
||||
STKMeshSceneNode(irr::scene::IMesh* mesh, ISceneNode* parent, irr::scene::ISceneManager* mgr, irr::s32 id,
|
||||
const irr::core::vector3df& position = irr::core::vector3df(0, 0, 0),
|
||||
const irr::core::vector3df& rotation = irr::core::vector3df(0, 0, 0),
|
||||
const irr::core::vector3df& scale = irr::core::vector3df(1.0f, 1.0f, 1.0f));
|
||||
const irr::core::vector3df& scale = irr::core::vector3df(1.0f, 1.0f, 1.0f),
|
||||
bool createGLMeshes = true);
|
||||
virtual void render();
|
||||
virtual void setMesh(irr::scene::IMesh* mesh);
|
||||
virtual void OnRegisterSceneNode();
|
||||
|
||||
@@ -463,6 +463,14 @@ core::dimension2d<u32> ScalableFont::getDimension(const wchar_t* text) const
|
||||
return dim;
|
||||
}
|
||||
|
||||
void ScalableFont::draw(const core::stringw& text,
|
||||
const core::rect<s32>& position, video::SColor color,
|
||||
bool hcenter, bool vcenter,
|
||||
const core::rect<s32>* clip)
|
||||
{
|
||||
doDraw(text, position, color, hcenter, vcenter, clip, NULL);
|
||||
}
|
||||
|
||||
void ScalableFont::draw(const core::stringw& text,
|
||||
const core::rect<s32>& position, video::SColor color,
|
||||
bool hcenter, bool vcenter,
|
||||
@@ -471,16 +479,17 @@ void ScalableFont::draw(const core::stringw& text,
|
||||
bool previousRTL = m_rtl;
|
||||
if (ignoreRTL) m_rtl = false;
|
||||
|
||||
draw(text, position, color, hcenter, vcenter, clip);
|
||||
doDraw(text, position, color, hcenter, vcenter, clip, NULL);
|
||||
|
||||
if (ignoreRTL) m_rtl = previousRTL;
|
||||
}
|
||||
|
||||
//! draws some text and clips it to the specified rectangle if wanted
|
||||
void ScalableFont::draw(const core::stringw& text,
|
||||
const core::rect<s32>& position, video::SColor color,
|
||||
bool hcenter, bool vcenter,
|
||||
const core::rect<s32>* clip)
|
||||
void ScalableFont::doDraw(const core::stringw& text,
|
||||
const core::rect<s32>& position, video::SColor color,
|
||||
bool hcenter, bool vcenter,
|
||||
const core::rect<s32>* clip,
|
||||
FontCharCollector* charCollector)
|
||||
{
|
||||
if (!Driver) return;
|
||||
|
||||
@@ -637,7 +646,7 @@ void ScalableFont::draw(const core::stringw& text,
|
||||
}
|
||||
}
|
||||
|
||||
if (m_black_border)
|
||||
if (m_black_border && charCollector == NULL)
|
||||
{
|
||||
// draw black border
|
||||
video::SColor black(color.getAlpha(),0,0,0);
|
||||
@@ -658,23 +667,45 @@ void ScalableFont::draw(const core::stringw& text,
|
||||
|
||||
if (fallback[n])
|
||||
{
|
||||
// draw text over
|
||||
// TODO: don't hardcode colors?
|
||||
static video::SColor orange(color.getAlpha(), 255, 100, 0);
|
||||
static video::SColor yellow(color.getAlpha(), 255, 220, 15);
|
||||
video::SColor title_colors[] = {yellow, orange, orange, yellow};
|
||||
draw2DImage(texture,
|
||||
dest,
|
||||
source,
|
||||
clip,
|
||||
title_colors, true);
|
||||
|
||||
if (charCollector != NULL)
|
||||
{
|
||||
charCollector->collectChar(texture,
|
||||
dest,
|
||||
source,
|
||||
title_colors);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw2DImage(texture,
|
||||
dest,
|
||||
source,
|
||||
clip,
|
||||
title_colors, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
draw2DImage(texture,
|
||||
dest,
|
||||
source,
|
||||
clip,
|
||||
color, true);
|
||||
if (charCollector != NULL)
|
||||
{
|
||||
video::SColor colors[] = { color, color, color, color };
|
||||
charCollector->collectChar(texture,
|
||||
dest,
|
||||
source,
|
||||
colors);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw2DImage(texture,
|
||||
dest,
|
||||
source,
|
||||
clip,
|
||||
color, true);
|
||||
}
|
||||
#ifdef FONT_DEBUG
|
||||
driver->draw2DLine(core::position2d<s32>(dest.UpperLeftCorner.X, dest.UpperLeftCorner.Y),
|
||||
core::position2d<s32>(dest.UpperLeftCorner.X, dest.LowerRightCorner.Y),
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace video
|
||||
{
|
||||
class IVideoDriver;
|
||||
class IImage;
|
||||
class ITexture;
|
||||
}
|
||||
|
||||
namespace gui
|
||||
@@ -33,6 +34,14 @@ namespace gui
|
||||
|
||||
class IGUIEnvironment;
|
||||
|
||||
class FontCharCollector
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void collectChar(video::ITexture* texture, const core::rect<s32>& destRect,
|
||||
const core::rect<s32>& sourceRect, const video::SColor* const colors) = 0;
|
||||
};
|
||||
|
||||
class ScalableFont : public IGUIFontBitmap
|
||||
{
|
||||
float m_scale;
|
||||
@@ -101,12 +110,17 @@ public:
|
||||
|
||||
//! draws an text and clips it to the specified rectangle if wanted
|
||||
virtual void draw(const core::stringw& text, const core::rect<s32>& position,
|
||||
video::SColor color, bool hcenter=false,
|
||||
bool vcenter=false, const core::rect<s32>* clip=0);
|
||||
video::SColor color, bool hcenter = false,
|
||||
bool vcenter = false, const core::rect<s32>* clip = 0);
|
||||
|
||||
virtual void draw(const core::stringw& text, const core::rect<s32>& position,
|
||||
video::SColor color, bool hcenter,
|
||||
bool vcenter, const core::rect<s32>* clip, bool ignoreRTL);
|
||||
void draw(const core::stringw& text, const core::rect<s32>& position,
|
||||
video::SColor color, bool hcenter,
|
||||
bool vcenter, const core::rect<s32>* clip, bool ignoreRTL);
|
||||
|
||||
void doDraw(const core::stringw& text, const core::rect<s32>& position,
|
||||
video::SColor color, bool hcenter,
|
||||
bool vcenter, const core::rect<s32>* clip,
|
||||
FontCharCollector* charCollector = NULL);
|
||||
|
||||
//! returns the dimension of a text
|
||||
virtual core::dimension2d<u32> getDimension(const wchar_t* text) const;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "graphics/shadow.hpp"
|
||||
#include "graphics/skid_marks.hpp"
|
||||
#include "graphics/slip_stream.hpp"
|
||||
#include "graphics/stk_text_billboard.hpp"
|
||||
#include "graphics/stars.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "karts/explosion_animation.hpp"
|
||||
@@ -2598,21 +2599,36 @@ btQuaternion Kart::getVisualRotation() const
|
||||
void Kart::setOnScreenText(const wchar_t *text)
|
||||
{
|
||||
core::dimension2d<u32> textsize = GUIEngine::getFont()->getDimension(text);
|
||||
|
||||
// FIXME: Titlefont is the only font guaranteed to be loaded if STK
|
||||
// is started without splash screen (since "Loading" is shown even in this
|
||||
// case). A smaller font would be better
|
||||
// TODO: Add support in the engine for BillboardText or find a replacement
|
||||
/*scene::ISceneManager* sm = irr_driver->getSceneManager();
|
||||
sm->addBillboardTextSceneNode(GUIEngine::getFont() ? GUIEngine::getFont()
|
||||
: GUIEngine::getTitleFont(),
|
||||
text,
|
||||
getNode(),
|
||||
core::dimension2df(textsize.Width/55.0f,
|
||||
textsize.Height/55.0f),
|
||||
core::vector3df(0.0f, 1.5f, 0.0f),
|
||||
-1, // id
|
||||
video::SColor(255, 255, 225, 0),
|
||||
video::SColor(255, 255, 89, 0));*/
|
||||
|
||||
if (irr_driver->isGLSL())
|
||||
{
|
||||
gui::ScalableFont* font = GUIEngine::getFont() ? GUIEngine::getFont() : GUIEngine::getTitleFont();
|
||||
STKTextBillboard* tb = new STKTextBillboard(text, font,
|
||||
video::SColor(255, 255, 225, 0),
|
||||
video::SColor(255, 255, 89, 0),
|
||||
getNode(), irr_driver->getSceneManager(), -1,
|
||||
core::vector3df(0.0f, 1.5f, 0.0f),
|
||||
core::vector3df(1.0f, 1.0f, 1.0f));
|
||||
}
|
||||
else
|
||||
{
|
||||
scene::ISceneManager* sm = irr_driver->getSceneManager();
|
||||
sm->addBillboardTextSceneNode(GUIEngine::getFont() ? GUIEngine::getFont()
|
||||
: GUIEngine::getTitleFont(),
|
||||
text,
|
||||
getNode(),
|
||||
core::dimension2df(textsize.Width/55.0f,
|
||||
textsize.Height/55.0f),
|
||||
core::vector3df(0.0f, 1.5f, 0.0f),
|
||||
-1, // id
|
||||
video::SColor(255, 255, 225, 0),
|
||||
video::SColor(255, 255, 89, 0));
|
||||
}
|
||||
|
||||
// No need to store the reference to the billboard scene node:
|
||||
// It has one reference to the parent, and will get deleted
|
||||
// when the parent is deleted.
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "graphics/particle_emitter.hpp"
|
||||
#include "graphics/particle_kind.hpp"
|
||||
#include "graphics/particle_kind_manager.hpp"
|
||||
#include "graphics/stk_text_billboard.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "io/xml_node.hpp"
|
||||
@@ -1102,19 +1103,33 @@ bool Track::loadMainTrack(const XMLNode &root)
|
||||
|
||||
assert(GUIEngine::getHighresDigitFont() != NULL);
|
||||
|
||||
// TODO: Add support in the engine for BillboardText or find a replacement
|
||||
/* scene::ISceneManager* sm = irr_driver->getSceneManager();
|
||||
scene::ISceneNode* sn =
|
||||
sm->addBillboardTextSceneNode(GUIEngine::getHighresDigitFont(),
|
||||
msg.c_str(),
|
||||
NULL,
|
||||
core::dimension2df(textsize.Width/45.0f,
|
||||
textsize.Height/45.0f),
|
||||
xyz,
|
||||
-1, // id
|
||||
video::SColor(255, 255, 225, 0),
|
||||
video::SColor(255, 255, 89, 0));
|
||||
m_all_nodes.push_back(sn);*/
|
||||
if (irr_driver->isGLSL())
|
||||
{
|
||||
gui::ScalableFont* font = GUIEngine::getHighresDigitFont();
|
||||
STKTextBillboard* tb = new STKTextBillboard(msg.c_str(), font,
|
||||
video::SColor(255, 255, 225, 0),
|
||||
video::SColor(255, 255, 89, 0),
|
||||
irr_driver->getSceneManager()->getRootSceneNode(),
|
||||
irr_driver->getSceneManager(), -1, xyz,
|
||||
core::vector3df(1.5f, 1.5f, 1.5f));
|
||||
m_all_nodes.push_back(tb);
|
||||
}
|
||||
else
|
||||
{
|
||||
scene::ISceneManager* sm = irr_driver->getSceneManager();
|
||||
scene::ISceneNode* sn =
|
||||
sm->addBillboardTextSceneNode(GUIEngine::getHighresDigitFont(),
|
||||
msg.c_str(),
|
||||
NULL,
|
||||
core::dimension2df(textsize.Width / 35.0f,
|
||||
textsize.Height / 35.0f),
|
||||
xyz,
|
||||
-1, // id
|
||||
video::SColor(255, 255, 225, 0),
|
||||
video::SColor(255, 255, 89, 0));
|
||||
m_all_nodes.push_back(sn);
|
||||
}
|
||||
|
||||
if (!shown) continue;
|
||||
}
|
||||
else if (condition == "allchallenges")
|
||||
|
||||
Reference in New Issue
Block a user