From c0ad16d3d5b78028007a16d110ec92ce39b63ac0 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 19 Apr 2011 03:26:42 +0000 Subject: [PATCH] - disable screenshot console text in options menu --- source/glest_game/menu/menu_state_options.cpp | 21 +++++++++++++++++++ source/glest_game/menu/menu_state_options.h | 3 +++ 2 files changed, 24 insertions(+) diff --git a/source/glest_game/menu/menu_state_options.cpp b/source/glest_game/menu/menu_state_options.cpp index 71f3a3a0..d57f6d27 100644 --- a/source/glest_game/menu/menu_state_options.cpp +++ b/source/glest_game/menu/menu_state_options.cpp @@ -257,6 +257,16 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu): listBoxScreenShotType.setSelectedItem(config.getString("ScreenShotFileType","jpg")); currentLine-=30; + + labelDisableScreenshotConsoleText.registerGraphicComponent(containerName,"lavelDisableScreenshotConsoleText"); + labelDisableScreenshotConsoleText.init(currentLabelStart ,currentLine); + labelDisableScreenshotConsoleText.setText(lang.get("ScreenShotConsoleText")); + + checkBoxDisableScreenshotConsoleText.registerGraphicComponent(containerName,"checkBoxDisableScreenshotConsoleText"); + checkBoxDisableScreenshotConsoleText.init(currentColumnStart ,currentLine ); + checkBoxDisableScreenshotConsoleText.setValue(!config.getBool("DisableScreenshotConsoleText","false")); + currentLine-=30; + // end ////////////////////////////////////////////////////////////////// @@ -604,6 +614,9 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){ checkBoxEnableTextureCompression.mouseClick(x, y); listBoxScreenShotType.mouseClick(x, y); + + labelDisableScreenshotConsoleText.mouseClick(x, y); + checkBoxDisableScreenshotConsoleText.mouseClick(x, y); } } @@ -645,6 +658,9 @@ void MenuStateOptions::mouseMove(int x, int y, const MouseState *ms){ checkBoxEnableTextureCompression.mouseMove(x, y); listBoxScreenShotType.mouseMove(x, y); + + labelDisableScreenshotConsoleText.mouseMove(x, y); + checkBoxDisableScreenshotConsoleText.mouseMove(x, y); } void MenuStateOptions::keyDown(char key){ @@ -769,6 +785,9 @@ void MenuStateOptions::render(){ renderer.renderLabel(&labelScreenShotType); renderer.renderListBox(&listBoxScreenShotType); + + renderer.renderLabel(&labelDisableScreenshotConsoleText); + renderer.renderCheckBox(&checkBoxDisableScreenshotConsoleText); } renderer.renderConsole(&console,false,true); @@ -818,6 +837,8 @@ void MenuStateOptions::saveConfig(){ config.setString("ScreenShotFileType", listBoxScreenShotType.getSelectedItem()); + config.setBool("DisableScreenshotConsoleText", !checkBoxDisableScreenshotConsoleText.getValue()); + string currentResolution=config.getString("ScreenWidth")+"x"+config.getString("ScreenHeight"); string selectedResolution=listBoxScreenModes.getSelectedItem(); if(currentResolution!=selectedResolution){ diff --git a/source/glest_game/menu/menu_state_options.h b/source/glest_game/menu/menu_state_options.h index 1e7acb93..86b56522 100644 --- a/source/glest_game/menu/menu_state_options.h +++ b/source/glest_game/menu/menu_state_options.h @@ -111,6 +111,9 @@ private: GraphicLabel labelScreenShotType; GraphicListBox listBoxScreenShotType; + GraphicLabel labelDisableScreenshotConsoleText; + GraphicCheckBox checkBoxDisableScreenshotConsoleText; + public: MenuStateOptions(Program *program, MainMenu *mainMenu);