mirror of
https://github.com/glest/glest-source.git
synced 2025-08-17 21:51:17 +02:00
mod menu now only shows 3 lines max for console messages
This commit is contained in:
@@ -1007,7 +1007,8 @@ void Renderer::renderConsoleLine(int lineIndex, int xPosition, int yPosition, in
|
|||||||
xPosition, (lineIndex * lineHeight) + yPosition);
|
xPosition, (lineIndex * lineHeight) + yPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::renderConsole(const Console *console,const bool showFullConsole,const bool showMenuConsole){
|
void Renderer::renderConsole(const Console *console,const bool showFullConsole,
|
||||||
|
const bool showMenuConsole, int overrideMaxConsoleLines){
|
||||||
if(console == NULL) {
|
if(console == NULL) {
|
||||||
throw runtime_error("console == NULL");
|
throw runtime_error("console == NULL");
|
||||||
}
|
}
|
||||||
@@ -1023,7 +1024,8 @@ void Renderer::renderConsole(const Console *console,const bool showFullConsole,c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(showMenuConsole) {
|
else if(showMenuConsole) {
|
||||||
for(int i = 0; i < console->getStoredLineCount() && i < maxConsoleLines; ++i) {
|
int allowedMaxLines = (overrideMaxConsoleLines >= 0 ? overrideMaxConsoleLines : maxConsoleLines);
|
||||||
|
for(int i = 0; i < console->getStoredLineCount() && i < allowedMaxLines; ++i) {
|
||||||
const ConsoleLineInfo &lineInfo = console->getStoredLineItem(i);
|
const ConsoleLineInfo &lineInfo = console->getStoredLineItem(i);
|
||||||
renderConsoleLine(i, console->getXPos(), console->getYPos(),
|
renderConsoleLine(i, console->getXPos(), console->getYPos(),
|
||||||
console->getLineHeight(), console->getFont(), console->getStringToHighlight(), &lineInfo);
|
console->getLineHeight(), console->getFont(), console->getStringToHighlight(), &lineInfo);
|
||||||
|
@@ -341,7 +341,7 @@ public:
|
|||||||
void renderMouse3d();
|
void renderMouse3d();
|
||||||
void renderBackground(const Texture2D *texture);
|
void renderBackground(const Texture2D *texture);
|
||||||
void renderTextureQuad(int x, int y, int w, int h, const Texture2D *texture, float alpha=1.f,const Vec3f *color=NULL);
|
void renderTextureQuad(int x, int y, int w, int h, const Texture2D *texture, float alpha=1.f,const Vec3f *color=NULL);
|
||||||
void renderConsole(const Console *console, const bool showAll=false, const bool showMenuConsole=false);
|
void renderConsole(const Console *console, const bool showAll=false, const bool showMenuConsole=false, int overrideMaxConsoleLines=-1);
|
||||||
void renderConsoleLine(int lineIndex, int xPosition, int yPosition, int lineHeight, const Font2D* font, string stringToHightlight, const ConsoleLineInfo *lineInfo);
|
void renderConsoleLine(int lineIndex, int xPosition, int yPosition, int lineHeight, const Font2D* font, string stringToHightlight, const ConsoleLineInfo *lineInfo);
|
||||||
void renderChatManager(const ChatManager *chatManager);
|
void renderChatManager(const ChatManager *chatManager);
|
||||||
void renderResourceStatus();
|
void renderResourceStatus();
|
||||||
|
@@ -1887,7 +1887,7 @@ void MenuStateMods::render() {
|
|||||||
}
|
}
|
||||||
safeMutexFTPProgress.ReleaseLock();
|
safeMutexFTPProgress.ReleaseLock();
|
||||||
|
|
||||||
renderer.renderConsole(&console,showFullConsole,true);
|
renderer.renderConsole(&console,showFullConsole,true,3);
|
||||||
|
|
||||||
if(mainMessageBox.getEnabled()) {
|
if(mainMessageBox.getEnabled()) {
|
||||||
renderer.renderMessageBox(&mainMessageBox);
|
renderer.renderMessageBox(&mainMessageBox);
|
||||||
|
Reference in New Issue
Block a user