mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 16:32:53 +02:00
chatmanager is rendered with colored and shadowed console font.
Fixed font problems while switching display colors ingame (+ little fix for last checkin )
This commit is contained in:
@@ -4,7 +4,7 @@ if ! $(top_builddir)
|
|||||||
}
|
}
|
||||||
top_srcdir = $(TOP) ;
|
top_srcdir = $(TOP) ;
|
||||||
|
|
||||||
MGFLAGS = -fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse -msse2
|
MGFLAGS = -fno-strict-aliasing -frounding-math -fsignaling-nans -mfpmath=sse -msse -msse2 ;
|
||||||
|
|
||||||
JAMCONFIG ?= $(top_builddir)/Jamconfig ;
|
JAMCONFIG ?= $(top_builddir)/Jamconfig ;
|
||||||
include $(JAMCONFIG) ;
|
include $(JAMCONFIG) ;
|
||||||
|
@@ -771,6 +771,7 @@ void Renderer::renderConsole(const Console *console,const bool showFullConsole,c
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::renderChatManager(const ChatManager *chatManager){
|
void Renderer::renderChatManager(const ChatManager *chatManager){
|
||||||
|
Vec4f fontColor;
|
||||||
Lang &lang= Lang::getInstance();
|
Lang &lang= Lang::getInstance();
|
||||||
|
|
||||||
if(chatManager->getEditEnabled()){
|
if(chatManager->getEditEnabled()){
|
||||||
@@ -785,9 +786,23 @@ void Renderer::renderChatManager(const ChatManager *chatManager){
|
|||||||
}
|
}
|
||||||
text+= ": " + chatManager->getText() + "_";
|
text+= ": " + chatManager->getText() + "_";
|
||||||
|
|
||||||
textRenderer->begin(CoreData::getInstance().getConsoleFont());
|
if(game!=NULL){
|
||||||
textRenderer->render(text, 300, 150);
|
fontColor=game->getGui()->getDisplay()->getColor();
|
||||||
textRenderer->end();
|
}
|
||||||
|
else {
|
||||||
|
// white shadowed is default ( in the menu for example )
|
||||||
|
fontColor=Vec4f(1.f, 1.f, 1.f, 0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
renderTextShadow(
|
||||||
|
text,
|
||||||
|
CoreData::getInstance().getConsoleFont(),
|
||||||
|
fontColor,
|
||||||
|
300, 150);
|
||||||
|
|
||||||
|
//textRenderer->begin(CoreData::getInstance().getConsoleFont());
|
||||||
|
//textRenderer->render(text, 300, 150);
|
||||||
|
//textRenderer->end();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -924,8 +939,8 @@ void Renderer::renderTextShadow(const string &text, const Font2D *font,const Vec
|
|||||||
|
|
||||||
Vec2i pos= centered? computeCenteredPos(text, font, x, y): Vec2i(x, y);
|
Vec2i pos= centered? computeCenteredPos(text, font, x, y): Vec2i(x, y);
|
||||||
|
|
||||||
if(color.w<0.5) {
|
|
||||||
textRenderer->begin(font);
|
textRenderer->begin(font);
|
||||||
|
if(color.w<0.5) {
|
||||||
glColor3f(0.0f, 0.0f, 0.0f);
|
glColor3f(0.0f, 0.0f, 0.0f);
|
||||||
textRenderer->render(text, pos.x-1.0f, pos.y-1.0f);
|
textRenderer->render(text, pos.x-1.0f, pos.y-1.0f);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user