mod menu now only shows 3 lines max for console messages
This commit is contained in:
parent
04d9bc5992
commit
431ca8e6fb
|
@ -1007,7 +1007,8 @@ void Renderer::renderConsoleLine(int lineIndex, int xPosition, int yPosition, in
|
|||
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) {
|
||||
throw runtime_error("console == NULL");
|
||||
}
|
||||
|
@ -1023,7 +1024,8 @@ void Renderer::renderConsole(const Console *console,const bool showFullConsole,c
|
|||
}
|
||||
}
|
||||
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);
|
||||
renderConsoleLine(i, console->getXPos(), console->getYPos(),
|
||||
console->getLineHeight(), console->getFont(), console->getStringToHighlight(), &lineInfo);
|
||||
|
|
|
@ -341,7 +341,7 @@ public:
|
|||
void renderMouse3d();
|
||||
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 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 renderChatManager(const ChatManager *chatManager);
|
||||
void renderResourceStatus();
|
||||
|
|
|
@ -1887,7 +1887,7 @@ void MenuStateMods::render() {
|
|||
}
|
||||
safeMutexFTPProgress.ReleaseLock();
|
||||
|
||||
renderer.renderConsole(&console,showFullConsole,true);
|
||||
renderer.renderConsole(&console,showFullConsole,true,3);
|
||||
|
||||
if(mainMessageBox.getEnabled()) {
|
||||
renderer.renderMessageBox(&mainMessageBox);
|
||||
|
|
Loading…
Reference in New Issue
Block a user