// ============================================================== // This file is part of Glest (www.glest.org) // // Copyright (C) 2001-2005 MartiC1o Figueroa // // You can redistribute this code and/or modify it under // the terms of the GNU General Public License as published // by the Free Software Foundation; either version 2 of the // License, or (at your option) any later version // ============================================================== #include "menu_state_about.h" #include "renderer.h" #include "menu_state_root.h" #include "sound_renderer.h" #include "core_data.h" #include "config.h" #include "menu_state_options.h" #include "leak_dumper.h" namespace Glest{ namespace Game{ // ===================================================== // class MenuStateAbout // ===================================================== MenuStateAbout::MenuStateAbout(Program *program, MainMenu *mainMenu) : MenuState(program, mainMenu, "about") { containerName = "About"; Lang &lang= Lang::getInstance(); //init buttonReturn.registerGraphicComponent(containerName,"buttonReturn"); buttonReturn.init(460, 100, 125); buttonReturn.setText(lang.get("Return")); for(int i= 0; isetState(new MenuStateRoot(program, mainMenu)); } } void MenuStateAbout::mouseMove(int x, int y, const MouseState *ms){ buttonReturn.mouseMove(x, y); } void MenuStateAbout::render(){ Renderer &renderer= Renderer::getInstance(); renderer.renderButton(&buttonReturn); for(int i= 0; irenderProgramMsgBox(); } void MenuStateAbout::keyDown(char key) { Config &configKeys = Config::getInstance(std::pair(cfgMainKeys,cfgUserKeys)); if(key == configKeys.getCharKey("SaveGUILayout")) { bool saved = GraphicComponent::saveAllCustomProperties(containerName); //Lang &lang= Lang::getInstance(); //console.addLine(lang.get("GUILayoutSaved") + " [" + (saved ? lang.get("Yes") : lang.get("No"))+ "]"); } } }}//end namespace