dark background for chat input

This commit is contained in:
titiger 2015-12-13 22:56:47 +01:00
parent b83414380c
commit 492a7e4c53
1 changed files with 20 additions and 0 deletions

View File

@ -2206,6 +2206,7 @@ void Renderer::renderChatManager(const ChatManager *chatManager) {
Lang &lang= Lang::getInstance();
if(chatManager->getEditEnabled()) {
Vec4f color=Vec4f(0.0f,0.0f,0.0f,0.6f);
string text="";
if(chatManager->isInCustomInputMode() == true) {
@ -2230,6 +2231,25 @@ void Renderer::renderChatManager(const ChatManager *chatManager) {
fontColor=Vec4f(1.f, 1.f, 1.f, 0.0f);
}
// render Background
int x=chatManager->getXPos();
int y=chatManager->getYPos()-6;
int h=22;
int w=830;
glPushAttrib(GL_ENABLE_BIT | GL_CURRENT_BIT);
glEnable(GL_BLEND);
glColor4f(color.x, color.y, color.z, color.w) ;
glBegin(GL_TRIANGLE_STRIP);
glVertex2i(x, y);
glVertex2i(x, y+h);
glVertex2i(x+w, y);
glVertex2i(x+w, y+h);
glEnd();
glPopAttrib();
if(renderText3DEnabled == true) {
renderTextShadow3D(
text,