00001 00006 /* Copyright © 2010 James Legg. 00007 This program is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 */ 00012 00013 #include "PauseMenu.h" 00014 00015 namespace UI 00016 { 00017 00018 ContinueButton::ContinueButton(PauseMenu & menu) 00019 : MenuItem(L"Continue") 00020 , m_menu(menu) 00021 { 00022 } 00023 00024 void ContinueButton::activate() 00025 { 00026 m_menu.set_response(PauseMenu::R_CONTINUE); 00027 } 00028 00029 QuitButton::QuitButton(PauseMenu & menu) 00030 : MenuItem(L"Quit") 00031 , m_menu(menu) 00032 { 00033 } 00034 00035 void QuitButton::activate() 00036 { 00037 m_menu.set_response(PauseMenu::R_QUIT); 00038 } 00039 00040 PauseMenu::PauseMenu() 00041 : m_continue_item(*this) 00042 , m_quit_item(*this) 00043 , m_response(R_NONE) 00044 { 00045 insert_item(&m_continue_item); 00046 insert_item(&m_quit_item); 00047 } 00048 00049 void PauseMenu::set_response(Response response) 00050 { 00051 m_response = response; 00052 } 00053 00054 00055 PauseMenu::Response PauseMenu::get_response() const 00056 { 00057 return m_response; 00058 } 00059 00060 void PauseMenu::reset() 00061 { 00062 m_response = R_NONE; 00063 quit = false; 00064 } 00065 00066 } // namespace UI
Generated at Mon Sep 6 00:41:13 2010 by Doxygen version 1.4.7 for Racer version svn335.