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