- added console object to base menustate and added a way to disable console output when taking a screenshot (on be default). To Disable:
DisableScreenshotConsoleText=true
This commit is contained in:
parent
5d10312ead
commit
6e8157b9de
|
@ -832,7 +832,12 @@ void MainWindow::eventKeyDown(char key){
|
|||
else {
|
||||
sprintf(szBuf,"Screenshot will be saved to: %s",path.c_str());
|
||||
}
|
||||
program->consoleAddLine(szBuf);
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] %s\n",__FILE__,__FUNCTION__,__LINE__,szBuf);
|
||||
|
||||
if(Config::getInstance().getBool("DisableScreenshotConsoleText","false") == false) {
|
||||
program->consoleAddLine(szBuf);
|
||||
}
|
||||
|
||||
Renderer::getInstance().saveScreen(path);
|
||||
break;
|
||||
|
|
|
@ -194,6 +194,12 @@ bool MainMenu::isInSpecialKeyCaptureEvent() {
|
|||
return state->isInSpecialKeyCaptureEvent();
|
||||
}
|
||||
|
||||
void MainMenu::consoleAddLine(string line) {
|
||||
if(state != NULL) {
|
||||
state->consoleAddLine(line);
|
||||
}
|
||||
}
|
||||
|
||||
// =====================================================
|
||||
// class MenuState
|
||||
// =====================================================
|
||||
|
@ -251,6 +257,8 @@ MenuState::~MenuState() {
|
|||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
|
||||
void MenuState::consoleAddLine(string line) {
|
||||
console.addLine(line);
|
||||
}
|
||||
|
||||
}}//end namespace
|
||||
|
|
|
@ -111,6 +111,7 @@ public:
|
|||
int getMouseX() const {return mouseX;}
|
||||
int getMouseY() const {return mouseY;}
|
||||
int getMouse2dAnim() const {return mouse2dAnim;}
|
||||
virtual void consoleAddLine(string line);
|
||||
|
||||
};
|
||||
|
||||
|
@ -127,6 +128,7 @@ protected:
|
|||
Camera camera;
|
||||
|
||||
const char *containerName;
|
||||
Console console;
|
||||
|
||||
public:
|
||||
MenuState(Program *program, MainMenu *mainMenu, const string &stateName);
|
||||
|
@ -142,6 +144,7 @@ public:
|
|||
const Camera *getCamera() const {return &camera;}
|
||||
|
||||
virtual bool isInSpecialKeyCaptureEvent() { return false; }
|
||||
virtual void consoleAddLine(string line);
|
||||
};
|
||||
|
||||
}}//end namespace
|
||||
|
|
|
@ -104,7 +104,7 @@ private:
|
|||
time_t lastSetChangedGameSettings;
|
||||
bool updateDataSynchDetailText;
|
||||
|
||||
Console console;
|
||||
//Console console;
|
||||
ChatManager chatManager;
|
||||
bool showFullConsole;
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ private:
|
|||
string generalErrorToShow;
|
||||
bool serverInitError;
|
||||
|
||||
Console console;
|
||||
//Console console;
|
||||
ChatManager chatManager;
|
||||
bool showFullConsole;
|
||||
|
||||
|
|
|
@ -71,6 +71,8 @@ void MenuStateGraphicInfo::render(){
|
|||
renderer.renderButton(&buttonReturn);
|
||||
renderer.renderLabel(&labelInfo);
|
||||
renderer.renderLabel(&labelMoreInfo);
|
||||
|
||||
renderer.renderConsole(&console,false,true);
|
||||
}
|
||||
|
||||
void MenuStateGraphicInfo::keyDown(char key) {
|
||||
|
|
|
@ -56,7 +56,7 @@ private:
|
|||
int playerIndex;
|
||||
Properties servers;
|
||||
|
||||
Console console;
|
||||
//Console console;
|
||||
ChatManager chatManager;
|
||||
|
||||
string serversSavedFile;
|
||||
|
|
|
@ -299,6 +299,8 @@ void MenuStateKeysetup::render(){
|
|||
}
|
||||
renderer.renderScrollBar(&keyScrollBar);
|
||||
}
|
||||
|
||||
renderer.renderConsole(&console,false,true);
|
||||
if(program != NULL) program->renderProgramMsgBox();
|
||||
}
|
||||
|
||||
|
@ -312,6 +314,8 @@ void MenuStateKeysetup::update() {
|
|||
- keyScrollBar.getVisibleStart()));
|
||||
}
|
||||
}
|
||||
|
||||
console.update();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ private:
|
|||
int keyButtonsHeight;
|
||||
int keyButtonsWidth;
|
||||
|
||||
Console console;
|
||||
//Console console;
|
||||
bool showFullConsole;
|
||||
|
||||
string selectedTechName;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ==============================================================
|
||||
// This file is part of Glest (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2005 Martiño Figueroa
|
||||
// Copyright (C) 2001-2005 Marti<EFBFBD>o Figueroa
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
|
@ -122,6 +122,7 @@ void MenuStateNewGame::render(){
|
|||
renderer.renderButton(&buttonTutorial);
|
||||
renderer.renderButton(&buttonReturn);
|
||||
|
||||
renderer.renderConsole(&console,false,true);
|
||||
if(program != NULL) program->renderProgramMsgBox();
|
||||
}
|
||||
|
||||
|
@ -129,6 +130,7 @@ void MenuStateNewGame::update(){
|
|||
if(Config::getInstance().getBool("AutoTest")){
|
||||
AutoTest::getInstance().updateNewGame(program, mainMenu);
|
||||
}
|
||||
console.update();
|
||||
}
|
||||
|
||||
void MenuStateNewGame::keyDown(char key) {
|
||||
|
|
|
@ -771,6 +771,7 @@ void MenuStateOptions::render(){
|
|||
renderer.renderListBox(&listBoxScreenShotType);
|
||||
}
|
||||
|
||||
renderer.renderConsole(&console,false,true);
|
||||
if(program != NULL) program->renderProgramMsgBox();
|
||||
}
|
||||
|
||||
|
|
|
@ -194,6 +194,8 @@ void MenuStateRoot::render() {
|
|||
renderer.renderButton(&buttonExit);
|
||||
renderer.renderLabel(&labelVersion);
|
||||
|
||||
renderer.renderConsole(&console,false,true);
|
||||
|
||||
//exit message box
|
||||
if(mainMessageBox.getEnabled()){
|
||||
renderer.renderMessageBox(&mainMessageBox);
|
||||
|
@ -205,6 +207,7 @@ void MenuStateRoot::update(){
|
|||
if(Config::getInstance().getBool("AutoTest")){
|
||||
AutoTest::getInstance().updateRoot(program, mainMenu);
|
||||
}
|
||||
console.update();
|
||||
}
|
||||
|
||||
void MenuStateRoot::keyDown(char key) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ==============================================================
|
||||
// This file is part of Glest (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2005 Martiño Figueroa
|
||||
// Copyright (C) 2001-2005 Marti<EFBFBD>o Figueroa
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
|
@ -23,7 +23,7 @@ namespace Glest{ namespace Game{
|
|||
|
||||
class GraphicMessageBox;
|
||||
|
||||
class MenuStateRoot: public MenuState{
|
||||
class MenuStateRoot: public MenuState {
|
||||
private:
|
||||
GraphicButton buttonNewGame;
|
||||
GraphicButton buttonMods;
|
||||
|
|
|
@ -192,6 +192,7 @@ void MenuStateScenario::render(){
|
|||
renderer.renderButton(&buttonReturn);
|
||||
renderer.renderButton(&buttonPlayNow);
|
||||
}
|
||||
renderer.renderConsole(&console,false,true);
|
||||
if(program != NULL) program->renderProgramMsgBox();
|
||||
}
|
||||
|
||||
|
@ -226,6 +227,7 @@ void MenuStateScenario::update() {
|
|||
needToLoadTextures= false;
|
||||
}
|
||||
}
|
||||
console.update();
|
||||
}
|
||||
|
||||
void MenuStateScenario::launchGame() {
|
||||
|
|
Loading…
Reference in New Issue