only "named" console messages in chat-history, typically chat messages from users
smaller console font ( for test in linux only now )
This commit is contained in:
parent
f2027bea58
commit
a5c2a50d60
|
@ -16,8 +16,8 @@ AutoMaxFullScreen=false
|
||||||
AutoTest=false
|
AutoTest=false
|
||||||
CheckGlCaps=true
|
CheckGlCaps=true
|
||||||
ColorBits=32
|
ColorBits=32
|
||||||
ConsoleMaxLines=7
|
ConsoleMaxLines=8
|
||||||
ConsoleMaxLinesStored=20
|
ConsoleMaxLinesStored=25
|
||||||
ConsoleTimeout=20
|
ConsoleTimeout=20
|
||||||
DataPath=$APPLICATIONDATAPATH/
|
DataPath=$APPLICATIONDATAPATH/
|
||||||
LogPath=$HOME/.megaglest/
|
LogPath=$HOME/.megaglest/
|
||||||
|
@ -41,7 +41,7 @@ FirstTime=false
|
||||||
FocusArrows=true
|
FocusArrows=true
|
||||||
FogOfWarSmoothing=true
|
FogOfWarSmoothing=true
|
||||||
FogOfWarSmoothingFrameSkip=3
|
FogOfWarSmoothingFrameSkip=3
|
||||||
FontConsoleBaseSize=18
|
FontConsoleBaseSize=14
|
||||||
FontConsolePostfix=-*-*-*-*-*-*-*
|
FontConsolePostfix=-*-*-*-*-*-*-*
|
||||||
FontConsolePrefix=-*-arial-*-r-*-*-
|
FontConsolePrefix=-*-arial-*-r-*-*-
|
||||||
FontDisplayBaseSize=12
|
FontDisplayBaseSize=12
|
||||||
|
|
|
@ -37,10 +37,11 @@ Console::Console() {
|
||||||
timeElapsed = 0.0f;
|
timeElapsed = 0.0f;
|
||||||
xPos=20;
|
xPos=20;
|
||||||
yPos=20;
|
yPos=20;
|
||||||
lineHeight=20;
|
lineHeight=Config::getInstance().getInt("FontConsoleBaseSize","18")+2;
|
||||||
font=CoreData::getInstance().getConsoleFont();
|
font=CoreData::getInstance().getConsoleFont();
|
||||||
font3D=CoreData::getInstance().getConsoleFont3D();
|
font3D=CoreData::getInstance().getConsoleFont3D();
|
||||||
stringToHighlight="";
|
stringToHighlight="";
|
||||||
|
onlyChatMessagesInStoredLines=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Console::resetFonts() {
|
void Console::resetFonts() {
|
||||||
|
@ -101,9 +102,11 @@ void Console::addLine(string line, bool playSound, int playerIndex, Vec3f textCo
|
||||||
if(lines.size() > maxLines) {
|
if(lines.size() > maxLines) {
|
||||||
lines.pop_back();
|
lines.pop_back();
|
||||||
}
|
}
|
||||||
storedLines.insert(storedLines.begin(), info);
|
if(onlyChatMessagesInStoredLines==false || info.PlayerIndex!=-1) {
|
||||||
if(storedLines.size() > maxStoredLines) {
|
storedLines.insert(storedLines.begin(), info);
|
||||||
storedLines.pop_back();
|
if(storedLines.size() > maxStoredLines) {
|
||||||
|
storedLines.pop_back();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(const exception &ex) {
|
catch(const exception &ex) {
|
||||||
|
|
|
@ -75,12 +75,16 @@ private:
|
||||||
int lineHeight;
|
int lineHeight;
|
||||||
Font2D *font;
|
Font2D *font;
|
||||||
Font3D *font3D;
|
Font3D *font3D;
|
||||||
|
bool onlyChatMessagesInStoredLines;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Console();
|
Console();
|
||||||
|
|
||||||
int getStoredLineCount() const {return storedLines.size();}
|
int getStoredLineCount() const {return storedLines.size();}
|
||||||
int getLineCount() const {return lines.size();}
|
int getLineCount() const {return lines.size();}
|
||||||
|
bool getOnlyChatMessagesInStoredLines() const { return onlyChatMessagesInStoredLines ;}
|
||||||
|
void setOnlyChatMessagesInStoredLines(bool value) {this->onlyChatMessagesInStoredLines= value;}
|
||||||
|
|
||||||
int getXPos() const {return xPos;}
|
int getXPos() const {return xPos;}
|
||||||
void setXPos(int xPos) {this->xPos= xPos;}
|
void setXPos(int xPos) {this->xPos= xPos;}
|
||||||
int getYPos() const {return yPos;}
|
int getYPos() const {return yPos;}
|
||||||
|
|
|
@ -59,6 +59,7 @@ MenuStateMasterserver::MenuStateMasterserver(Program *program, MainMenu *mainMen
|
||||||
consoleIRC.setFont(CoreData::getInstance().getMenuFontNormal());
|
consoleIRC.setFont(CoreData::getInstance().getMenuFontNormal());
|
||||||
consoleIRC.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
consoleIRC.setFont3D(CoreData::getInstance().getMenuFontNormal3D());
|
||||||
consoleIRC.setLineHeight(18);
|
consoleIRC.setLineHeight(18);
|
||||||
|
consoleIRC.setOnlyChatMessagesInStoredLines(false);
|
||||||
|
|
||||||
serverLinesToRender=8;
|
serverLinesToRender=8;
|
||||||
serverLinesLineHeight=25;
|
serverLinesLineHeight=25;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user